From 924d4aefd5315c11d0637e2ba1a6b02246e89c44 Mon Sep 17 00:00:00 2001 From: Shrikant Dhumal Date: Thu, 3 Sep 2015 20:07:27 -0700 Subject: Fixed build breaks that result after disabling "contextmenu" feature Change-Id: I261f927ee720e0c65abd18417e1ac48dbee820df Reviewed-by: Jake Petroules --- examples/widgets/mainwindows/menus/mainwindow.cpp | 2 ++ examples/widgets/mainwindows/menus/mainwindow.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'examples/widgets/mainwindows/menus') diff --git a/examples/widgets/mainwindows/menus/mainwindow.cpp b/examples/widgets/mainwindows/menus/mainwindow.cpp index d487e3a277..fb06bc8ad0 100644 --- a/examples/widgets/mainwindows/menus/mainwindow.cpp +++ b/examples/widgets/mainwindows/menus/mainwindow.cpp @@ -83,6 +83,7 @@ MainWindow::MainWindow() //! [2] //! [3] +#ifndef QT_NO_CONTEXTMENU void MainWindow::contextMenuEvent(QContextMenuEvent *event) { QMenu menu(this); @@ -91,6 +92,7 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event) menu.addAction(pasteAct); menu.exec(event->globalPos()); } +#endif // QT_NO_CONTEXTMENU //! [3] void MainWindow::newFile() diff --git a/examples/widgets/mainwindows/menus/mainwindow.h b/examples/widgets/mainwindows/menus/mainwindow.h index 9710580819..57dd036767 100644 --- a/examples/widgets/mainwindows/menus/mainwindow.h +++ b/examples/widgets/mainwindows/menus/mainwindow.h @@ -59,7 +59,9 @@ public: MainWindow(); protected: +#ifndef QT_NO_CONTEXTMENU void contextMenuEvent(QContextMenuEvent *event) Q_DECL_OVERRIDE; +#endif // QT_NO_CONTEXTMENU //! [0] //! [1] -- cgit v1.2.3