Merge remote-tracking branch 'origin/5.12' into 5.13

Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
This commit is contained in:
Qt Forward Merge Bot 2019-02-19 01:00:07 +01:00
commit 67c70b22f6
89 changed files with 165 additions and 286 deletions

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui QT -= gui
TARGET = cbordump TARGET = cbordump
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui QT -= gui
TARGET = convert TARGET = convert
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app

View File

@ -2,8 +2,7 @@ QT += core
QT -= gui QT -= gui
TARGET = savegame TARGET = savegame
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app

View File

@ -1,8 +1,7 @@
SOURCES += semaphores.cpp SOURCES += semaphores.cpp
QT = core QT = core
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
# install # install
target.path = $$[QT_INSTALL_EXAMPLES]/corelib/threads/semaphores target.path = $$[QT_INSTALL_EXAMPLES]/corelib/threads/semaphores

View File

@ -1,6 +1,6 @@
QT = core QT = core
CONFIG -= moc app_bundle CONFIG -= moc
CONFIG += console CONFIG += cmdline
SOURCES += waitconditions.cpp SOURCES += waitconditions.cpp

View File

@ -1,7 +1,6 @@
TEMPLATE = app TEMPLATE = app
QT = core network QT = core network
mac:CONFIG -= app_bundle CONFIG += cmdline
win32:CONFIG += console
HEADERS += dnslookup.h HEADERS += dnslookup.h
SOURCES += dnslookup.cpp SOURCES += dnslookup.cpp

View File

@ -1,6 +1,5 @@
QT = core network QT = core network
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT = core network QT = core network
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
HEADERS += downloadmanager.h textprogressbar.h HEADERS += downloadmanager.h textprogressbar.h
SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp SOURCES += downloadmanager.cpp main.cpp textprogressbar.cpp

View File

@ -6,8 +6,7 @@
#! [0] #! [0]
TEMPLATE = app TEMPLATE = app
LANGUAGE = C++ LANGUAGE = C++
CONFIG += console precompile_header CONFIG += cmdline precompile_header
CONFIG -= app_bundle
QT += widgets QT += widgets
# Use Precompiled headers (PCH) # Use Precompiled headers (PCH)

View File

@ -1,8 +1,7 @@
TEMPLATE = app TEMPLATE = app
TARGET = mapdemo TARGET = mapdemo
QT += concurrent QT += concurrent
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT += concurrent widgets QT += concurrent widgets
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT += concurrent widgets QT += concurrent widgets
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT = core QT = core
win32: CONFIG += console CONFIG += cmdline
mac:CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT = core QT = core
win32: CONFIG += console CONFIG += cmdline
mac:CONFIG -= app_bundle
SOURCES = main.cpp SOURCES = main.cpp

View File

@ -1,10 +1,9 @@
SOURCES += main.cpp SOURCES += main.cpp
QT -= gui QT -= gui
CONFIG -= app_bundle
RESOURCES = resources.qrc RESOURCES = resources.qrc
win32: CONFIG += console CONFIG += cmdline
# install # install
target.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo target.path = $$[QT_INSTALL_EXAMPLES]/xml/htmlinfo

View File

@ -1,5 +1,4 @@
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
QT -= gui QT -= gui
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -17,7 +17,7 @@ QMAKE_EXTENSION_SHLIB = dylib
QMAKE_EXTENSIONS_AUX_SHLIB = tbd QMAKE_EXTENSIONS_AUX_SHLIB = tbd
QMAKE_LIBDIR = QMAKE_LIBDIR =
# The proper SDK sysroot will be automatically prepended # sdk.prf will prefix the proper SDK sysroot
QMAKE_INCDIR_OPENGL = \ QMAKE_INCDIR_OPENGL = \
/System/Library/Frameworks/OpenGL.framework/Headers \ /System/Library/Frameworks/OpenGL.framework/Headers \
/System/Library/Frameworks/AGL.framework/Headers/ /System/Library/Frameworks/AGL.framework/Headers/

View File

@ -0,0 +1,2 @@
win32: CONFIG *= console
macos: CONFIG -= app_bundle

