summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
diff options
context:
space:
mode:
authorDmitry Shachnev <mitya57@gmail.com>2016-01-15 17:04:01 +0300
committerShawn Rutledge <shawn.rutledge@theqtcompany.com>2016-02-23 20:56:07 +0000
commitb6a824d0a3b4fabd9c22fe4c954d50e8755fb509 (patch)
tree3d37a77576234e54ffc173df7bcf4e78b2f48112 /tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
parent950bb7185c320ca9fe776bf0dc2a9589bf193a0d (diff)
Add native support for D-Bus global menu
The protocol was originally developed by Canonical, currently supported by Unity and Plasma. Adjust some tests to use the non-native menu bar when they require it. [ChangeLog][XCB / X11] QMenuBar uses the unified D-Bus AppMenu menubar when the desktop environment supports it. Change-Id: Iea74b40522573bcc4f70168fe7fa2a49b4f3fc21 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp')
-rw-r--r--tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
index 0fbe5bc86b..69dd45e72f 100644
--- a/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
+++ b/tests/auto/widgets/widgets/qmdiarea/tst_qmdiarea.cpp
@@ -632,7 +632,7 @@ void tst_QMdiArea::changeWindowTitle()
mw->setWindowTitle( mwc );
QMdiArea *ws = new QMdiArea( mw );
mw->setCentralWidget( ws );
- mw->menuBar();
+ mw->menuBar()->setNativeMenuBar(false);
mw->show();
QVERIFY(QTest::qWaitForWindowExposed(mw));
@@ -741,7 +741,7 @@ void tst_QMdiArea::changeModified()
mw->setWindowTitle( mwc );
QMdiArea *ws = new QMdiArea( mw );
mw->setCentralWidget( ws );
- mw->menuBar();
+ mw->menuBar()->setNativeMenuBar(false);
mw->show();
QWidget *widget = new QWidget( ws );
@@ -2006,6 +2006,7 @@ void tst_QMdiArea::iconGeometryInMenuBar()
#if !defined (Q_OS_MAC) && !defined(Q_OS_WINCE)
QMainWindow mainWindow;
QMenuBar *menuBar = mainWindow.menuBar();
+ menuBar->setNativeMenuBar(false);
QMdiArea *mdiArea = new QMdiArea;
QMdiSubWindow *subWindow = mdiArea->addSubWindow(new QWidget);
mainWindow.setCentralWidget(mdiArea);