aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmleasing
diff options
context:
space:
mode:
authorShrikant Dhumal <teck.shri@gmail.com>2015-09-09 16:55:34 -0700
committerShrikant Dhumal <teck.shri@gmail.com>2015-09-10 19:30:20 +0000
commit483d5256c0a06e52430364d033db1f305bf167f8 (patch)
treee57bfc3b213d110c0eda50dec0f66d3c9d9f85de /tools/qmleasing
parent6338e98729f811fd3a2d960c184e76357e908ab7 (diff)
Added QT_NO_CONTEXTMENU check for contextMenuEvent() handler
If Qt is configured with -no-feature-CONTEXTMENU it fails to compile qmleasing. Change-Id: I5ca001bbd0da5630fdfb54c5240e9bf4a5a81338 Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Diffstat (limited to 'tools/qmleasing')
-rw-r--r--tools/qmleasing/splineeditor.cpp2
-rw-r--r--tools/qmleasing/splineeditor.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp
index b957cab4fe..56444f6b3b 100644
--- a/tools/qmleasing/splineeditor.cpp
+++ b/tools/qmleasing/splineeditor.cpp
@@ -228,6 +228,7 @@ void SplineEditor::mouseReleaseEvent(QMouseEvent *e)
}
}
+#ifndef QT_NO_CONTEXTMENU
void SplineEditor::contextMenuEvent(QContextMenuEvent *e)
{
int index = findControlPoint(e->pos());
@@ -247,6 +248,7 @@ void SplineEditor::contextMenuEvent(QContextMenuEvent *e)
addPoint(e->pos());
}
}
+#endif // QT_NO_CONTEXTMENU
void SplineEditor::invalidate()
{
diff --git a/tools/qmleasing/splineeditor.h b/tools/qmleasing/splineeditor.h
index 595580bba2..4b9da14a7a 100644
--- a/tools/qmleasing/splineeditor.h
+++ b/tools/qmleasing/splineeditor.h
@@ -84,7 +84,9 @@ protected:
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
+#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent *);
+#endif // QT_NO_CONTEXTMENU
void invalidate();
void invalidateSmoothList();