View File

@ -33,6 +33,10 @@ QMAKE_MAC_SDK_PATH = $$xcodeSDKInfo(Path)
QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath) QMAKE_MAC_SDK_PLATFORM_PATH = $$xcodeSDKInfo(PlatformPath)
QMAKE_MAC_SDK_VERSION = $$xcodeSDKInfo(SDKVersion) 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) QMAKESPEC_NAME = $$basename(QMAKESPEC)
# Resolve SDK version of various tools # Resolve SDK version of various tools

View File

@ -16,8 +16,7 @@
# Additionally the helper's executable is suffixed with "_helper" to # Additionally the helper's executable is suffixed with "_helper" to
# avoid name clashes with its folder. # avoid name clashes with its folder.
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
debug_and_release { debug_and_release {
CONFIG(debug, debug|release) { CONFIG(debug, debug|release) {

View File

@ -1060,8 +1060,12 @@
proper include paths, compiler flags and libraries will proper include paths, compiler flags and libraries will
automatically be added to the project. automatically be added to the project.
\row \li console \li The target is a Win32 console application (app only). The \row \li console \li The target is a Win32 console application (app only). The
proper include paths, compiler flags and libraries will proper include paths, compiler flags and libraries will automatically be
automatically be added to the project. 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 \row \li shared \li{1,2} The target is a shared object/DLL. The proper
include paths, compiler flags and libraries will automatically be include paths, compiler flags and libraries will automatically be
added to the project. Note that \c dll can also be used on all platforms; added to the project. Note that \c dll can also be used on all platforms;
@ -4909,8 +4913,7 @@
\code \code
TEMPLATE = app TEMPLATE = app
LANGUAGE = C++ LANGUAGE = C++
CONFIG += console precompile_header CONFIG += cmdline precompile_header
CONFIG -= app_bundle
# Use Precompiled headers (PCH) # Use Precompiled headers (PCH)
PRECOMPILED_HEADER = stable.h PRECOMPILED_HEADER = stable.h

View File

@ -506,17 +506,14 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
if (opt.startsWith("-Xarch")) if (opt.startsWith("-Xarch"))
opt = l.at(++lit); // The user has done the right thing and prefixed each part 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) { for(int x = 0; x < lflags[arch].size(); ++x) {
if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) { if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) {
found = true; lflags[arch].remove(x - 1, 2);
break; break;
} }
} }
if(!found) {
lflags[arch].append("-framework"); lflags[arch].append("-framework");
lflags[arch].append(opt); lflags[arch].append(opt);
}
} else { } else {
lflags[arch].append(opt); lflags[arch].append(opt);
} }

View File

@ -3,8 +3,8 @@
# and the configures. # and the configures.
option(host_build) option(host_build)
CONFIG += console CONFIG += cmdline
CONFIG -= qt app_bundle CONFIG -= qt
DEFINES += \ DEFINES += \
PROEVALUATOR_FULL \ PROEVALUATOR_FULL \

View File

@ -68,6 +68,7 @@
( ( __clang_major__ >= 4 ) || \ ( ( __clang_major__ >= 4 ) || \
( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \ ( ( __clang_major__ == 3 ) && ( __clang_minor__ >= 2 ) ) ) ) ) && \
defined( __OPTIMIZE__ ) && \ defined( __OPTIMIZE__ ) && \
!defined( __EMSCRIPTEN__ ) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#ifdef __clang__ #ifdef __clang__

View File

@ -353,21 +353,6 @@ QT_USE_NAMESPACE
[reflectionDelegate applicationDidBecomeActive:notification]; [reflectionDelegate applicationDidBecomeActive:notification];
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationActive); 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 - (void)applicationDidResignActive:(NSNotification *)notification
@ -377,15 +362,6 @@ QT_USE_NAMESPACE
[reflectionDelegate applicationDidResignActive:notification]; [reflectionDelegate applicationDidResignActive:notification];
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationInactive); 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 - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag

View File

