summaryrefslogtreecommitdiffstats
path: root/examples/widgets/mainwindows/mainwindow
diff options
context:
space:
mode:
authorShrikant Dhumal <teck.shri@gmail.com>2015-09-03 20:07:27 -0700
committerShrikant Dhumal <teck.shri@gmail.com>2015-09-09 07:33:58 +0000
commit924d4aefd5315c11d0637e2ba1a6b02246e89c44 (patch)
tree1d23be8b8b86955ec21130f847a0bc92b14d44fa /examples/widgets/mainwindows/mainwindow
parent933e3e886fe51cc1feb542615b4700294182cc47 (diff)
Fixed build breaks that result after disabling "contextmenu" feature
Change-Id: I261f927ee720e0c65abd18417e1ac48dbee820df Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
Diffstat (limited to 'examples/widgets/mainwindows/mainwindow')
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.cpp2
-rw-r--r--examples/widgets/mainwindows/mainwindow/colorswatch.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
index d746bbe8d3..cd0543ecd9 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp
@@ -468,11 +468,13 @@ void ColorSwatch::tabInto(QAction *action)
mainWindow->tabifyDockWidget(target, this);
}
+#ifndef QT_NO_CONTEXTMENU
void ColorSwatch::contextMenuEvent(QContextMenuEvent *event)
{
event->accept();
menu->exec(event->globalPos());
}
+#endif // QT_NO_CONTEXTMENU
void ColorSwatch::resizeEvent(QResizeEvent *e)
{
diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.h b/examples/widgets/mainwindows/mainwindow/colorswatch.h
index 8827a7dca7..251807d60f 100644
--- a/examples/widgets/mainwindows/mainwindow/colorswatch.h
+++ b/examples/widgets/mainwindows/mainwindow/colorswatch.h
@@ -51,7 +51,9 @@ public:
QMenu *colorSwatchMenu() const { return menu; }
protected:
+#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE;
+#endif // QT_NO_CONTEXTMENU
void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
private slots: