summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-19 01:00:07 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-19 01:00:08 +0100
commit67c70b22f6376d3c8fbffaed73481d4e0675cb43 (patch)
treee3c40849413beb3c112de0fc380bc2aaa0a04ea8
parent5242126a610ebe76513cee22ecd8b5354bbf96b7 (diff)
parent6273b484b35479eb5788425c8d90acacdf239623 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
-rw-r--r--examples/corelib/serialization/cbordump/cbordump.pro3
-rw-r--r--examples/corelib/serialization/convert/convert.pro3
-rw-r--r--examples/corelib/serialization/savegame/savegame.pro3
-rw-r--r--examples/corelib/threads/semaphores/semaphores.pro3
-rw-r--r--examples/corelib/threads/waitconditions/waitconditions.pro4
-rw-r--r--examples/network/dnslookup/dnslookup.pro3
-rw-r--r--examples/network/download/download.pro3
-rw-r--r--examples/network/downloadmanager/downloadmanager.pro3
-rw-r--r--examples/qmake/precompile/precompile.pro3
-rw-r--r--examples/qtconcurrent/map/map.pro3
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.pro3
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.pro3
-rw-r--r--examples/widgets/statemachine/factorial/factorial.pro3
-rw-r--r--examples/widgets/statemachine/pingpong/pingpong.pro3
-rw-r--r--examples/xml/htmlinfo/htmlinfo.pro3
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.pro3
-rw-r--r--mkspecs/common/mac.conf2
-rw-r--r--mkspecs/features/cmdline.prf2
-rw-r--r--mkspecs/features/mac/sdk.prf4
-rw-r--r--mkspecs/features/qt_test_helper.prf3
-rw-r--r--qmake/doc/src/qmake-manual.qdoc11
-rw-r--r--qmake/generators/unix/unixmake.cpp9
-rw-r--r--qmake/qmake.pro4
-rw-r--r--src/3rdparty/freetype/src/sfnt/pngshim.c1
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm24
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm40
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm85
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.h1
-rw-r--r--src/plugins/platforms/cocoa/qnswindow.mm13
-rw-r--r--src/tools/moc/util/generate_keywords.pro2
-rw-r--r--tests/auto/corelib/global/qlogging/app/app.pro3
-rw-r--r--tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/testDetached/testDetached.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testForwarding/testForwarding.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/testForwardingHelper/testForwardingHelper.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro6
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/testSetNamedPipeHandleState.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro3
-rw-r--r--tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro4
-rw-r--r--tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro6
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/readAllStdinProcess.pro3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/readLineStdinProcess.pro3
-rw-r--r--tests/auto/corelib/serialization/qtextstream/stdinProcess/stdinProcess.pro3
-rw-r--r--tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro3
-rw-r--r--tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.pro3
-rw-r--r--tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro3
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp3
-rw-r--r--tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro3
-rw-r--r--tests/auto/dbus/qdbusmarshall/qpong/qpong.pro4
-rw-r--r--tests/auto/gui/qopengl/qopengl.pro2
-rw-r--r--tests/auto/network/access/qnetworkreply/echo/echo.pro4
-rw-r--r--tests/auto/network/bearer/qnetworksession/lackey/lackey.pro3
-rw-r--r--tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess.pro3
-rw-r--r--tests/auto/network/socket/qtcpsocket/stressTest/stressTest.pro3
-rw-r--r--tests/auto/network/socket/qudpsocket/clientserver/clientserver.pro3
-rw-r--r--tests/auto/network/socket/qudpsocket/udpServer/udpServer.pro4
-rw-r--r--tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro4
-rw-r--r--tests/baselineserver/src/baselineserver.pro3
-rw-r--r--tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro4
-rw-r--r--tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro4
-rw-r--r--tests/manual/embeddedintoforeignwindow/embeddedintoforeignwindow.pro3
-rw-r--r--tests/manual/filetest/filetest.pro3
-rw-r--r--tests/manual/foreignwindows/foreignwindows.pro3
-rw-r--r--tests/manual/highdpi/highdpi.pro3
-rw-r--r--tests/manual/lance/lance.pro3
-rw-r--r--tests/manual/qdesktopservices/qdesktopservices.pro3
-rw-r--r--tests/manual/qmimedatabase/qmimedatabase.pro3
-rw-r--r--tests/manual/qstorageinfo/qstorageinfo.pro3
-rw-r--r--tests/manual/qsysinfo/qsysinfo.pro3
-rw-r--r--tests/manual/widgets/styles/styles.pro3
-rw-r--r--util/glgen/glgen.pro3
-rw-r--r--util/gradientgen/tobinaryjson.pro3
89 files changed, 165 insertions, 286 deletions
diff --git a/examples/corelib/serialization/cbordump/cbordump.pro b/examples/corelib/serialization/cbordump/cbordump.pro
index 7fb2ef69f0..8149cb1d4c 100644
--- a/examples/corelib/serialization/cbordump/cbordump.pro
+++ b/examples/corelib/serialization/cbordump/cbordump.pro
@@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = cbordump
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TEMPLATE = app
diff --git a/examples/corelib/serialization/convert/convert.pro b/examples/corelib/serialization/convert/convert.pro
index d9b1de41e3..4c6b0b557a 100644
--- a/examples/corelib/serialization/convert/convert.pro
+++ b/examples/corelib/serialization/convert/convert.pro
@@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = convert
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TEMPLATE = app
diff --git a/examples/corelib/serialization/savegame/savegame.pro b/examples/corelib/serialization/savegame/savegame.pro
index 15a38c32ef..69e6b216f2 100644
--- a/examples/corelib/serialization/savegame/savegame.pro
+++ b/examples/corelib/serialization/savegame/savegame.pro
@@ -2,8 +2,7 @@ QT += core
QT -= gui
TARGET = savegame
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TEMPLATE = app
diff --git a/examples/corelib/threads/semaphores/semaphores.pro b/examples/corelib/threads/semaphores/semaphores.pro
index 69154e57eb..de909508c4 100644
--- a/examples/corelib/threads/semaphores/semaphores.pro
+++ b/examples/corelib/threads/semaphores/semaphores.pro
@@ -1,8 +1,7 @@
SOURCES += semaphores.cpp
QT = core
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
# install
target.path = $$[QT_INSTALL_EXAMPLES]/corelib/threads/semaphores
diff --git a/examples/corelib/threads/waitconditions/waitconditions.pro b/examples/corelib/threads/waitconditions/waitconditions.pro
index 2dbe7df68a..19b56a246d 100644
--- a/examples/corelib/threads/waitconditions/waitconditions.pro
+++ b/examples/corelib/threads/waitconditions/waitconditions.pro
@@ -1,6 +1,6 @@
QT = core
-CONFIG -= moc app_bundle
-CONFIG += console
+CONFIG -= moc
+CONFIG += cmdline
SOURCES += waitconditions.cpp
diff --git a/examples/network/dnslookup/dnslookup.pro b/examples/network/dnslookup/dnslookup.pro
index 0c6b512d3b..c72301420c 100644
--- a/examples/network/dnslookup/dnslookup.pro
+++ b/examples/network/dnslookup/dnslookup.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
QT = core network
-mac:CONFIG -= app_bundle
-win32:CONFIG += console
+CONFIG += cmdline
HEADERS += dnslookup.h
SOURCES += dnslookup.cpp
diff --git a/examples/network/download/download.pro b/examples/network/download/download.pro
index 2c784c4197..63d80a0e7c 100644
--- a/examples/network/download/download.pro
+++ b/examples/network/download/download.pro
@@ -1,6 +1,5 @@
QT = core network
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/examples/network/downloadmanager/downloadmanager.pro b/examples/network/downloadmanager/downloadmanager.pro
index 68972610fa..cd1a977e5d 100644
--- a/examples/network/downloadmanager/downloadmanager.pro
+++ b/examples/network/downloadmanager/downloadmanager.pro
@@ -1,6 +1,5 @@
QT = core network
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
HEADERS += downloadmanager.h textprogressbar.h
SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp
diff --git a/examples/qmake/precompile/precompile.pro b/examples/qmake/precompile/precompile.pro
index 6a23d82c32..27564cd390 100644
--- a/examples/qmake/precompile/precompile.pro
+++ b/examples/qmake/precompile/precompile.pro
@@ -6,8 +6,7 @@
#! [0]
TEMPLATE = app
LANGUAGE = C++
-CONFIG += console precompile_header
-CONFIG -= app_bundle
+CONFIG += cmdline precompile_header
QT += widgets
# Use Precompiled headers (PCH)
diff --git a/examples/qtconcurrent/map/map.pro b/examples/qtconcurrent/map/map.pro
index 166f596909..7f267beb22 100644
--- a/examples/qtconcurrent/map/map.pro
+++ b/examples/qtconcurrent/map/map.pro
@@ -1,8 +1,7 @@
TEMPLATE = app
TARGET = mapdemo
QT += concurrent
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/examples/qtconcurrent/runfunction/runfunction.pro b/examples/qtconcurrent/runfunction/runfunction.pro
index 5624c87df7..42c05551ba 100644
--- a/examples/qtconcurrent/runfunction/runfunction.pro
+++ b/examples/qtconcurrent/runfunction/runfunction.pro
@@ -1,6 +1,5 @@
QT += concurrent widgets
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/examples/qtconcurrent/wordcount/wordcount.pro b/examples/qtconcurrent/wordcount/wordcount.pro
index 771efadc4a..18545b1a65 100644
--- a/examples/qtconcurrent/wordcount/wordcount.pro
+++ b/examples/qtconcurrent/wordcount/wordcount.pro
@@ -1,6 +1,5 @@
QT += concurrent widgets
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/examples/widgets/statemachine/factorial/factorial.pro b/examples/widgets/statemachine/factorial/factorial.pro
index f200c738ba..bf285acf4d 100644
--- a/examples/widgets/statemachine/factorial/factorial.pro
+++ b/examples/widgets/statemachine/factorial/factorial.pro
@@ -1,6 +1,5 @@
QT = core
-win32: CONFIG += console
-mac:CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/examples/widgets/statemachine/pingpong/pingpong.pro b/examples/widgets/statemachine/pingpong/pingpong.pro
index 7cc27a13f5..18dee0400d 100644
--- a/examples/widgets/statemachine/pingpong/pingpong.pro
+++ b/examples/widgets/statemachine/pingpong/pingpong.pro
@@ -1,6 +1,5 @@
QT = core
-win32: CONFIG += console
-mac:CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES = main.cpp
diff --git a/examples/xml/htmlinfo/htmlinfo.pro b/examples/xml/htmlinfo/htmlinfo.pro
index e106c69b52..8fea3b38dd 100644
--- a/examples/xml/htmlinfo/htmlinfo.pro
+++ b/examples/xml/htmlinfo/htmlinfo.pro
@@ -1,10 +1,9 @@
SOURCES += main.cpp
QT -= gui
-CONFIG -= app_bundle
RESOURCES = resources.qrc
-win32: CONFIG += console
+CONFIG += cmdline
# install
target.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo
diff --git a/examples/xml/xmlstreamlint/xmlstreamlint.pro b/examples/xml/xmlstreamlint/xmlstreamlint.pro
index cf03c4817a..90a6387afe 100644
--- a/examples/xml/xmlstreamlint/xmlstreamlint.pro
+++ b/examples/xml/xmlstreamlint/xmlstreamlint.pro
@@ -1,5 +1,4 @@
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
QT -= gui
SOURCES += main.cpp
diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf
index e000d1026b..b77494ec9b 100644
--- a/mkspecs/common/mac.conf
+++ b/mkspecs/common/mac.conf
@@ -17,7 +17,7 @@ QMAKE_EXTENSION_SHLIB = dylib
QMAKE_EXTENSIONS_AUX_SHLIB = tbd
QMAKE_LIBDIR =
-# The proper SDK sysroot will be automatically prepended
+# sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \
/System/Library/Frameworks/OpenGL.framework/Headers \
/System/Library/Frameworks/AGL.framework/Headers/
diff --git a/mkspecs/features/cmdline.prf b/mkspecs/features/cmdline.prf
new file mode 100644
index 0000000000..f9d90d3a50
--- /dev/null
+++ b/mkspecs/features/cmdline.prf
@@ -0,0 +1,2 @@
+win32: CONFIG *= console
+macos: CONFIG -= app_bundle
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf
index 50a41657d8..8360dd8b38 100644
--- a/mkspecs/features/mac/sdk.prf
+++ b/mkspecs/features/mac/sdk.prf
@@ -33,6 +33,10 @@ QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion)
+sysrootified =
+for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val
+QMAKE_INCDIR_OPENGL = $$sysrootified
+
QMAKESPEC_NAME = $$basename(QMAKESPEC)
# Resolve SDK version of various tools
diff --git a/mkspecs/features/qt_test_helper.prf b/mkspecs/features/qt_test_helper.prf
index 5daa14731d..86b65dd884 100644
--- a/mkspecs/features/qt_test_helper.prf
+++ b/mkspecs/features/qt_test_helper.prf
@@ -16,8 +16,7 @@
# Additionally the helper's executable is suffixed with "_helper" to
# avoid name clashes with its folder.
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
debug_and_release {
CONFIG(debug, debug|release) {
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 3601fe7748..fcefe1381b 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -1060,8 +1060,12 @@
proper include paths, compiler flags and libraries will
automatically be added to the project.
\row \li console \li The target is a Win32 console application (app only). The
- proper include paths, compiler flags and libraries will
- automatically be added to the project.
+ proper include paths, compiler flags and libraries will automatically be
+ added to the project. Consider using the option \c{cmdline} for
+ cross-platform applications.
+ \row \li cmdline \li The target is a cross-platform command line application.
+ On Windows, this implies \c{CONFIG += console}.
+ On macOS, this implies \c{CONFIG -= app_bundle}.
\row \li shared \li{1,2} The target is a shared object/DLL. The proper
include paths, compiler flags and libraries will automatically be
added to the project. Note that \c dll can also be used on all platforms;
@@ -4909,8 +4913,7 @@
\code
TEMPLATE = app
LANGUAGE = C++
- CONFIG += console precompile_header
- CONFIG -= app_bundle
+ CONFIG += cmdline precompile_header
# Use Precompiled headers (PCH)
PRECOMPILED_HEADER = stable.h
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 4cbe06d9dc..7f42fbe09e 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -506,17 +506,14 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
if (opt.startsWith("-Xarch"))
opt = l.at(++lit); // The user has done the right thing and prefixed each part
}
- bool found = false;
for(int x = 0; x < lflags[arch].size(); ++x) {
if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) {
- found = true;
+ lflags[arch].remove(x - 1, 2);
break;
}
}
- if(!found) {
- lflags[arch].append("-framework");
- lflags[arch].append(opt);
- }
+ lflags[arch].append("-framework");
+ lflags[arch].append(opt);
} else {
lflags[arch].append(opt);
}
diff --git a/qmake/qmake.pro b/qmake/qmake.pro
index ebd61751b7..5399e8c298 100644
--- a/qmake/qmake.pro
+++ b/qmake/qmake.pro
@@ -3,8 +3,8 @@
# and the configures.
option(host_build)
-CONFIG += console
-CONFIG -= qt app_bundle
+CONFIG += cmdline
+CONFIG -= qt
DEFINES += \
PROEVALUATOR_FULL \
diff --git a/src/3rdparty/freetype/src/sfnt/pngshim.c b/src/3rdparty/freetype/src/sfnt/pngshim.c
index 16020266af..cd110776c8 100644
--- a/src/3rdparty/freetype/src/sfnt/pngshim.c
+++ b/src/3rdparty/freetype/src/sfnt/pngshim.c
@@ -68,6 +68,7 @@
( ( __clang_major__ >= 4 ) || \
( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \
defined( __OPTIMIZE__ ) && \
+ !defined( __EMSCRIPTEN__ ) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#ifdef __clang__
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 44ab16d300..9e3c89b6a4 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -353,21 +353,6 @@ QT_USE_NAMESPACE
[reflectionDelegate applicationDidBecomeActive:notification];
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationActive);
-/*
- onApplicationChangedActivation(true);
-
- if (!QWidget::mouseGrabber()){
- // Update enter/leave immidiatly, don't wait for a move event. But only
- // if no grab exists (even if the grab points to this widget, it seems, ref X11)
- QPoint qlocal, qglobal;
- QWidget *widgetUnderMouse = 0;
- qt_mac_getTargetForMouseEvent(0, QEvent::Enter, qlocal, qglobal, 0, &widgetUnderMouse);
- QApplicationPrivate::dispatchEnterLeave(widgetUnderMouse, 0);
- qt_last_mouse_receiver = widgetUnderMouse;
- qt_last_native_mouse_receiver = widgetUnderMouse ?
- (widgetUnderMouse->internalWinId() ? widgetUnderMouse : widgetUnderMouse->nativeParentWidget()) : 0;
- }
-*/
}
- (void)applicationDidResignActive:(NSNotification *)notification
@@ -377,15 +362,6 @@ QT_USE_NAMESPACE
[reflectionDelegate applicationDidResignActive:notification];
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationInactive);
-/*
- onApplicationChangedActivation(false);
-
- if (!QWidget::mouseGrabber())
- QApplicationPrivate::dispatchEnterLeave(0, qt_last_mouse_receiver);
- qt_last_mouse_receiver = 0;
- qt_last_native_mouse_receiver = 0;
- qt_button_down = 0;
-*/
}
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
index ebf33cf4e2..9771cd0289 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.h
@@ -168,10 +168,10 @@ public:
uint processEventsCalled;
NSModalSession currentModalSessionCached;
NSModalSession currentModalSession();
- void updateChildrenWorksWhenModal();
void temporarilyStopAllModalSessions();
void beginModalSession(QWindow *widget);
void endModalSession(QWindow *widget);
+ bool hasModalSession() const;
void cleanupModalSessions();
void cancelWaitForMoreEvents();
diff --git a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
index b0f2b6d940..84ffadea83 100644
--- a/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
+++ b/src/plugins/platforms/cocoa/qcocoaeventdispatcher.mm
@@ -672,43 +672,9 @@ NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
return currentModalSessionCached;
}
-static void setChildrenWorksWhenModal(QWindow *window, bool worksWhenModal)
+bool QCocoaEventDispatcherPrivate::hasModalSession() const
{
- Q_UNUSED(window)
- Q_UNUSED(worksWhenModal)
-
- // For NSPanels (but not NSWindows, sadly), we can set the flag
- // worksWhenModal, so that they are active even when they are not modal.
-/*
- ### not ported
- QList<QDialog *> dialogs = window->findChildren<QDialog *>();
- for (int i=0; i<dialogs.size(); ++i){
- NSWindow *window = qt_mac_window_for(dialogs[i]);
- if (window && [window isKindOfClass:[NSPanel class]]) {
- [static_cast<NSPanel *>(window) setWorksWhenModal:worksWhenModal];
- if (worksWhenModal && [window isVisible]){
- [window orderFront:window];
- }
- }
- }
-*/
-}
-
-void QCocoaEventDispatcherPrivate::updateChildrenWorksWhenModal()
-{
- // Make the dialog children of the window
- // active. And make the dialog children of
- // the previous modal dialog unactive again:
- QMacAutoReleasePool pool;
- int size = cocoaModalSessionStack.size();
- if (size > 0){
- if (QWindow *prevModal = cocoaModalSessionStack[size-1].window)
- setChildrenWorksWhenModal(prevModal, true);
- if (size > 1){
- if (QWindow *prevModal = cocoaModalSessionStack[size-2].window)
- setChildrenWorksWhenModal(prevModal, false);
- }
- }
+ return !cocoaModalSessionStack.isEmpty();
}
void QCocoaEventDispatcherPrivate::cleanupModalSessions()
@@ -743,7 +709,6 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions()
cocoaModalSessionStack.remove(i);
}
- updateChildrenWorksWhenModal();
cleanupModalSessionsNeeded = false;
}
@@ -764,7 +729,6 @@ void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window)
// stopped in cleanupModalSessions()).
QCocoaModalSessionInfo info = {window, nullptr, nullptr};
cocoaModalSessionStack.push(info);
- updateChildrenWorksWhenModal();
currentModalSessionCached = nullptr;
}
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index 0a913ef66e..fef72bc496 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -253,7 +253,6 @@ public: // for QNSView
bool m_needsInvalidateShadow;
- bool m_hasModalSession;
bool m_frameStrutEventsEnabled;
QRect m_exposedRect;
int m_registerTouchCount;
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 6bedbb556d..fc772181f0 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -153,7 +153,6 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
, m_inSetStyleMask(false)
, m_menubar(nullptr)
, m_needsInvalidateShadow(false)
- , m_hasModalSession(false)
, m_frameStrutEventsEnabled(false)
, m_registerTouchCount(0)
, m_resizableTransientParent(false)
@@ -304,13 +303,17 @@ void QCocoaWindow::setVisible(bool visible)
{
qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible;
- m_inSetVisible = true;
+ QScopedValueRollback<bool> rollback(m_inSetVisible, true);
QMacAutoReleasePool pool;
QCocoaWindow *parentCocoaWindow = nullptr;
if (window()->transientParent())
parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle());
+ auto eventDispatcher = [] {
+ return static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(qApp->eventDispatcher()));
+ };
+
if (visible) {
// We need to recreate if the modality has changed as the style mask will need updating
recreateWindowIfNeeded();
@@ -351,68 +354,46 @@ void QCocoaWindow::setVisible(bool visible)
applyWindowState(window()->windowStates());
if (window()->windowState() != Qt::WindowMinimized) {
- if ((window()->modality() == Qt::WindowModal
- || window()->type() == Qt::Sheet)
- && parentCocoaWindow) {
- // show the window as a sheet
+ if (parentCocoaWindow && (window()->modality() == Qt::WindowModal || window()->type() == Qt::Sheet)) {
+ // Show the window as a sheet
[parentCocoaWindow->nativeWindow() beginSheet:m_view.window completionHandler:nil];
- } else if (window()->modality() != Qt::NonModal) {
- // show the window as application modal
- QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- Q_ASSERT(cocoaEventDispatcher);
- QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
- cocoaEventDispatcherPrivate->beginModalSession(window());
- m_hasModalSession = true;
- } else if ([m_view.window canBecomeKeyWindow]) {
- QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = nullptr;
- if (cocoaEventDispatcher)
- cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
-
- if (cocoaEventDispatcherPrivate && cocoaEventDispatcherPrivate->cocoaModalSessionStack.isEmpty())
- [m_view.window makeKeyAndOrderFront:nil];
- else
- [m_view.window orderFront:nil];
+ } else if (window()->modality() == Qt::ApplicationModal) {
+ // Show the window as application modal
+ eventDispatcher()->beginModalSession(window());
+ } else if (m_view.window.canBecomeKeyWindow && !eventDispatcher()->hasModalSession()) {
+ [m_view.window makeKeyAndOrderFront:nil];
} else {
[m_view.window orderFront:nil];
}
- // We want the events to properly reach the popup, dialog, and tool
- if ((window()->type() == Qt::Popup || window()->type() == Qt::Dialog || window()->type() == Qt::Tool)
- && [m_view.window isKindOfClass:[NSPanel class]]) {
- ((NSPanel *)m_view.window).worksWhenModal = YES;
- if (!(parentCocoaWindow && window()->transientParent()->isActive()) && window()->type() == Qt::Popup) {
- removeMonitor();
- NSEventMask eventMask = NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown
- | NSEventMaskOtherMouseDown | NSEventMaskMouseMoved;
- monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:eventMask handler:^(NSEvent *e) {
- const auto button = cocoaButton2QtButton(e);
- const auto buttons = currentlyPressedMouseButtons();
- const auto eventType = cocoaEvent2QtMouseEvent(e);
- const auto globalPoint = QCocoaScreen::mapFromNative(NSEvent.mouseLocation);
- const auto localPoint = window()->mapFromGlobal(globalPoint.toPoint());
- QWindowSystemInterface::handleMouseEvent(window(), localPoint, globalPoint, buttons, button, eventType);
- }];
- }
+ // Close popup when clicking outside it
+ if (window()->type() == Qt::Popup && !(parentCocoaWindow && window()->transientParent()->isActive())) {
+ removeMonitor();
+ NSEventMask eventMask = NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown
+ | NSEventMaskOtherMouseDown | NSEventMaskMouseMoved;
+ monitor = [NSEvent addGlobalMonitorForEventsMatchingMask:eventMask handler:^(NSEvent *e) {
+ const auto button = cocoaButton2QtButton(e);
+ const auto buttons = currentlyPressedMouseButtons();
+ const auto eventType = cocoaEvent2QtMouseEvent(e);
+ const auto globalPoint = QCocoaScreen::mapFromNative(NSEvent.mouseLocation);
+ const auto localPoint = window()->mapFromGlobal(globalPoint.toPoint());
+ QWindowSystemInterface::handleMouseEvent(window(), localPoint, globalPoint, buttons, button, eventType);
+ }];
}
}
}
+
// In some cases, e.g. QDockWidget, the content view is hidden before moving to its own
// Cocoa window, and then shown again. Therefore, we test for the view being hidden even
// if it's attached to an NSWindow.
if ([m_view isHidden])
[m_view setHidden:NO];
+
} else {
- // qDebug() << "close" << this;
- QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
- QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = nullptr;
- if (cocoaEventDispatcher)
- cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
+ // Window not visible, hide it
if (isContentView()) {
- if (m_hasModalSession) {
- if (cocoaEventDispatcherPrivate)
- cocoaEventDispatcherPrivate->endModalSession(window());
- m_hasModalSession = false;
+ if (eventDispatcher()->hasModalSession()) {
+ eventDispatcher()->endModalSession(window());
} else {
if ([m_view.window isSheet]) {
Q_ASSERT_X(parentCocoaWindow, "QCocoaWindow", "Window modal dialog has no transient parent.");
@@ -422,8 +403,7 @@ void QCocoaWindow::setVisible(bool visible)
[m_view.window orderOut:nil];
- if (m_view.window == [NSApp keyWindow]
- && !(cocoaEventDispatcherPrivate && cocoaEventDispatcherPrivate->currentModalSession())) {
+ if (m_view.window == [NSApp keyWindow] && !eventDispatcher()->hasModalSession()) {
// Probably because we call runModalSession: outside [NSApp run] in QCocoaEventDispatcher
// (e.g., when show()-ing a modal QDialog instead of exec()-ing it), it can happen that
// the current NSWindow is still key after being ordered out. Then, after checking we
@@ -435,6 +415,7 @@ void QCocoaWindow::setVisible(bool visible)
} else {
[m_view setHidden:YES];
}
+
removeMonitor();
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
@@ -448,8 +429,6 @@ void QCocoaWindow::setVisible(bool visible)
nativeParentWindow.styleMask |= NSWindowStyleMaskResizable;
}
}
-
- m_inSetVisible = false;
}
NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)
diff --git a/src/plugins/platforms/cocoa/qnswindow.h b/src/plugins/platforms/cocoa/qnswindow.h
index 64f1ed0802..dcbcd58901 100644
--- a/src/plugins/platforms/cocoa/qnswindow.h
+++ b/src/plugins/platforms/cocoa/qnswindow.h
@@ -62,6 +62,7 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
@protocol QNSWindowProtocol
@optional
- (BOOL)canBecomeKeyWindow;
+- (BOOL)worksWhenModal;
- (void)sendEvent:(NSEvent*)theEvent;
- (void)closeAndRelease;
- (void)dealloc;
diff --git a/src/plugins/platforms/cocoa/qnswindow.mm b/src/plugins/platforms/cocoa/qnswindow.mm
index c17ad47aba..28a9fa8607 100644
--- a/src/plugins/platforms/cocoa/qnswindow.mm
+++ b/src/plugins/platforms/cocoa/qnswindow.mm
@@ -177,6 +177,19 @@ static bool isMouseEvent(NSEvent *ev)
return canBecomeMain;
}
+- (BOOL)worksWhenModal
+{
+ if ([self isKindOfClass:[QNSPanel class]]) {
+ if (QCocoaWindow *pw = self.platformWindow) {
+ Qt::WindowType type = pw->window()->type();
+ if (type == Qt::Popup || type == Qt::Dialog || type == Qt::Tool)
+ return YES;
+ }
+ }
+
+ return qt_objcDynamicSuper();
+}
+
- (BOOL)isOpaque
{
return self.platformWindow ?
diff --git a/src/tools/moc/util/generate_keywords.pro b/src/tools/moc/util/generate_keywords.pro
index 88e5553f54..2bbc3ced61 100644
--- a/src/tools/moc/util/generate_keywords.pro
+++ b/src/tools/moc/util/generate_keywords.pro
@@ -1,4 +1,4 @@
CONFIG -= moc
-mac:CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += generate_keywords.cpp
diff --git a/tests/auto/corelib/global/qlogging/app/app.pro b/tests/auto/corelib/global/qlogging/app/app.pro
index b90b685749..3ada382ff4 100644
--- a/tests/auto/corelib/global/qlogging/app/app.pro
+++ b/tests/auto/corelib/global/qlogging/app/app.pro
@@ -14,8 +14,7 @@ QT = core
DESTDIR = ./
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
SOURCES += main.cpp
DEFINES += QT_MESSAGELOGCONTEXT
diff --git a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.pro b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.pro
index 3ac3be9c9b..97135d279e 100644
--- a/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.pro
+++ b/tests/auto/corelib/io/qlockfile/qlockfiletesthelper/qlockfile_test_helper.pro
@@ -1,7 +1,6 @@
TARGET = qlockfile_test_helper
SOURCES += qlockfile_test_helper.cpp
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
QT = core
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
index 947dc916f2..2744491151 100644
--- a/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
+++ b/tests/auto/corelib/io/qprocess/fileWriterProcess/fileWriterProcess.pro
@@ -1,5 +1,4 @@
SOURCES = main.cpp
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
QT = core
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
index 8d1fcba624..3d80b668df 100644
--- a/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
+++ b/tests/auto/corelib/io/qprocess/testDetached/testDetached.pro
@@ -1,6 +1,5 @@
SOURCES = main.cpp
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
INSTALLS =
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
index b08371804f..5eaf8dc881 100644
--- a/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
+++ b/tests/auto/corelib/io/qprocess/testExitCodes/testExitCodes.pro
@@ -1,5 +1,5 @@
SOURCES += main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testForwarding/testForwarding.pro b/tests/auto/corelib/io/qprocess/testForwarding/testForwarding.pro
index 45b498c32a..4d91e0cf36 100644
--- a/tests/auto/corelib/io/qprocess/testForwarding/testForwarding.pro
+++ b/tests/auto/corelib/io/qprocess/testForwarding/testForwarding.pro
@@ -1,5 +1,4 @@
SOURCES = main.cpp
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
DESTDIR = ./
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testForwardingHelper/testForwardingHelper.pro b/tests/auto/corelib/io/qprocess/testForwardingHelper/testForwardingHelper.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testForwardingHelper/testForwardingHelper.pro
+++ b/tests/auto/corelib/io/qprocess/testForwardingHelper/testForwardingHelper.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
index 8778da7ffe..ef438d6399 100644
--- a/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
+++ b/tests/auto/corelib/io/qprocess/testGuiProcess/testGuiProcess.pro
@@ -1,5 +1,4 @@
SOURCES += main.cpp
QT += widgets
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
index 7ccc976efc..640ce4cd09 100644
--- a/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessCrash/testProcessCrash.pro
@@ -1,5 +1,5 @@
SOURCES = main.cpp
-CONFIG += console
-CONFIG -= qt app_bundle
+CONFIG += cmdline
+CONFIG -= qt
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
index fbb3411d47..c7be60a82d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessDeadWhileReading/testProcessDeadWhileReading.pro
@@ -1,5 +1,5 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
index 98fe78c8b9..ab1394a5c9 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEOF/testProcessEOF.pro
@@ -1,6 +1,6 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
win32:!mingw:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho/testProcessEcho.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho2/testProcessEcho2.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEcho3/testProcessEcho3.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
index a07ae00605..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessEnvironment/testProcessEnvironment.pro
@@ -1,8 +1,4 @@
SOURCES = main.cpp
CONFIG -= qt
-CONFIG += console
+CONFIG += cmdline
DESTDIR = ./
-
-mac {
- CONFIG -= app_bundle
-}
diff --git a/tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang.pro b/tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessHang/testProcessHang.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
index c6db9d1bac..7e1119c117 100644
--- a/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessNormal/testProcessNormal.pro
@@ -1,6 +1,6 @@
SOURCES = main.cpp
-CONFIG += console
-CONFIG -= qt app_bundle
+CONFIG += cmdline
+CONFIG -= qt
DESTDIR = ./
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
index 95191098bd..0bbb6b3c0e 100644
--- a/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessOutput/testProcessOutput.pro
@@ -1,5 +1,5 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
index dd7e8e4a85..7954a2f74b 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/nospace.pro
@@ -1,6 +1,6 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-nospace
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
index d18a683e1c..44a365c9a5 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/onespace.pro
@@ -1,6 +1,6 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-onespace
diff --git a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
index 8b16f65e34..bd2db9fb6d 100644
--- a/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
+++ b/tests/auto/corelib/io/qprocess/testProcessSpacesArgs/twospaces.pro
@@ -1,6 +1,6 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-twospaces
diff --git a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/testSetNamedPipeHandleState.pro b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/testSetNamedPipeHandleState.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/testSetNamedPipeHandleState.pro
+++ b/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/testSetNamedPipeHandleState.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
index 21a115b536..4d91e0cf36 100644
--- a/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
+++ b/tests/auto/corelib/io/qprocess/testSetWorkingDirectory/testSetWorkingDirectory.pro
@@ -1,5 +1,4 @@
SOURCES = main.cpp
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
DESTDIR = ./
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
index 80e8bcad98..2cfcb4794e 100644
--- a/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
+++ b/tests/auto/corelib/io/qprocess/testSoftExit/testSoftExit.pro
@@ -6,7 +6,7 @@ unix {
SOURCES = main_unix.cpp
}
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
QT = core
diff --git a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
index afa4f32a85..48f28c4c8b 100644
--- a/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
+++ b/tests/auto/corelib/io/qprocess/testSpaceInName/testSpaceInName.pro
@@ -1,9 +1,5 @@
SOURCES = main.cpp
CONFIG -= qt
-CONFIG += console
+CONFIG += cmdline
DESTDIR = "../test Space In Name"
-
-mac {
- CONFIG -= app_bundle
-}
QT = core
diff --git a/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/readAllStdinProcess.pro b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
index 4a4c091dcb..f2b5aa619f 100644
--- a/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
+++ b/tests/auto/corelib/serialization/qtextstream/readAllStdinProcess/readAllStdinProcess.pro
@@ -1,7 +1,6 @@
SOURCES += main.cpp
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
DESTDIR = ./
# This app is testdata for tst_qtextstream
diff --git a/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/readLineStdinProcess.pro b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
index 4a4c091dcb..f2b5aa619f 100644
--- a/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
+++ b/tests/auto/corelib/serialization/qtextstream/readLineStdinProcess/readLineStdinProcess.pro
@@ -1,7 +1,6 @@
SOURCES += main.cpp
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
DESTDIR = ./
# This app is testdata for tst_qtextstream
diff --git a/tests/auto/corelib/serialization/qtextstream/stdinProcess/stdinProcess.pro b/tests/auto/corelib/serialization/qtextstream/stdinProcess/stdinProcess.pro
index 4a4c091dcb..f2b5aa619f 100644
--- a/tests/auto/corelib/serialization/qtextstream/stdinProcess/stdinProcess.pro
+++ b/tests/auto/corelib/serialization/qtextstream/stdinProcess/stdinProcess.pro
@@ -1,7 +1,6 @@
SOURCES += main.cpp
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
DESTDIR = ./
# This app is testdata for tst_qtextstream
diff --git a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
index d5c09ebc84..57bd78bcee 100644
--- a/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
+++ b/tests/auto/corelib/thread/qthreadstorage/crashonexit/crashonexit.pro
@@ -9,8 +9,7 @@ debug_and_release {
TARGET = ../crashOnExit_helper
}
QT = core
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
# This app is testdata for tst_qthreadstorage
target.path = $$[QT_INSTALL_TESTS]/tst_qthreadstorage/$$TARGET
diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.pro b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.pro
index dce1ac0d37..5020658835 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.pro
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.pro
@@ -1,5 +1,4 @@
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
QT = core
DESTDIR = ./
diff --git a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
index b61f51d53a..3e283c05a4 100644
--- a/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
+++ b/tests/auto/corelib/tools/qlocale/syslocaleapp/syslocaleapp.pro
@@ -1,8 +1,7 @@
SOURCES += syslocaleapp.cpp
DESTDIR = ./
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
QT = core
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 4dc620e6ab..d1bb89f549 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -470,9 +470,8 @@ namespace QTest {
"TEMPLATE = app\n"
"\n"
"TARGET = externaltest\n"
- "CONFIG -= app_bundle\n" // for the Mac
"CONFIG -= debug_and_release\n"
- "CONFIG += console\n"
+ "CONFIG += cmdline\n"
"DESTDIR = .\n"
"OBJECTS_DIR = .\n"
"UI_DIR = .\n"
diff --git a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
index 206522b557..a876cbfa33 100644
--- a/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
+++ b/tests/auto/dbus/qdbusabstractinterface/qpinger/qpinger.pro
@@ -2,6 +2,5 @@ SOURCES = qpinger.cpp ../interface.cpp
HEADERS = ../interface.h
TARGET = qpinger
DESTDIR = ./
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
QT = core dbus
diff --git a/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro b/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
index 57f8b2a598..97a5e7e19d 100644
--- a/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
+++ b/tests/auto/dbus/qdbusmarshall/qpong/qpong.pro
@@ -2,6 +2,4 @@ SOURCES = qpong.cpp
TARGET = qpong
DESTDIR = ./
QT = core dbus
-CONFIG -= app_bundle
-CONFIG += console
-
+CONFIG += cmdline
diff --git a/tests/auto/gui/qopengl/qopengl.pro b/tests/auto/gui/qopengl/qopengl.pro
index d744d37280..722c99ee0b 100644
--- a/tests/auto/gui/qopengl/qopengl.pro
+++ b/tests/auto/gui/qopengl/qopengl.pro
@@ -8,4 +8,4 @@ QT += gui-private core-private testlib
SOURCES += tst_qopengl.cpp
-linux:qtConfig(xcb):qtConfig(xcb-glx):qtConfig(xcb-xlib):!qtConfig(egl): DEFINES += USE_GLX
+linux:qtConfig(xcb):qtConfig(xcb-glx-plugin): DEFINES += USE_GLX
diff --git a/tests/auto/network/access/qnetworkreply/echo/echo.pro b/tests/auto/network/access/qnetworkreply/echo/echo.pro
index 1f05fd9a54..3e304f4105 100644
--- a/tests/auto/network/access/qnetworkreply/echo/echo.pro
+++ b/tests/auto/network/access/qnetworkreply/echo/echo.pro
@@ -1,4 +1,4 @@
SOURCES += main.cpp
QT = core
-CONFIG -= app_bundle debug_and_release_target
-CONFIG += console
+CONFIG -= debug_and_release_target
+CONFIG += cmdline
diff --git a/tests/auto/network/bearer/qnetworksession/lackey/lackey.pro b/tests/auto/network/bearer/qnetworksession/lackey/lackey.pro
index 1605b31d94..dd83d905e6 100644
--- a/tests/auto/network/bearer/qnetworksession/lackey/lackey.pro
+++ b/tests/auto/network/bearer/qnetworksession/lackey/lackey.pro
@@ -5,5 +5,4 @@ QT = core network
DESTDIR = ./
-win32:CONFIG += console
-mac:CONFIG -= app_bundle
+CONFIG += cmdline
diff --git a/tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess.pro b/tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess.pro
index 643c4c5733..e11ed5644b 100644
--- a/tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess.pro
+++ b/tests/auto/network/socket/qlocalsocket/socketprocess/socketprocess.pro
@@ -3,7 +3,6 @@ QT = core network testlib
DESTDIR = ./
TARGET = socketprocess
-win32:CONFIG += console
-mac:CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/tests/auto/network/socket/qtcpsocket/stressTest/stressTest.pro b/tests/auto/network/socket/qtcpsocket/stressTest/stressTest.pro
index 2eb00593e0..6afc008e7d 100644
--- a/tests/auto/network/socket/qtcpsocket/stressTest/stressTest.pro
+++ b/tests/auto/network/socket/qtcpsocket/stressTest/stressTest.pro
@@ -2,8 +2,7 @@ HEADERS += Test.h
SOURCES += main.cpp Test.cpp
QT = core network testlib
-CONFIG -= app_bundle
-CONFIG += console
+CONFIG += cmdline
DESTDIR = ./
MOC_DIR = .moc/
TMP_DIR = .tmp/
diff --git a/tests/auto/network/socket/qudpsocket/clientserver/clientserver.pro b/tests/auto/network/socket/qudpsocket/clientserver/clientserver.pro
index a1b0021232..83a31b11e9 100644
--- a/tests/auto/network/socket/qudpsocket/clientserver/clientserver.pro
+++ b/tests/auto/network/socket/qudpsocket/clientserver/clientserver.pro
@@ -1,6 +1,5 @@
QT = core network
SOURCES += main.cpp
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TARGET = clientserver
DESTDIR = ./
diff --git a/tests/auto/network/socket/qudpsocket/udpServer/udpServer.pro b/tests/auto/network/socket/qudpsocket/udpServer/udpServer.pro
index cf707aa14a..c8f9ebf648 100644
--- a/tests/auto/network/socket/qudpsocket/udpServer/udpServer.pro
+++ b/tests/auto/network/socket/qudpsocket/udpServer/udpServer.pro
@@ -1,5 +1,3 @@
SOURCES += main.cpp
QT = core network
-CONFIG -= app_bundle
-CONFIG += console
-
+CONFIG += cmdline
diff --git a/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro b/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro
index e236e05c7d..6a23e52d95 100644
--- a/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro
+++ b/tests/auto/other/qprocess_and_guieventloop/write-read-write/write-read-write.pro
@@ -1,4 +1,4 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
DESTDIR = ./
diff --git a/tests/baselineserver/src/baselineserver.pro b/tests/baselineserver/src/baselineserver.pro
index a77014c1e6..2d8438cb51 100644
--- a/tests/baselineserver/src/baselineserver.pro
+++ b/tests/baselineserver/src/baselineserver.pro
@@ -5,8 +5,7 @@ QT += core network
TARGET = baselineserver
DESTDIR = ../bin
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TEMPLATE = app
diff --git a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
index cb8dfdcdcb..a0230e1cb8 100644
--- a/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
+++ b/tests/benchmarks/corelib/io/qprocess/testProcessLoopback/testProcessLoopback.pro
@@ -1,5 +1,5 @@
SOURCES = main.cpp
-CONFIG -= qt app_bundle
-CONFIG += console
+CONFIG -= qt
+CONFIG += cmdline
winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup
DESTDIR = ./
diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
index 9c55de8b47..cf9d640f7e 100644
--- a/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
+++ b/tests/benchmarks/corelib/tools/qcryptographichash/qcryptographichash.pro
@@ -1,5 +1,5 @@
TARGET = tst_bench_qcryptographichash
-CONFIG -= debug app_bundle
-CONFIG += release console
+CONFIG -= debug
+CONFIG += release cmdline
QT = core testlib
SOURCES += main.cpp
diff --git a/tests/manual/embeddedintoforeignwindow/embeddedintoforeignwindow.pro b/tests/manual/embeddedintoforeignwindow/embeddedintoforeignwindow.pro
index 93da4b8c91..dba33a139e 100644
--- a/tests/manual/embeddedintoforeignwindow/embeddedintoforeignwindow.pro
+++ b/tests/manual/embeddedintoforeignwindow/embeddedintoforeignwindow.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
QT += gui-private
-CONFIG += console c++11
-CONFIG -= app_bundle
+CONFIG += cmdline c++11
SOURCES += main.cpp itemwindow.cpp
HEADERS += itemwindow.h
include(../diaglib/diaglib.pri)
diff --git a/tests/manual/filetest/filetest.pro b/tests/manual/filetest/filetest.pro
index 5d2ba9b82b..b91689e0ff 100644
--- a/tests/manual/filetest/filetest.pro
+++ b/tests/manual/filetest/filetest.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/tests/manual/foreignwindows/foreignwindows.pro b/tests/manual/foreignwindows/foreignwindows.pro
index 6a370a6813..15bf2395f8 100644
--- a/tests/manual/foreignwindows/foreignwindows.pro
+++ b/tests/manual/foreignwindows/foreignwindows.pro
@@ -1,6 +1,5 @@
TEMPLATE = app
QT += widgets
-CONFIG += console c++11
-CONFIG -= app_bundle
+CONFIG += cmdline c++11
SOURCES += main.cpp
include(../diaglib/diaglib.pri)
diff --git a/tests/manual/highdpi/highdpi.pro b/tests/manual/highdpi/highdpi.pro
index 7d6b42535e..9db083cd82 100644
--- a/tests/manual/highdpi/highdpi.pro
+++ b/tests/manual/highdpi/highdpi.pro
@@ -2,8 +2,7 @@ TEMPLATE = app
TARGET = highdpi
INCLUDEPATH += .
QT += widgets gui-private
-CONFIG +=console
-CONFIG -= app_bundle
+CONFIG += cmdline
CONFIG += c++11
# Input
SOURCES += \
diff --git a/tests/manual/lance/lance.pro b/tests/manual/lance/lance.pro
index 312106c2f0..78ca2f56e5 100644
--- a/tests/manual/lance/lance.pro
+++ b/tests/manual/lance/lance.pro
@@ -1,6 +1,5 @@
LANCELOT_DIR = $$PWD/../../auto/other/lancelot
-CONFIG+=console moc
-CONFIG -= app_bundle
+CONFIG += cmdline moc
TEMPLATE = app
INCLUDEPATH += . $$LANCELOT_DIR
QT += core-private gui-private widgets printsupport
diff --git a/tests/manual/qdesktopservices/qdesktopservices.pro b/tests/manual/qdesktopservices/qdesktopservices.pro
index c96287e159..baa3c325ff 100644
--- a/tests/manual/qdesktopservices/qdesktopservices.pro
+++ b/tests/manual/qdesktopservices/qdesktopservices.pro
@@ -1,8 +1,7 @@
QT += testlib
TARGET = tst_qdesktopservices
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
TEMPLATE = app
diff --git a/tests/manual/qmimedatabase/qmimedatabase.pro b/tests/manual/qmimedatabase/qmimedatabase.pro
index 5473330edf..fd931d5eec 100644
--- a/tests/manual/qmimedatabase/qmimedatabase.pro
+++ b/tests/manual/qmimedatabase/qmimedatabase.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/tests/manual/qstorageinfo/qstorageinfo.pro b/tests/manual/qstorageinfo/qstorageinfo.pro
index 25acd24c80..e47ecc5b3e 100644
--- a/tests/manual/qstorageinfo/qstorageinfo.pro
+++ b/tests/manual/qstorageinfo/qstorageinfo.pro
@@ -1,4 +1,3 @@
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/tests/manual/qsysinfo/qsysinfo.pro b/tests/manual/qsysinfo/qsysinfo.pro
index c73d8282cb..ff0a09d42e 100644
--- a/tests/manual/qsysinfo/qsysinfo.pro
+++ b/tests/manual/qsysinfo/qsysinfo.pro
@@ -1,7 +1,6 @@
QT = core
TARGET = qsysinfo
TEMPLATE = app
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
SOURCES += main.cpp
diff --git a/tests/manual/widgets/styles/styles.pro b/tests/manual/widgets/styles/styles.pro
index ef8217a9a3..d302ae0691 100644
--- a/tests/manual/widgets/styles/styles.pro
+++ b/tests/manual/widgets/styles/styles.pro
@@ -1,7 +1,6 @@
TEMPLATE = app
QT = widgets
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
CONFIG += c++11
SOURCES += main.cpp
diff --git a/util/glgen/glgen.pro b/util/glgen/glgen.pro
index 11018e942d..22c377e5f1 100644
--- a/util/glgen/glgen.pro
+++ b/util/glgen/glgen.pro
@@ -1,6 +1,5 @@
QT -= gui
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline
# Uncomment following to enable debug output
#DEFINES += SPECPARSER_DEBUG
diff --git a/util/gradientgen/tobinaryjson.pro b/util/gradientgen/tobinaryjson.pro
index 8ed3509278..8aa9d0d008 100644
--- a/util/gradientgen/tobinaryjson.pro
+++ b/util/gradientgen/tobinaryjson.pro
@@ -1,4 +1,3 @@
SOURCES += tobinaryjson.cpp
QT = core
-CONFIG += console
-CONFIG -= app_bundle
+CONFIG += cmdline