@ -168,10 +168,10 @@ public:
uint processEventsCalled; uint processEventsCalled;
NSModalSession currentModalSessionCached; NSModalSession currentModalSessionCached;
NSModalSession currentModalSession(); NSModalSession currentModalSession();
void updateChildrenWorksWhenModal();
void temporarilyStopAllModalSessions(); void temporarilyStopAllModalSessions();
void beginModalSession(QWindow *widget); void beginModalSession(QWindow *widget);
void endModalSession(QWindow *widget); void endModalSession(QWindow *widget);
bool hasModalSession() const;
void cleanupModalSessions(); void cleanupModalSessions();
void cancelWaitForMoreEvents(); void cancelWaitForMoreEvents();

View File

@ -672,43 +672,9 @@ NSModalSession QCocoaEventDispatcherPrivate::currentModalSession()
return currentModalSessionCached; return currentModalSessionCached;
} }
static void setChildrenWorksWhenModal(QWindow *window, bool worksWhenModal) bool QCocoaEventDispatcherPrivate::hasModalSession() const
{ {
Q_UNUSED(window) return !cocoaModalSessionStack.isEmpty();
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);
}
}
} }
void QCocoaEventDispatcherPrivate::cleanupModalSessions() void QCocoaEventDispatcherPrivate::cleanupModalSessions()
@ -743,7 +709,6 @@ void QCocoaEventDispatcherPrivate::cleanupModalSessions()
cocoaModalSessionStack.remove(i); cocoaModalSessionStack.remove(i);
} }
updateChildrenWorksWhenModal();
cleanupModalSessionsNeeded = false; cleanupModalSessionsNeeded = false;
} }
@ -764,7 +729,6 @@ void QCocoaEventDispatcherPrivate::beginModalSession(QWindow *window)
// stopped in cleanupModalSessions()). // stopped in cleanupModalSessions()).
QCocoaModalSessionInfo info = {window, nullptr, nullptr}; QCocoaModalSessionInfo info = {window, nullptr, nullptr};
cocoaModalSessionStack.push(info); cocoaModalSessionStack.push(info);
updateChildrenWorksWhenModal();
currentModalSessionCached = nullptr; currentModalSessionCached = nullptr;
} }

View File

@ -253,7 +253,6 @@ public: // for QNSView
bool m_needsInvalidateShadow; bool m_needsInvalidateShadow;
bool m_hasModalSession;
bool m_frameStrutEventsEnabled; bool m_frameStrutEventsEnabled;
QRect m_exposedRect; QRect m_exposedRect;
int m_registerTouchCount; int m_registerTouchCount;

View File

