Skip to content

Commit

Permalink
QT5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
nbergont committed Apr 1, 2014
1 parent 8da16bd commit 827ab40
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions QGVCore/QGVCore.pro
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@

QT += core

greaterThan(QT_MAJOR_VERSION, 4){
QT += widgets
}
lessThan(QT_MAJOR_VERSION, 5) {
QT += gui
}

TARGET = QGVCore
TEMPLATE = lib
CONFIG += shared
Expand Down
4 changes: 2 additions & 2 deletions QGVCore/QGVScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void QGVScene::clear()
#include <QGraphicsSceneContextMenuEvent>
void QGVScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent)
{
QGraphicsItem *item = itemAt(contextMenuEvent->scenePos());
QGraphicsItem *item = itemAt(contextMenuEvent->scenePos(), QTransform());
if(item)
{
item->setSelected(true);
Expand All @@ -216,7 +216,7 @@ void QGVScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent

void QGVScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *mouseEvent)
{
QGraphicsItem *item = itemAt(mouseEvent->scenePos());
QGraphicsItem *item = itemAt(mouseEvent->scenePos(), QTransform());
if(item)
{
if(item->type() == QGVNode::Type)
Expand Down
2 changes: 2 additions & 0 deletions QGVCore/qgv.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef QGV_H
#define QGV_H

#include <QtGlobal>

#ifdef QGVCORE_LIB
#define QGVCORE_EXPORT Q_DECL_EXPORT
#else
Expand Down

0 comments on commit 827ab40

Please sign in to comment.