From 3295378325c1b4567379d641f05e9eadea35040c Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 10 Jan 2013 11:09:46 +0100 Subject: Minimized, maximized and fullscreen are mutually exclusive. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only if minimized does QWidgetWindow need to remember the previous state. Maybe it's OK to restore from fullscreen to maximized though. Task-number: QTBUG-29030 Change-Id: I1e2724c8811366c9536a3e372ce281e8d473a4ac Reviewed-by: J-P Nurmi Reviewed-by: Samuel Rødal --- src/widgets/kernel/qwidgetwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 78d6a293b9..e9f41be9aa 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -597,12 +597,14 @@ void QWidgetWindow::handleWindowStateChangedEvent(QWindowStateChangeEvent *event if (QTLWExtra *tle = m_widget->d_func()->maybeTopData()) tle->normalGeometry = m_widget->geometry(); widgetState |= Qt::WindowMaximized; + widgetState &= ~(Qt::WindowMinimized | Qt::WindowFullScreen); break; case Qt::WindowFullScreen: if (effectiveState(widgetState) == Qt::WindowNoState) if (QTLWExtra *tle = m_widget->d_func()->maybeTopData()) tle->normalGeometry = m_widget->geometry(); widgetState |= Qt::WindowFullScreen; + widgetState &= ~(Qt::WindowMinimized); break; case Qt::WindowActive: // Not handled by QWindow break; -- cgit v1.2.3 From 7c9c791f79612f1a4c7802e676af07546d454576 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 8 Jan 2013 15:50:54 +0100 Subject: set pkg-config host_bins directly to install dir qmake tries to replace all occurrences of the install prefix with a literal ${prefix}. of course this would mess up build paths which happen to live under the prefix (this is untypical, but still), which would break the sed magic in the subsequent install step. as qmake itself has no use for the .pc files, it's ok to target them directly for the install dir. we do the same with the include and lib dirs already. Task-number: QTBUG-28807 Change-Id: I53d7f0f3b357f67f30bea07554794f60160376cd Reviewed-by: Joerg Bornemann --- src/corelib/corelib.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index f95ee545c0..bf2fd3c84a 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -50,7 +50,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist contains(DEFINES,QT_EVAL):include(eval.pri) -HOST_BINS = $$[QT_HOST_BINS] +HOST_BINS = $$[QT_HOST_BINS/raw] host_bins.name = host_bins host_bins.variable = HOST_BINS -- cgit v1.2.3 From 25a0ce8f03bf94b2d51a144753c6815506c7ce70 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 7 Jan 2013 17:20:16 +0100 Subject: add missing space in front of "directwrite" flag Task-number: QTBUG-28917 Change-Id: I8b86b96a3fb6b65f71aea6954ba8dfa520f5d909 Reviewed-by: Joerg Bornemann --- tools/configure/configureapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index df0f82532e..126643e0f3 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3042,7 +3042,7 @@ void Configure::generateQConfigPri() configStream << " slog2"; if (dictionary["DIRECTWRITE"] == "yes") - configStream << "directwrite"; + configStream << " directwrite"; // ### For compatibility only, should be removed later. configStream << " qpa"; -- cgit v1.2.3 From 94649b4cbd174c12aae4c7a2341067c8331379f6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 8 Jan 2013 12:40:01 +0100 Subject: remove definitions of QMAKE_{LIB,INC}DIR_QT they are gone from all other specs Change-Id: I93f5800971733af9d9dbc66c7a900d1e2e967473 Reviewed-by: Joerg Bornemann --- mkspecs/win32-msvc2012/qmake.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/mkspecs/win32-msvc2012/qmake.conf b/mkspecs/win32-msvc2012/qmake.conf index 53170c8436..8a595d16b1 100644 --- a/mkspecs/win32-msvc2012/qmake.conf +++ b/mkspecs/win32-msvc2012/qmake.conf @@ -51,8 +51,6 @@ QMAKE_CXXFLAGS_EXCEPTIONS_ON = -EHsc QMAKE_CXXFLAGS_EXCEPTIONS_OFF = QMAKE_INCDIR = -QMAKE_INCDIR_QT = $$[QT_INSTALL_HEADERS] -QMAKE_LIBDIR_QT = $$[QT_INSTALL_LIBS] QMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$obj $src QMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -Fo$@ $< -- cgit v1.2.3 From cded50e6f23594a0acc65c6e949d0bf99bd7bf6f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 8 Jan 2013 14:36:54 +0100 Subject: MinGW: Statically link runtime libraries into qmake Avoid runtime dependencies to e.g. libpwinthread-1.dll, libstc++-6.dll. This prevents Qt Creator from spitting out error dialogs on each startup for registered MinGW versions that aren't in the default PATH. Change-Id: Id55518db8c8e0521b6a41add1eaf38f75a892c8b Reviewed-by: Oswald Buddenhagen Reviewed-by: Friedemann Kleint --- dist/changes-5.0.1 | 1 + qmake/Makefile.win32-g++ | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/changes-5.0.1 b/dist/changes-5.0.1 index 479ac344ce..3d9a59dd0a 100644 --- a/dist/changes-5.0.1 +++ b/dist/changes-5.0.1 @@ -98,6 +98,7 @@ Qt for Windows CE * Compiler Specific Changes * **************************************************************************** + - MinGW: Statically link runtime libraries into qmake **************************************************************************** * Tools * diff --git a/qmake/Makefile.win32-g++ b/qmake/Makefile.win32-g++ index 7bc24edef9..565d5d2d51 100644 --- a/qmake/Makefile.win32-g++ +++ b/qmake/Makefile.win32-g++ @@ -54,7 +54,7 @@ CFLAGS = -c -o$@ -O \ -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DATASTREAM \ -DUNICODE CXXFLAGS = $(CFLAGS) -LFLAGS = -static-libgcc -s +LFLAGS = -static -s LIBS = -lole32 -luuid -ladvapi32 -lkernel32 LINKQMAKE = g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) ADDCLEAN = -- cgit v1.2.3 From 4d2eb3dd01620f4e26f97dca747206ddbc0840c7 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 10 Jan 2013 11:28:49 +0100 Subject: QStyleAnimation: use QAbstractAnimation::DeleteWhenStopped This ensures that unexpectedly stopped (for example, when minimizing a window) style animations are removed from QCommonStyle. Task-number: QTBUG-28978 Change-Id: I1403502d85e0614d8644892a2231938c29a8c9c2 Reviewed-by: Jens Bache-Wiig Reviewed-by: Kai Koehne --- src/widgets/styles/qcommonstyle.cpp | 2 +- src/widgets/styles/qstyleanimation.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 7519d7f910..75407c11c5 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -1149,7 +1149,7 @@ void QCommonStylePrivate::startAnimation(QStyleAnimation *animation) const stopAnimation(animation->target()); q->connect(animation, SIGNAL(destroyed()), SLOT(_q_removeAnimation()), Qt::UniqueConnection); animations.insert(animation->target(), animation); - animation->start(); + animation->start(QAbstractAnimation::DeleteWhenStopped); } /*! \internal */ diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp index 9ddcbcc511..bed3192219 100644 --- a/src/widgets/styles/qstyleanimation.cpp +++ b/src/widgets/styles/qstyleanimation.cpp @@ -53,7 +53,6 @@ QStyleAnimation::QStyleAnimation(QObject *target) : QAbstractAnimation(), moveToThread(target->thread()); setParent(target); } - connect(this, SIGNAL(finished()), SLOT(deleteLater())); } QStyleAnimation::~QStyleAnimation() -- cgit v1.2.3 From 856f209fb63ae336bfb389a12d2a75fa886dc1c5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 10:07:53 -0800 Subject: Change all shmget calls to user-only memory Drop the read and write permissions for group and other users in the system. Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876 Reviewed-by: Richard J. Moore --- dist/changes-5.0.1 | 4 ++++ src/corelib/kernel/qsharedmemory_unix.cpp | 6 +++--- src/corelib/kernel/qsystemsemaphore_unix.cpp | 4 ++-- src/plugins/platforms/xcb/qxcbbackingstore.cpp | 2 +- tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dist/changes-5.0.1 b/dist/changes-5.0.1 index 3d9a59dd0a..e73776185d 100644 --- a/dist/changes-5.0.1 +++ b/dist/changes-5.0.1 @@ -114,3 +114,7 @@ Qt for Windows CE * Important Behavior Changes * **************************************************************************** +- QSharedMemory on Unix systems now no longer creates shared memory + segments that are readable and writeable to everyone. From Qt 5.0.1 + forward, the segments are created readable and writeable only by the + current user. This matches the behavior on Windows. diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp index fd2bc97b2d..6bcb4076b4 100644 --- a/src/corelib/kernel/qsharedmemory_unix.cpp +++ b/src/corelib/kernel/qsharedmemory_unix.cpp @@ -197,7 +197,7 @@ bool QSharedMemoryPrivate::create(int size) } // create - if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) { + if (-1 == shmget(unix_key, size, 0600 | IPC_CREAT | IPC_EXCL)) { QString function = QLatin1String("QSharedMemory::create"); switch (errno) { case EINVAL: @@ -218,7 +218,7 @@ bool QSharedMemoryPrivate::create(int size) bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) { // grab the shared memory segment id - int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660)); + int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0400 : 0600)); if (-1 == id) { setErrorString(QLatin1String("QSharedMemory::attach (shmget)")); return false; @@ -263,7 +263,7 @@ bool QSharedMemoryPrivate::detach() size = 0; // Get the number of current attachments - int id = shmget(unix_key, 0, 0444); + int id = shmget(unix_key, 0, 0400); cleanHandle(); struct shmid_ds shmid_ds; diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp index e67fb42285..303f0c7725 100644 --- a/src/corelib/kernel/qsystemsemaphore_unix.cpp +++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp @@ -136,10 +136,10 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) } // Get semaphore - semaphore = semget(unix_key, 1, 0666 | IPC_CREAT | IPC_EXCL); + semaphore = semget(unix_key, 1, 0600 | IPC_CREAT | IPC_EXCL); if (-1 == semaphore) { if (errno == EEXIST) - semaphore = semget(unix_key, 1, 0666 | IPC_CREAT); + semaphore = semget(unix_key, 1, 0600 | IPC_CREAT); if (-1 == semaphore) { setErrorString(QLatin1String("QSystemSemaphore::handle")); cleanHandle(); diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp index 649469ab9d..e2e0bff94c 100644 --- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp +++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp @@ -107,7 +107,7 @@ QXcbShmImage::QXcbShmImage(QXcbScreen *screen, const QSize &size, uint depth, QI if (!segmentSize) return; - int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0777); + int id = shmget(IPC_PRIVATE, segmentSize, IPC_CREAT | 0600); if (id == -1) qWarning("QXcbShmImage: shmget() failed (%d) for size %d (%dx%d)", errno, segmentSize, size.width(), size.height()); diff --git a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp index 5d9b470494..11a6119259 100644 --- a/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp +++ b/tests/auto/corelib/kernel/qsharedmemory/test/tst_qsharedmemory.cpp @@ -209,7 +209,7 @@ int tst_QSharedMemory::remove(const QString &key) return -3; } - int id = shmget(unix_key, 0, 0660); + int id = shmget(unix_key, 0, 0600); if (-1 == id) { qDebug() << "shmget failed"; return -4; -- cgit v1.2.3 From 5eab554227597568a799edb9e9e01563e35e8974 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 14 Jan 2013 12:11:45 +0100 Subject: Check for existence of QWindow in QApplication::isBlockedByModal. Warn if window == 0 is passed in QApplicationPrivate::isWindowBlocked(). Task-number: QTBUG-28637 Change-Id: I1213ea371813eeb90f962cc39235ddfccc663d45 Reviewed-by: Jing Bai Reviewed-by: Joerg Bornemann --- src/widgets/kernel/qapplication.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index ed6262ce93..c66a4487b4 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -2217,12 +2217,17 @@ Q_WIDGETS_EXPORT bool qt_tryModalHelper(QWidget *widget, QWidget **rettop) bool QApplicationPrivate::isBlockedByModal(QWidget *widget) { widget = widget->window(); - return self->isWindowBlocked(widget->windowHandle()); + QWindow *window = widget->windowHandle(); + return window && self->isWindowBlocked(window); } bool QApplicationPrivate::isWindowBlocked(QWindow *window, QWindow **blockingWindow) const { QWindow *unused = 0; + if (!window) { + qWarning().nospace() << "window == 0 passed."; + return false; + } if (!blockingWindow) blockingWindow = &unused; -- cgit v1.2.3 From d2e64c47ce63607e7c4159ad9fb6a31e6652f8b8 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 14 Jan 2013 15:53:59 +0100 Subject: XCB: Force XSync after creating Window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that dpy->request == dpy->last_request_read after setting up a new window. If we don't do this, last_request_read might never be updated until the difference hits a limit that can lead to hangs in the application (see e.g. QTCREATORBUG-8373). Task-number: QTBUG-29106 Change-Id: I390493ca6f966dc105d3ea3a2c48abec01177bc2 Reviewed-by: Uli Schlachter Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qxcbwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 528c4c6580..01f4d6d231 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -382,6 +382,11 @@ void QXcbWindow::create() if (window()->flags() & Qt::WindowTransparentForInput) setTransparentForMouseEvents(true); +#ifdef XCB_USE_XLIB + // force sync to read outstanding requests - see QTBUG-29106 + XSync(DISPLAY_FROM_XCB(m_screen), false); +#endif + #ifndef QT_NO_DRAGANDDROP connection()->drag()->dndEnable(this, true); #endif -- cgit v1.2.3 From bb5e11b56dd2f5fe2957f151a3810360bda8c71e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 15 Jan 2013 14:09:59 +0100 Subject: Fix crash in tst_qaccessibility. Release the table item below the table test instead of releasing the text item twice. Change-Id: I74d283d50a39b9a4570b73a8297ed3dbb2de2271 Reviewed-by: Frederik Gladhorn --- tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index 7e25684bff..acb072bf6d 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -3254,7 +3254,7 @@ void tst_QAccessibility::bridgeTest() ia2TableCell->Release(); ia2Table->Release(); #endif - iaccTextEdit->Release(); + iaccTable->Release(); } iaccWindow->Release(); -- cgit v1.2.3 From 4cad9e466784ec54e3cf6f216d3df20ba7a595b0 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 15 Jan 2013 07:58:49 +0100 Subject: Revert "Added note in the README" This reverts commit f15a73f2548d5f0fcb1d06e03390c00275085cf0. The note has been there for the 5.0.0 release, so it should now be removed. Change-Id: I8744f74834cc87002aa590de9c258f544bcf0c9b Reviewed-by: Sergio Ahumada --- dist/README | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dist/README b/dist/README index d9eed68fb7..19443c1bbe 100644 --- a/dist/README +++ b/dist/README @@ -152,8 +152,3 @@ Much more information is available at: We hope you will enjoy using Qt! - The Qt developers @ qt-project.org - - - - In memory of Trond Kjernåsen. - You will not be forgotten. \ No newline at end of file -- cgit v1.2.3