@ -153,7 +153,6 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
, m_inSetStyleMask(false) , m_inSetStyleMask(false)
, m_menubar(nullptr) , m_menubar(nullptr)
, m_needsInvalidateShadow(false) , m_needsInvalidateShadow(false)
, m_hasModalSession(false)
, m_frameStrutEventsEnabled(false) , m_frameStrutEventsEnabled(false)
, m_registerTouchCount(0) , m_registerTouchCount(0)
, m_resizableTransientParent(false) , m_resizableTransientParent(false)
@ -304,13 +303,17 @@ void QCocoaWindow::setVisible(bool visible)
{ {
qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible; qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible;
m_inSetVisible = true; QScopedValueRollback<bool> rollback(m_inSetVisible, true);
QMacAutoReleasePool pool; QMacAutoReleasePool pool;
QCocoaWindow *parentCocoaWindow = nullptr; QCocoaWindow *parentCocoaWindow = nullptr;
if (window()->transientParent()) if (window()->transientParent())
parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle()); parentCocoaWindow = static_cast<QCocoaWindow *>(window()->transientParent()->handle());
auto eventDispatcher = [] {
return static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(qApp->eventDispatcher()));
};
if (visible) { if (visible) {
// We need to recreate if the modality has changed as the style mask will need updating // We need to recreate if the modality has changed as the style mask will need updating
recreateWindowIfNeeded(); recreateWindowIfNeeded();
@ -351,37 +354,20 @@ void QCocoaWindow::setVisible(bool visible)
applyWindowState(window()->windowStates()); applyWindowState(window()->windowStates());
if (window()->windowState() != Qt::WindowMinimized) { if (window()->windowState() != Qt::WindowMinimized) {
if ((window()->modality() == Qt::WindowModal if (parentCocoaWindow && (window()->modality() == Qt::WindowModal || window()->type() == Qt::Sheet)) {
|| window()->type() == Qt::Sheet) // Show the window as a sheet
&& parentCocoaWindow) {
// show the window as a sheet
[parentCocoaWindow->nativeWindow() beginSheet:m_view.window completionHandler:nil]; [parentCocoaWindow->nativeWindow() beginSheet:m_view.window completionHandler:nil];
} else if (window()->modality() != Qt::NonModal) { } else if (window()->modality() == Qt::ApplicationModal) {
// show the window as application modal // Show the window as application modal
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher()); eventDispatcher()->beginModalSession(window());
Q_ASSERT(cocoaEventDispatcher); } else if (m_view.window.canBecomeKeyWindow && !eventDispatcher()->hasModalSession()) {
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]; [m_view.window makeKeyAndOrderFront:nil];
else
[m_view.window orderFront:nil];
} else { } else {
[m_view.window orderFront:nil]; [m_view.window orderFront:nil];
} }
// We want the events to properly reach the popup, dialog, and tool // Close popup when clicking outside it
if ((window()->type() == Qt::Popup || window()->type() == Qt::Dialog || window()->type() == Qt::Tool) if (window()->type() == Qt::Popup && !(parentCocoaWindow && window()->transientParent()->isActive())) {
&& [m_view.window isKindOfClass:[NSPanel class]]) {
((NSPanel *)m_view.window).worksWhenModal = YES;
if (!(parentCocoaWindow && window()->transientParent()->isActive()) && window()->type() == Qt::Popup) {
removeMonitor(); removeMonitor();
NSEventMask eventMask = NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown NSEventMask eventMask = NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown
| NSEventMaskOtherMouseDown | NSEventMaskMouseMoved; | NSEventMaskOtherMouseDown | NSEventMaskMouseMoved;
@ -396,23 +382,18 @@ void QCocoaWindow::setVisible(bool visible)
} }
} }
} }
}
// In some cases, e.g. QDockWidget, the content view is hidden before moving to its own // 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 // Cocoa window, and then shown again. Therefore, we test for the view being hidden even
// if it's attached to an NSWindow. // if it's attached to an NSWindow.
if ([m_view isHidden]) if ([m_view isHidden])
[m_view setHidden:NO]; [m_view setHidden:NO];
} else { } else {
// qDebug() << "close" << this; // Window not visible, hide it
QCocoaEventDispatcher *cocoaEventDispatcher = qobject_cast<QCocoaEventDispatcher *>(QGuiApplication::instance()->eventDispatcher());
QCocoaEventDispatcherPrivate *cocoaEventDispatcherPrivate = nullptr;
if (cocoaEventDispatcher)
cocoaEventDispatcherPrivate = static_cast<QCocoaEventDispatcherPrivate *>(QObjectPrivate::get(cocoaEventDispatcher));
if (isContentView()) { if (isContentView()) {
if (m_hasModalSession) { if (eventDispatcher()->hasModalSession()) {
if (cocoaEventDispatcherPrivate) eventDispatcher()->endModalSession(window());
cocoaEventDispatcherPrivate->endModalSession(window());
m_hasModalSession = false;
} else { } else {
if ([m_view.window isSheet]) { if ([m_view.window isSheet]) {
Q_ASSERT_X(parentCocoaWindow, "QCocoaWindow", "Window modal dialog has no transient parent."); 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]; [m_view.window orderOut:nil];
if (m_view.window == [NSApp keyWindow] if (m_view.window == [NSApp keyWindow] && !eventDispatcher()->hasModalSession()) {
&& !(cocoaEventDispatcherPrivate && cocoaEventDispatcherPrivate->currentModalSession())) {
// Probably because we call runModalSession: outside [NSApp run] in QCocoaEventDispatcher // 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 // (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 // the current NSWindow is still key after being ordered out. Then, after checking we
@ -435,6 +415,7 @@ void QCocoaWindow::setVisible(bool visible)
} else { } else {
[m_view setHidden:YES]; [m_view setHidden:YES];
} }
removeMonitor(); removeMonitor();
if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip) if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
@ -448,8 +429,6 @@ void QCocoaWindow::setVisible(bool visible)
nativeParentWindow.styleMask |= NSWindowStyleMaskResizable; nativeParentWindow.styleMask |= NSWindowStyleMaskResizable;
} }
} }
m_inSetVisible = false;
} }
NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags) NSInteger QCocoaWindow::windowLevel(Qt::WindowFlags flags)

