aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickcontrols/snippets/tst_snippets.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2024-03-14 11:36:06 +0800
committerMitch Curtis <mitch.curtis@qt.io>2024-04-17 15:05:01 +0800
commit822db20f84e188de0adb49741c751548d3c000ea (patch)
treefcb0d61de31ea91b9608642ca0c3ab81219364ac /tests/auto/quickcontrols/snippets/tst_snippets.cpp
parent55806207069a7014bde8785d7352e84f9e9f9406 (diff)
Menu, MenuBar: remove requestNative and rely solely on app attributes
It was decided that we'll have two attributes: - AA_DontUseNativeMenuBar - AA_DontUseNativeMenuWindows Setting AA_DontUseNativeMenuWindows only affects windows we create (context menus, combobox menus, menus of non-native menu bars). So, setting AA_DontUseNativeMenuWindows restores Qt to today's behavior. But we can't control the windows of native menu bars, so if you don't want those to be native, you have to set AA_DontUseNativeMenuBar just like today. By removing requestNative, we also effectively default to native menus and menu bars, as the attributes are not set by default. [ChangeLog][Controls][Important Behavior Changes] Menu and MenuBar now use native menus by default on platforms where they're supported. Task-number: QTBUG-69558 Change-Id: Ia917c2f820634def0cf815aa8ca8895ca79db75d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests/auto/quickcontrols/snippets/tst_snippets.cpp')
-rw-r--r--tests/auto/quickcontrols/snippets/tst_snippets.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/quickcontrols/snippets/tst_snippets.cpp b/tests/auto/quickcontrols/snippets/tst_snippets.cpp
index f0d1da48d7..68e6ef5dfa 100644
--- a/tests/auto/quickcontrols/snippets/tst_snippets.cpp
+++ b/tests/auto/quickcontrols/snippets/tst_snippets.cpp
@@ -39,6 +39,9 @@ static QMap<QString, QStringPair> findSnippets(const QDir &inputDir, const QDir
void tst_Snippets::initTestCase()
{
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuWindows);
+ QCoreApplication::setAttribute(Qt::AA_DontUseNativeMenuBar);
+
qInfo() << "Snippets are taken from" << QQC2_SNIPPETS_PATH;
QDir snippetsDir(QQC2_SNIPPETS_PATH);