From 6a35e77ef3f4eae80ca49937c680836eb4acdbe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 13 Oct 2016 15:54:23 +0200 Subject: Change confusing Q_DEAD_CODE_FROM_QT4_FOO define Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code that the code in question was a left-over from Qt4, when we used Q_WS_ defines instead of Q_OS_ defines. This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually unconditionally included. To make this even clearer, the defines have been replaced by checks for 1 or 0, with a comment describing how the code used to look in Qt4. The use of constants in the check also makes it easier for editors to parse the condition and show visually that the code is defined out. Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7 Reviewed-by: Lars Knoll --- examples/widgets/graphicsview/boxes/scene.cpp | 2 +- examples/widgets/tools/i18n/languagechooser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/widgets/graphicsview/boxes/scene.cpp b/examples/widgets/graphicsview/boxes/scene.cpp index a22ab5082f..9ac429c667 100644 --- a/examples/widgets/graphicsview/boxes/scene.cpp +++ b/examples/widgets/graphicsview/boxes/scene.cpp @@ -128,7 +128,7 @@ void ColorEdit::mousePressEvent(QMouseEvent *event) QColorDialog dialog(color, 0); dialog.setOption(QColorDialog::ShowAlphaChannel, true); // The ifdef block is a workaround for the beta, TODO: remove when bug 238525 is fixed -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC dialog.setOption(QColorDialog::DontUseNativeDialog, true); #endif dialog.move(280, 120); diff --git a/examples/widgets/tools/i18n/languagechooser.cpp b/examples/widgets/tools/i18n/languagechooser.cpp index 9bdeec6613..83aafe6b8a 100644 --- a/examples/widgets/tools/i18n/languagechooser.cpp +++ b/examples/widgets/tools/i18n/languagechooser.cpp @@ -53,7 +53,7 @@ #include "languagechooser.h" #include "mainwindow.h" -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC QT_BEGIN_NAMESPACE extern void qt_mac_set_menubar_merge(bool merge); QT_END_NAMESPACE @@ -92,7 +92,7 @@ LanguageChooser::LanguageChooser(const QString& defaultLang, QWidget *parent) mainLayout->addWidget(buttonBox); setLayout(mainLayout); -#ifdef Q_DEAD_CODE_FROM_QT4_MAC +#if 0 // Used to be included in Qt4 for Q_WS_MAC qt_mac_set_menubar_merge(false); #endif -- cgit v1.2.3 From 4e945ea2f8e0e1e8eb512e3d590da12661a674cd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Oct 2016 14:52:38 +0200 Subject: Get rid of simulator_and_device CONFIG option (mostly) A separate flag is no longer needed now that simulator and device builds are not exclusive any more (*) - both 'simulator' and 'device' being set at the same time is a sufficient indication (uikit/default_pre.prf sets this up according to the simulator_and_device feature and the QMAKE_MAC_SDK variable). (*) xcodebuild mode actually still uses exclusive builds, but this is activated locally in uikit/default_post.prf, and uikit/xcodebuild.prf implements the actual build passes manually anyway, so this change does not affect it. Change-Id: Idf173a7bfeb984498d3a49ed6b8d1a16da6c2089 Reviewed-by: Jake Petroules --- examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro | 2 +- .../widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro b/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro index 8317019c10..f5ba95252c 100644 --- a/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro +++ b/examples/widgets/tools/plugandpaint/plugins/basictools/basictools.pro @@ -14,4 +14,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins INSTALLS += target CONFIG += install_ok # Do not cargo-cult this! -uikit: CONFIG += debug_and_release simulator_and_device +uikit: CONFIG += debug_and_release diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro index 4716665d34..e137b04823 100644 --- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro +++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/extrafilters.pro @@ -14,4 +14,4 @@ target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins INSTALLS += target CONFIG += install_ok # Do not cargo-cult this! -uikit: CONFIG += debug_and_release simulator_and_device +uikit: CONFIG += debug_and_release -- cgit v1.2.3 From 4133e76cf4844fee6ab5bbf6527ee6b882e0ad50 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Oct 2016 19:17:05 +0200 Subject: remove bogus xcode variable reference this is a vestige from an earlier version of the watchos introduction. amends 57378a108. Change-Id: I7d15149b94d12d84e041079b563175bd4e385d50 Reviewed-by: Jake Petroules --- examples/widgets/tools/plugandpaint/app/app.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/widgets/tools/plugandpaint/app/app.pro b/examples/widgets/tools/plugandpaint/app/app.pro index e35203edf2..b391a18eea 100644 --- a/examples/widgets/tools/plugandpaint/app/app.pro +++ b/examples/widgets/tools/plugandpaint/app/app.pro @@ -16,7 +16,7 @@ SOURCES = main.cpp \ LIBS = -L../plugins macx-xcode:qtConfig(simulator_and_device) { - LIBS += -lpnp_basictools$($${QMAKE_XCODE_LIBRARY_PLATFORM_SUFFIX_SETTING})$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}) + LIBS += -lpnp_basictools$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}) } else { LIBS += -lpnp_basictools if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { -- cgit v1.2.3 From 0cc2a75ad8c96d2c2bc3117c6291d964e215aca2 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Oct 2016 19:21:02 +0200 Subject: remove bogus qtConfig(simulator_and_device) condition xcode variable expansion should be done exactly when xcode is used. Change-Id: Icea8cb7bf9a51811052789bd66354b1b165127d6 Reviewed-by: Jake Petroules --- examples/widgets/tools/plugandpaint/app/app.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/widgets/tools/plugandpaint/app/app.pro b/examples/widgets/tools/plugandpaint/app/app.pro index b391a18eea..558d359e7d 100644 --- a/examples/widgets/tools/plugandpaint/app/app.pro +++ b/examples/widgets/tools/plugandpaint/app/app.pro @@ -15,7 +15,7 @@ SOURCES = main.cpp \ LIBS = -L../plugins -macx-xcode:qtConfig(simulator_and_device) { +macx-xcode { LIBS += -lpnp_basictools$($${QMAKE_XCODE_LIBRARY_SUFFIX_SETTING}) } else { LIBS += -lpnp_basictools -- cgit v1.2.3 From 401172a1986f834cf2010c3af988b3234c47abe2 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 6 Oct 2016 11:52:36 +0200 Subject: Doc: Fix typos: handing > handling Change-Id: Iecc64cba620ec639d06684e30264171052f21e10 Reviewed-by: Nico Vertriest --- examples/widgets/doc/src/calculator.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/widgets/doc/src/calculator.qdoc b/examples/widgets/doc/src/calculator.qdoc index 8d00bc7512..ea5051ce0a 100644 --- a/examples/widgets/doc/src/calculator.qdoc +++ b/examples/widgets/doc/src/calculator.qdoc @@ -261,7 +261,7 @@ \snippet widgets/calculator/calculator.cpp 20 - Like in \c additiveOperatorClicked(), we start by handing any + Like in \c additiveOperatorClicked(), we start by handling any pending multiplicative and additive operators. Then we display \c sumSoFar and reset the variable to zero. Resetting the variable to zero is necessary to avoid counting the value twice. -- cgit v1.2.3