View File

@ -62,6 +62,7 @@ QT_FORWARD_DECLARE_CLASS(QCocoaWindow)
@protocol QNSWindowProtocol @protocol QNSWindowProtocol
@optional @optional
- (BOOL)canBecomeKeyWindow; - (BOOL)canBecomeKeyWindow;
- (BOOL)worksWhenModal;
- (void)sendEvent:(NSEvent*)theEvent; - (void)sendEvent:(NSEvent*)theEvent;
- (void)closeAndRelease; - (void)closeAndRelease;
- (void)dealloc; - (void)dealloc;

View File

@ -177,6 +177,19 @@ static bool isMouseEvent(NSEvent *ev)
return canBecomeMain; 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 - (BOOL)isOpaque
{ {
return self.platformWindow ? return self.platformWindow ?

View File

@ -1,4 +1,4 @@
CONFIG -= moc CONFIG -= moc
mac:CONFIG -= app_bundle CONFIG += cmdline
SOURCES += generate_keywords.cpp SOURCES += generate_keywords.cpp

View File

@ -14,8 +14,7 @@ QT = core
DESTDIR = ./ DESTDIR = ./
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
SOURCES += main.cpp SOURCES += main.cpp
DEFINES += QT_MESSAGELOGCONTEXT DEFINES += QT_MESSAGELOGCONTEXT

View File

@ -1,7 +1,6 @@
TARGET = qlockfile_test_helper TARGET = qlockfile_test_helper
SOURCES += qlockfile_test_helper.cpp SOURCES += qlockfile_test_helper.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
QT = core QT = core
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
QT = core QT = core
DESTDIR = ./ DESTDIR = ./

View File

@ -1,6 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
INSTALLS = INSTALLS =
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,5 @@
SOURCES += main.cpp SOURCES += main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
DESTDIR = ./ DESTDIR = ./
QT = core QT = core

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,4 @@
SOURCES += main.cpp SOURCES += main.cpp
QT += widgets QT += widgets
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= qt app_bundle CONFIG -= qt
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,6 +1,6 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
win32:!mingw:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS- win32:!mingw:!equals(TEMPLATE_PREFIX, "vc"):QMAKE_CXXFLAGS += /GS-
DESTDIR = ./ DESTDIR = ./

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,8 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
mac {
CONFIG -= app_bundle
}

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,6 +1,6 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= qt app_bundle CONFIG -= qt
DESTDIR = ./ DESTDIR = ./
QT = core QT = core

View File

@ -1,5 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
QT = core QT = core

View File

@ -1,6 +1,6 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-nospace OBJECTS_DIR = $${OBJECTS_DIR}-nospace
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0

View File

@ -1,6 +1,6 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-onespace OBJECTS_DIR = $${OBJECTS_DIR}-onespace

View File

@ -1,6 +1,6 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
OBJECTS_DIR = $${OBJECTS_DIR}-twospaces OBJECTS_DIR = $${OBJECTS_DIR}-twospaces

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
DESTDIR = ./ DESTDIR = ./
QT = core QT = core

View File

@ -6,7 +6,7 @@ unix {
SOURCES = main_unix.cpp SOURCES = main_unix.cpp
} }
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./
QT = core QT = core

View File

@ -1,9 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = "../test Space In Name" DESTDIR = "../test Space In Name"
mac {
CONFIG -= app_bundle
}
QT = core QT = core

View File

@ -1,7 +1,6 @@
SOURCES += main.cpp SOURCES += main.cpp
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
DESTDIR = ./ DESTDIR = ./
# This app is testdata for tst_qtextstream # This app is testdata for tst_qtextstream

View File

@ -1,7 +1,6 @@
SOURCES += main.cpp SOURCES += main.cpp
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
DESTDIR = ./ DESTDIR = ./
# This app is testdata for tst_qtextstream # This app is testdata for tst_qtextstream

View File

@ -1,7 +1,6 @@
SOURCES += main.cpp SOURCES += main.cpp
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
DESTDIR = ./ DESTDIR = ./
# This app is testdata for tst_qtextstream # This app is testdata for tst_qtextstream

View File

@ -9,8 +9,7 @@ debug_and_release {
TARGET = ../crashOnExit_helper TARGET = ../crashOnExit_helper
} }
QT = core QT = core
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
# This app is testdata for tst_qthreadstorage # This app is testdata for tst_qthreadstorage
target.path = $$[QT_INSTALL_TESTS]/tst_qthreadstorage/$$TARGET target.path = $$[QT_INSTALL_TESTS]/tst_qthreadstorage/$$TARGET

View File

@ -1,5 +1,4 @@
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
QT = core QT = core
DESTDIR = ./ DESTDIR = ./

View File

@ -1,8 +1,7 @@
SOURCES += syslocaleapp.cpp SOURCES += syslocaleapp.cpp
DESTDIR = ./ DESTDIR = ./
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
QT = core QT = core

View File

@ -470,9 +470,8 @@ namespace QTest {
"TEMPLATE = app\n" "TEMPLATE = app\n"
"\n" "\n"
"TARGET = externaltest\n" "TARGET = externaltest\n"
"CONFIG -= app_bundle\n" // for the Mac
"CONFIG -= debug_and_release\n" "CONFIG -= debug_and_release\n"
"CONFIG += console\n" "CONFIG += cmdline\n"
"DESTDIR = .\n" "DESTDIR = .\n"
"OBJECTS_DIR = .\n" "OBJECTS_DIR = .\n"
"UI_DIR = .\n" "UI_DIR = .\n"

View File

@ -2,6 +2,5 @@ SOURCES = qpinger.cpp ../interface.cpp
HEADERS = ../interface.h HEADERS = ../interface.h
TARGET = qpinger TARGET = qpinger
DESTDIR = ./ DESTDIR = ./
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
QT = core dbus QT = core dbus

View File

@ -2,6 +2,4 @@ SOURCES = qpong.cpp
TARGET = qpong TARGET = qpong
DESTDIR = ./ DESTDIR = ./
QT = core dbus QT = core dbus
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console

View File

@ -8,4 +8,4 @@ QT += gui-private core-private testlib
SOURCES += tst_qopengl.cpp 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

View File

@ -1,4 +1,4 @@
SOURCES += main.cpp SOURCES += main.cpp
QT = core QT = core
CONFIG -= app_bundle debug_and_release_target CONFIG -= debug_and_release_target
CONFIG += console CONFIG += cmdline

View File

@ -5,5 +5,4 @@ QT = core network
DESTDIR = ./ DESTDIR = ./
win32:CONFIG += console CONFIG += cmdline
mac:CONFIG -= app_bundle

View File

@ -3,7 +3,6 @@ QT = core network testlib
DESTDIR = ./ DESTDIR = ./
TARGET = socketprocess TARGET = socketprocess
win32:CONFIG += console CONFIG += cmdline
mac:CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -2,8 +2,7 @@ HEADERS += Test.h
SOURCES += main.cpp Test.cpp SOURCES += main.cpp Test.cpp
QT = core network testlib QT = core network testlib
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console
DESTDIR = ./ DESTDIR = ./
MOC_DIR = .moc/ MOC_DIR = .moc/
TMP_DIR = .tmp/ TMP_DIR = .tmp/

View File

@ -1,6 +1,5 @@
QT = core network QT = core network
SOURCES += main.cpp SOURCES += main.cpp
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TARGET = clientserver TARGET = clientserver
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,3 @@
SOURCES += main.cpp SOURCES += main.cpp
QT = core network QT = core network
CONFIG -= app_bundle CONFIG += cmdline
CONFIG += console

View File

@ -1,4 +1,4 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
DESTDIR = ./ DESTDIR = ./

View File

@ -5,8 +5,7 @@ QT += core network
TARGET = baselineserver TARGET = baselineserver
DESTDIR = ../bin DESTDIR = ../bin
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app

View File

@ -1,5 +1,5 @@
SOURCES = main.cpp SOURCES = main.cpp
CONFIG -= qt app_bundle CONFIG -= qt
CONFIG += console CONFIG += cmdline
winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup winrt: QMAKE_LFLAGS += /ENTRY:mainCRTStartup
DESTDIR = ./ DESTDIR = ./

View File

@ -1,5 +1,5 @@
TARGET = tst_bench_qcryptographichash TARGET = tst_bench_qcryptographichash
CONFIG -= debug app_bundle CONFIG -= debug
CONFIG += release console CONFIG += release cmdline
QT = core testlib QT = core testlib
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,7 +1,6 @@
TEMPLATE = app TEMPLATE = app
QT += gui-private QT += gui-private
CONFIG += console c++11 CONFIG += cmdline c++11
CONFIG -= app_bundle
SOURCES += main.cpp itemwindow.cpp SOURCES += main.cpp itemwindow.cpp
HEADERS += itemwindow.h HEADERS += itemwindow.h
include(../diaglib/diaglib.pri) include(../diaglib/diaglib.pri)

View File

@ -1,6 +1,5 @@
TEMPLATE = app TEMPLATE = app
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
TEMPLATE = app TEMPLATE = app
QT += widgets QT += widgets
CONFIG += console c++11 CONFIG += cmdline c++11
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp
include(../diaglib/diaglib.pri) include(../diaglib/diaglib.pri)

View File

@ -2,8 +2,7 @@ TEMPLATE = app
TARGET = highdpi TARGET = highdpi
INCLUDEPATH += . INCLUDEPATH += .
QT += widgets gui-private QT += widgets gui-private
CONFIG +=console CONFIG += cmdline
CONFIG -= app_bundle
CONFIG += c++11 CONFIG += c++11
# Input # Input
SOURCES += \ SOURCES += \

View File

@ -1,6 +1,5 @@
LANCELOT_DIR = $$PWD/../../auto/other/lancelot LANCELOT_DIR = $$PWD/../../auto/other/lancelot
CONFIG+=console moc CONFIG += cmdline moc
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app
INCLUDEPATH += . $$LANCELOT_DIR INCLUDEPATH += . $$LANCELOT_DIR
QT += core-private gui-private widgets printsupport QT += core-private gui-private widgets printsupport

View File

@ -1,8 +1,7 @@
QT += testlib QT += testlib
TARGET = tst_qdesktopservices TARGET = tst_qdesktopservices
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
TEMPLATE = app TEMPLATE = app

View File

@ -1,5 +1,4 @@
TEMPLATE = app TEMPLATE = app
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,4 +1,3 @@
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,7 +1,6 @@
QT = core QT = core
TARGET = qsysinfo TARGET = qsysinfo
TEMPLATE = app TEMPLATE = app
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,7 +1,6 @@
TEMPLATE = app TEMPLATE = app
QT = widgets QT = widgets
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
CONFIG += c++11 CONFIG += c++11
SOURCES += main.cpp SOURCES += main.cpp

View File

@ -1,6 +1,5 @@
QT -= gui QT -= gui
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle
# Uncomment following to enable debug output # Uncomment following to enable debug output
#DEFINES += SPECPARSER_DEBUG #DEFINES += SPECPARSER_DEBUG

View File

@ -1,4 +1,3 @@
SOURCES += tobinaryjson.cpp SOURCES += tobinaryjson.cpp
QT = core QT = core
CONFIG += console CONFIG += cmdline
CONFIG -= app_bundle