From e7bf0edfd49de9a4d8285fbe8d878f8fda910e6d Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Tue, 19 Jan 2016 14:30:18 +0100 Subject: Add option to disable "session management by closing windows". That feature is a poor man's session management for applications that do not implement any specific session management features. It badly interferes with proper session management support, so applications must be able to disable it. This enables fixing applications with QGuiApplication::quitOnLastWindowClosed() true - the default - dying too early, before they are enumerated for the list of applications to restart on session restore, thus preventing them from being restored. See https://bugs.kde.org/show_bug.cgi?id=354724 [ChangeLog][QtGui] Qt asking to close windows on session exit as a fallback session management mechanism has been made optional. Disabling it fixes session management for applications that implement full session management. See QGuiApplication::isFallbackSessionManagementEnabled(). Task-number: QTBUG-49667 Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa Reviewed-by: Oswald Buddenhagen Reviewed-by: David Faure --- .../widgets/mainwindows/application/mainwindow.cpp | 16 ++++++ .../widgets/mainwindows/application/mainwindow.h | 2 + .../code/src_gui_kernel_qguiapplication.cpp | 1 + src/gui/kernel/qguiapplication.cpp | 60 +++++++++++++++++++++- src/gui/kernel/qguiapplication.h | 3 ++ src/gui/kernel/qguiapplication_p.h | 1 + src/gui/kernel/qsessionmanager.cpp | 19 ++++--- 7 files changed, 90 insertions(+), 12 deletions(-) diff --git a/examples/widgets/mainwindows/application/mainwindow.cpp b/examples/widgets/mainwindows/application/mainwindow.cpp index 86dfae166f..861b908189 100644 --- a/examples/widgets/mainwindows/application/mainwindow.cpp +++ b/examples/widgets/mainwindows/application/mainwindow.cpp @@ -59,6 +59,10 @@ MainWindow::MainWindow() connect(textEdit->document(), &QTextDocument::contentsChanged, this, &MainWindow::documentWasModified); + QGuiApplication::setFallbackSessionManagementEnabled(false); + connect(qApp, &QGuiApplication::commitDataRequest, + this, &MainWindow::commitData); + setCurrentFile(QString()); setUnifiedTitleAndToolBarOnMac(true); } @@ -383,3 +387,15 @@ QString MainWindow::strippedName(const QString &fullFileName) return QFileInfo(fullFileName).fileName(); } //! [49] + +void MainWindow::commitData(QSessionManager &manager) +{ + if (manager.allowsInteraction()) { + if (!maybeSave()) + manager.cancel(); + } else { + // Non-interactive: save without asking + if (textEdit->document()->isModified()) + save(); + } +} diff --git a/examples/widgets/mainwindows/application/mainwindow.h b/examples/widgets/mainwindows/application/mainwindow.h index 08b4aa17f5..9712604125 100644 --- a/examples/widgets/mainwindows/application/mainwindow.h +++ b/examples/widgets/mainwindows/application/mainwindow.h @@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE class QAction; class QMenu; class QPlainTextEdit; +class QSessionManager; QT_END_NAMESPACE //! [0] @@ -69,6 +70,7 @@ private slots: bool saveAs(); void about(); void documentWasModified(); + void commitData(QSessionManager &); private: void createActions(); diff --git a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp index 4ddf8c8acb..63fdb3bdd0 100644 --- a/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp +++ b/src/gui/doc/snippets/code/src_gui_kernel_qguiapplication.cpp @@ -53,6 +53,7 @@ int main(int argc, char *argv[]) MyMainWidget::MyMainWidget(QWidget *parent) :QWidget(parent) { + QGuiApplication::setFallbackSessionManagementEnabled(false); connect(qApp, SIGNAL(commitDataRequest(QSessionManager)), SLOT(commitData(QSessionManager))); } diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 65d679cdad..8f1c62fbca 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -138,6 +138,8 @@ QPlatformTheme *QGuiApplicationPrivate::platform_theme = 0; QList QGuiApplicationPrivate::generic_plugin_list; +bool QGuiApplicationPrivate::is_fallback_session_management_enabled = true; + enum ApplicationResourceFlags { ApplicationPaletteExplicitlySet = 0x1, @@ -3082,6 +3084,55 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state, boo emit qApp->applicationStateChanged(applicationState); } +// ### Qt6: consider removing the feature or making it less intrusive +/*! + \since 5.6 + + Returns whether QGuiApplication will use fallback session management. + + The default is \c true. + + If this is \c true and the session manager allows user interaction, + QGuiApplication will try to close toplevel windows after + commitDataRequest() has been emitted. If a window cannot be closed, session + shutdown will be canceled and the application will keep running. + + Fallback session management only benefits applications that have an + "are you sure you want to close this window?" feature or other logic that + prevents closing a toplevel window depending on certain conditions, and + that do nothing to explicitly implement session management. In applications + that \e do implement session management using the proper session management + API, fallback session management interferes and may break session + management logic. + + \warning If all windows \e are closed due to fallback session management + and quitOnLastWindowClosed() is \c true, the application will quit before + it is explicitly instructed to quit through the platform's session + management protocol. That violation of protocol may prevent the platform + session manager from saving application state. + + \sa setFallbackSessionManagementEnabled(), + QSessionManager::allowsInteraction(), saveStateRequest(), + commitDataRequest(), {Session Management} +*/ +bool QGuiApplication::isFallbackSessionManagementEnabled() +{ + return QGuiApplicationPrivate::is_fallback_session_management_enabled; +} + +/*! + \since 5.6 + + Sets whether QGuiApplication will use fallback session management to + \a enabled. + + \sa isFallbackSessionManagementEnabled() +*/ +void QGuiApplication::setFallbackSessionManagementEnabled(bool enabled) +{ + QGuiApplicationPrivate::is_fallback_session_management_enabled = enabled; +} + /*! \since 4.2 \fn void QGuiApplication::commitDataRequest(QSessionManager &manager) @@ -3106,7 +3157,8 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state, boo \note You should use Qt::DirectConnection when connecting to this signal. - \sa isSessionRestored(), sessionId(), saveStateRequest(), {Session Management} + \sa setFallbackSessionManagementEnabled(), isSessionRestored(), + sessionId(), saveStateRequest(), {Session Management} */ /*! @@ -3236,9 +3288,13 @@ void QGuiApplicationPrivate::commitData() { Q_Q(QGuiApplication); is_saving_session = true; + emit q->commitDataRequest(*session_manager); - if (session_manager->allowsInteraction() && !tryCloseAllWindows()) + if (is_fallback_session_management_enabled && session_manager->allowsInteraction() + && !tryCloseAllWindows()) { session_manager->cancel(); + } + is_saving_session = false; } diff --git a/src/gui/kernel/qguiapplication.h b/src/gui/kernel/qguiapplication.h index d995387d66..3f233d4eda 100644 --- a/src/gui/kernel/qguiapplication.h +++ b/src/gui/kernel/qguiapplication.h @@ -152,6 +152,9 @@ public: QString sessionId() const; QString sessionKey() const; bool isSavingSession() const; + + static bool isFallbackSessionManagementEnabled(); + static void setFallbackSessionManagementEnabled(bool); #endif static void sync(); diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 7c7da9790b..4f0f6fdc44 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -234,6 +234,7 @@ public: #endif #ifndef QT_NO_SESSIONMANAGER + static bool is_fallback_session_management_enabled; QSessionManager *session_manager; bool is_session_restored; bool is_saving_session; diff --git a/src/gui/kernel/qsessionmanager.cpp b/src/gui/kernel/qsessionmanager.cpp index f4b56fd01b..c6d23f163c 100644 --- a/src/gui/kernel/qsessionmanager.cpp +++ b/src/gui/kernel/qsessionmanager.cpp @@ -64,22 +64,21 @@ QT_BEGIN_NAMESPACE settings. QSessionManager provides an interface between the application and the - session manager so that the program can work well with the session manager. - In Qt, session management requests for action are handled by the two - signals QGuiApplication::commitDataRequest() and - QGuiApplication::saveStateRequest(). Both provide a reference to a session - manager object as argument, to allow the application to communicate with - the session manager. The session manager can only be accessed through these - functions. + platform's session manager. In Qt, session management requests for action + are handled by the two signals QGuiApplication::commitDataRequest() and + QGuiApplication::saveStateRequest(). Both provide a reference to a + QSessionManager object as argument. The session manager can only be + accessed in slots invoked by these signals. + + \warning If you use QSessionManager, you should disable fallback session + management: QGuiApplication::setFallbackSessionManagementEnabled(). No user interaction is possible \e unless the application gets explicit permission from the session manager. You ask for permission by calling allowsInteraction() or, if it is really urgent, allowsErrorInteraction(). Qt does not enforce this, but the session manager may. - You can try to abort the shutdown process by calling cancel(). The default - commitData() function does this if some top-level window rejected its - closeEvent(). + You can try to abort the shutdown process by calling cancel(). For sophisticated session managers provided on Unix/X11, QSessionManager offers further possibilities to fine-tune an application's session -- cgit v1.2.3 From 719623a11d57da6a56d069a5ca8161531a37776b Mon Sep 17 00:00:00 2001 From: Andreas Hartmetz Date: Wed, 17 Feb 2016 21:33:25 +0100 Subject: Fix builds without session management. My previous change broke it. Change-Id: I3c3a9a65775032a95eebf3526c1bbf2c50773230 Reviewed-by: Samuli Piippo --- src/gui/kernel/qguiapplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8f1c62fbca..95e47e18a9 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -138,7 +138,9 @@ QPlatformTheme *QGuiApplicationPrivate::platform_theme = 0; QList QGuiApplicationPrivate::generic_plugin_list; +#ifndef QT_NO_SESSIONMANAGER bool QGuiApplicationPrivate::is_fallback_session_management_enabled = true; +#endif enum ApplicationResourceFlags { @@ -3084,6 +3086,7 @@ void QGuiApplicationPrivate::setApplicationState(Qt::ApplicationState state, boo emit qApp->applicationStateChanged(applicationState); } +#ifndef QT_NO_SESSIONMANAGER // ### Qt6: consider removing the feature or making it less intrusive /*! \since 5.6 @@ -3132,6 +3135,7 @@ void QGuiApplication::setFallbackSessionManagementEnabled(bool enabled) { QGuiApplicationPrivate::is_fallback_session_management_enabled = enabled; } +#endif // QT_NO_SESSIONMANAGER /*! \since 4.2 -- cgit v1.2.3 From bcdcde09065d970e8a3f0c8b1c086b2865cb948f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 19 Feb 2016 12:35:53 +0100 Subject: Doc: Simple CSS style: Convert font-sizes from px to pt Unlike other rendering backends, QTextBrowser treats px unit in stylesheets as physical pixels when printing, resulting in too small to read font sizes. Work around this by converting font-size px units to pt. Change-Id: I70c71d8bda0996f793bf1c4558775384fe6ec297 Task-number: QTBUG-51083 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Friedemann Kleint Reviewed-by: Robert Loehning --- doc/global/template/style/offline-simple.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/global/template/style/offline-simple.css b/doc/global/template/style/offline-simple.css index b11cb6a137..5d8ce5c37f 100644 --- a/doc/global/template/style/offline-simple.css +++ b/doc/global/template/style/offline-simple.css @@ -1,11 +1,11 @@ body { - font-size: 14px; + font-size: 10.5pt; } pre { background-color: #f0f0f0; font-family: Courier, monospace; - font-size: 15px; + font-size: 11pt; font-weight: 600; vertical-align: top; margin: 15px 85px 15px 35px; @@ -41,7 +41,7 @@ a[href|="http://"], a[href|="https://"] { h1.title { margin-top: 30px; margin-left: 6px; - font-size: 32px; + font-size: 24pt; padding: 6px; } @@ -52,7 +52,7 @@ h2, p.h2 { } h3 { - font-size: 16px; + font-size: 12pt; margin: 30px 0px 30px 6px; } @@ -82,7 +82,7 @@ h3.fn, span.fn { padding: 5px; text-decoration: none; font-weight: 400; - font-size: 16px; + font-size: 12pt; margin: 45px 0px 0px 6px; } @@ -107,7 +107,7 @@ table tr.odd { table.qmlname td { padding: 0px; margin-left: 6px; - font-size: 16px; + font-size: 12pt; } table.qmlname p .name, @@ -125,12 +125,12 @@ h3.fn .name, h3.fn .type { } tr > td > pre { - font-size: 14px; + font-size: 10.5pt; } code { font-family: Courier, monospace; - font-size: 16px; + font-size: 12pt; font-weight: 400; } @@ -167,7 +167,7 @@ td#buildversion { .footer, .footer p { padding: 5px 0px 5px 0px; margin: 45px 15px 5px 15px; - font-size: 10px; + font-size: 7.5pt; background-color: #cccccc; } -- cgit v1.2.3 From 469e293286f7b9ea093fdac41938e00082c70bcd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 22 Feb 2016 14:44:30 -0800 Subject: Fix crash when a standard bus isn't available Commit 1f6fa1f37a14742ddf53c753ce52d9dc048cd1dc added a way of suspending delivery of messages to standard buses when they connect and resuming delivery when the main loop starts. As a side-effect, we caused an attempt to do dispatching even after the connection failed. The D-Bus library doesn't like that. Task-number: QTBUG-51299 Change-Id: I0c94a5c2846b48c8aea7ffff143564f7fcede890 Reviewed-by: David Faure --- src/dbus/qdbusconnection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 7f44272bc3..34b3da7df3 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -208,7 +208,7 @@ QDBusConnectionPrivate *QDBusConnectionManager::connectToBus(QDBusConnection::Bu data.suspendedDelivery = suspendedDelivery; emit connectionRequested(&data); - if (suspendedDelivery) { + if (suspendedDelivery && data.result->connection) { data.result->ref.ref(); QDBusConnectionDispatchEnabler *o = new QDBusConnectionDispatchEnabler(data.result); QTimer::singleShot(0, o, SLOT(execute())); @@ -291,7 +291,7 @@ void QDBusConnectionManager::executeConnectionRequest(QDBusConnectionManager::Co // will lock in QDBusConnectionPrivate::connectRelay() d->setConnection(c, error); d->createBusService(); - if (data->suspendedDelivery) + if (c && data->suspendedDelivery) d->setDispatchEnabled(false); } } -- cgit v1.2.3 From 38944d662eda76ecc57cb1fd61da42775fa52f6f Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 24 Feb 2016 12:57:18 +0100 Subject: Fix syncqt.pl not respecting #pragma qt_no_master_include in files with Windows line endings We need to do the same chop trick that we do further down the file. Change-Id: If4f832f375a11473e66adfcfa76a3b4504b3d406 Task-number: QTBUG-51324 Reviewed-by: Iikka Eklund Reviewed-by: Oswald Buddenhagen --- bin/syncqt.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/syncqt.pl b/bin/syncqt.pl index cca654e3b4..93c962cf90 100755 --- a/bin/syncqt.pl +++ b/bin/syncqt.pl @@ -182,6 +182,7 @@ sub shouldMasterInclude { if (open(F, "<$iheader")) { while () { chomp; + chop if /\r$/; return 0 if (/^\#pragma qt_no_master_include$/); } close(F); -- cgit v1.2.3 From ae2d11df1092cc298d5b6c5e03a870df5feaf2be Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 15 Feb 2016 13:22:03 +0100 Subject: Add changelog for 5.6.0 Change-Id: Ib3177028cf1cbd124ebf1449d5e00039f38b1a92 Reviewed-by: Tuukka Turunen Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll Reviewed-by: Frederik Gladhorn --- dist/changes-5.6.0 | 519 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 519 insertions(+) create mode 100644 dist/changes-5.6.0 diff --git a/dist/changes-5.6.0 b/dist/changes-5.6.0 new file mode 100644 index 0000000000..1a2334041f --- /dev/null +++ b/dist/changes-5.6.0 @@ -0,0 +1,519 @@ +Qt 5.6 introduces many new features and improvements along with bug fixes +over the 5.5.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://doc.qt.io/qt-5.6 + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Deprecation Notice * +**************************************************************************** + + The following platforms or toolchains are deprecated and will be + removed as of Qt 5.7: + * Apple OS X 10.7 (Lion) + * GNU Compiler Collection (GCC) versions 4.6 and earlier + * Microsoft Visual Studio compiler versions 2008, 2010 and 2012 + * Microsoft Windows XP, Windows Vista + * Microsoft Windows Embedded Compact 7 + * Microsoft Windows Embedded Compact 2013 + + Deprecated platforms and toolchains continue to work until removed. + + - The QtScript module is deprecated and will be removed from Qt's binary + packages starting with version 5.7. The 5.6 releases of QtScript + should continue to work along with Qt 5.7 and future versions. + +**************************************************************************** +* Future Direction Notice * +**************************************************************************** + + - In Qt 6, QCoreApplication::notify() will not be called for events being + delivered to objects outside the main thread. The reason for that is + that the main application object may begin destruction while those + threads are still delivering events, which is undefined behavior. + Applications that currently override notify() and use that function + outside the main thread are advised to find other solutions in the mean + time. + + - Qt 5.7 will begin requiring certain C++11 features in order to + compile. The minimum compiler versions for that release will be: + * Clang 3.4 (included in XCode 5.1) + * GCC 4.7 + * Intel C++ Composer XE 2013 SP1 (compiler version 14.0) + * Microsoft Visual Studio 2013 (compiler version 19.0) + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - SecureTransport is the default SSL backend on OS X. Use the + -no-securetransport configure option to use OpenSSL. + - [QTBUG-34611] Arrow indicator is now consistent with platform styles + - QtDBus now uses threads to implement processing of incoming and outgoing + messages. This solves a number of thread safety issues and fixes an + architectural problem that would cause all processing to stop if a + particular thread (usually the main thread) is blocked in any + operation. On the flip side, application developers need to know that + modifications to a QDBusConnection may be visible immediately on the + connection, so they should be done in an order that won't allow for + incomplete states to be observed (for example, register all objects + before acquiring service names). + +configure & build system +------------------------ + + - [Unix] Qt's .prl files do not expose private dependencies any more. + Projects must explicitly name their dependencies. + - [Windows] Enabling link-time code generation in Qt does not enable + it in user applications as well any more. + - [FreeBSD] The "freebsd-clang" mkspec is no longer in the unsupported/ + subdir. If you use scripts to build Qt, you'll need to update them to + include "-platform freebsd-clang" or remove the -platform argument. + +qmake +----- + + - qmake now enables C++11 support by default if the compiler supports + it (unless the compiler defaults to C++14 or a later edition). + To disable this (not possible with Microsoft Visual Studio), add + "CONFIG -= c++11" to your .pro file. Note that Qt 5.7 requires C++11 + support, so it is a good idea to ensure your code works with that + compiler setting. + - [Windows] The .prl files written by earlier versions of Qt cannot + be used any more. This will affect you if you depend on 3rd party + libraries which come with .prl files. Patch up QMAKE_PRL_TARGET to + contain the complete file name of the library, and replace any + /LIBPATH: in QMAKE_PRL_LIBS with -L. + - [Windows] QMake is now a lot stricter about what may appear in LIBS. + Use -L instead of the Windows-specific /LIBPATH. Put flags other + than -l and -L into QMAKE_LFLAGS. + - The library lookup has been simplified. This includes the removal of + support for the QMAKE__SUFFIX variables, and the removal of + attempts to locate libraries under slightly different names than + specified. + - [Unix] QMAKE_POST_LINK steps of static libraries are now required + to operate on $(TARGET) in $(DESTDIR) instead of $$OUT_PWD. + This matches the Windows backends. + - Makespecs must now define QMAKE_{PREFIX,EXTENSION}_{SH,STATIC}LIB. + + +Accessibility +------------- + + - [QTBUG-44479] We now report text attributes correctly on Linux, so + ORCA+F now works properly in QTextEdit and other text controls. + +Widgets +------- + + - [QTBUG-1049][QTBUG-2295][QTBUG-4532][QTBUG-18883][QTBUG-35148] The + tabs for the tabified docks can be moved by the user. + +QtTest +------ + + - [QTBUG-47370] Crash/exception information is now logged to standard + output on Windows. + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + + - Types in the Q_PROPERTY macro can now contain commas (for example, + QMap) + - Added QVersionNumber. + - All generic containers (with the exception of QVarLengthArray, but + including QSharedPointer) destroy the previous state as part of a + move-assignment. Previously, they would dump it into the + right-hand-side object. Note that this is only true for the generic + containers. Other implicitly-shared types, as well as the non-generic + containers such as QString, QByteArray, etc. still swap the contents with + the right-hand-side object when move-assigned into, and for performance + reasons, this does not change in the foreseeable future. + - All containers (with the exception of QVarLengthArray, but including + QSharedPointer) are now nothrow_default_constructible, + nothrow_move_constructible, nothrow_move_assignable, and + nothrow-swappable. + - [QTBUG-25919] Added rbegin(), crbegin(), rend(), crend(), and + reverse_iterator and const_reverse_iterator typedefs to + QByteArray, QString, QList, QLinkedList, QVector, QVarLengthArray, + and QSet. + - [QTBUG-46026] Added the convenience constFirst() and constLast() + functions to QList and QVector. + - Added relational operators <, <=, >, >= to QList, QVector, and + QVarLengthArray if the element type supports operator<. + - Added qHash() overloads for QList, QVector, QLocale, QMatrix, QTransform, + QMimeType, QRegExp, QRegularExpression, and QUrlQuery. + - Unicode data updated to v8.0 + + - Logging: + * QT_LOGGING_RULES now supports multiple rules separated by semicolons + * Systems with syslog may now pass -syslog to configure to send logging + output to syslog. + + - QCommandLineParser: + * [QTBUG-44298] Added support for hiding options from the --help output, + with QCommandLineOption::setHidden(true). + * Added parsing mode for options after arguments, to allow treating them + as more arguments. + + - QDebug: + * How verbose a single debug output should be can now be fine-tuned by + setting a verbosity on the debug stream. + * When streaming QWindow, QScreen, QWidget instances to a debug stream + that has increased verbosity set, detailed information about + geometries, states etc. is printed. + + - QDir: + * Added listSeparator(). + + - QHash/QMap: + * Added key iterators, accessible through keyBegin() and keyEnd(). + + - QLatin1String: + * Added default constructor. + + - QLocale: + * [QTBUG-4044][QTBUG-3068] The C locale does not use group separators + to format numbers any more. + * [QTBUG-49031] Fixed a bug that caused QLocale::textDirection() to + always return Qt::LeftToRight and QLocale::script() to return + QLocale::AnyScript for the Windows system locale. + + - QMap: + * Added const equal_range() overload. + + - QMetaProperty: + * write() now resets the property if an empty QVariant is given, or set + a default constructed object if the property is not resettable. + + - QPluginLoader: + * Fixed the search order of Qt plugins so that paths specified by the + QT_PLUGIN_PATH environment variable are searched before built-in + paths. + + - QProcess: + * [QTBUG-47271] Fixed a bug that caused QProcess to launch a child + process on Unix even if the directory specified with + setWorkingDirectory did not exist. + * Deprecated QProcess::error() signal in favor of the new + QProcess::errorOccurred() signal. + + - QProcessEnvironment: + * Fixed a bug in operator== involving different empty states. + + - QSet: + * Added intersects(). + + - QSharedPointer: + * [QTBUG-49748] Fixed a problem that causes a compilation error + when constructing a QSharedPointer of a const type that derives + from QEnableSharedFromThis. + + - QStorageInfo: + * Added QStorageInfo::blockSize(), which returns the optimal block size + for transferring data to and from the storage. + + - QString: + * fromLatin1(), fromAscii(), fromUtf8() and fromLocal8Bit() now return a + null QString when called with a null QByteArray. + * Added insert(int, QStringRef), insert(int, const char*), and + insert(int, QByteArray) overloads. + * Added prepend(QStringRef) and prepend(const QChar *, int) overloads. + * resize() no longer shrinks the capacity. That means resize(0) now + reliably preserves capacity(). + + - QStringRef: + * Added truncate(int). + + - QTemporaryDir: + * Added errorString() method that returns the string explaining why + creating the temporary directory failed. + + - QTextStream: + * Can now stream QStringRef without converting to a QString first. + + - QThread: + * [QTBUG-49870] Fixed a bug that would cause debug-mode applications to + live-lock on exit if they had a global static containing a QThread + that wasn't exited properly. + + - QVariant: + * [QTBUG-40644] Fixed crash when setting a QVariant of a different type to + a property of a custom type by attempting to do a conversion instead. + * [QTBUG-37851] QVariant(QColor)::toString() now uses QColor::HexArgb format + when the alpha component is different from 1. + + - QVector: + * [QTBUG-39293] resize() will no longer shrink the capacity. That means + resize(0) now reliably preserves capacity(). + + - QtAlgorithms: + * Added qFindFirstSetBit() and qFindLastSetBit(). + +QtDBus +------ + + - [QTBUG-14131] The QtDBus library now links directly to the libdbus-1 + system library if it was detected at configure time. To force linking to + the library, pass option -dbus-linked to configure; to force dynamic + loading at runtime, use -dbus-runtime. + +QtGui +----- + + - [QTBUG-43674] Linux accessibility (using XCB) works for + applications launched as root. + - Added ReturnKeyType enum that emulates the native return key press on + different mobile platforms, to indicate actions such as search, move to + next field, and so on. + + - Painting: + * Internal precision of solids and gradients is up to 16bit per color. + + - QFont: + * [QTBUG-15214] QFont now serializes the capitalization setting. + + - QGuiApplication: + * [QTBUG-47690] Fixed a regression where both sessionId and sessionKey were + empty on Windows. + + - QIcon: + * [QTBUG-42109] Added the ability for QIcons to be marked as template images. + This allows end users to create QSystemTrayIcons that are properly + displayed as monochrome images on OS X, which is especially important + on Yosemite and above when Dark Mode is turned on. + + - QKeySequence: + * Added qHash(QKeySequence). + + - QTextLayout: + * Added QVector-based alternatives setFormat(), format(), and + clearFormat() to setAdditionalFormats(), additionalFormats(), and + clearAdditionalFormats(), resp. + * [QTBUG-41197] Fixed an uncommon rendering error with fonts containing + overlapping contours. + * [QTBUG-47547] Fixed some instances of missing glyphs when drawing large + fonts. + * [QTBUG-47547] Fixed problem where fallback fonts for text with certain + styles would be reported as unscalable. + * Freetype: + * [QTBUG-45963] Fixed a divide-by-zero exception when accessing bitmap + fonts. + * [QTBUG-50715] QTextLayout::glyphRuns() now returns united bounding + rects for glyph runs that are merged. + + - OpenGL: + * [QTBUG-46161] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and + 3.1 function wrappers in a cross-platform manner. + * [QTBUG-39235] Added support for multiple render targets in + QOpenGLFramebufferObject. + * [QTBUG-42444] Made QInputMethod's visible more accurate. + +QtNetwork +--------- + + - QSslServer: + * In an SSL connection, the client socket now uses the server's cipher + preferences by default. This can be disabled using the QSslConfiguration. + + - QUdpSocket: + * [QTBUG-47011] Fixed a bug that caused the QAbstractSocket::ShareAddress + option not to work on Linux. + +QtPlatformSupport +----------------- + + - QKdeTheme: + * Added support for KDE Plasma 5, which is also the default theme now. + +QtSql +----- + + - [QTBUG-3500] SSL support for MySQL database connections has been added. + Option CLIENT_SSL replaced by SSL_KEY, SSL_CERT, SSL_CA, SSL_CAPATH and + SSL_CIPHER, so that the keys, certificates and cipher can be specified. + - Improved performance when reading integer values from MySQL databases via + prepared statements. + +QtTest +------ + + - [QTBUG-47370] A stack trace is output on standard error if a test + crashes. + - Added macros QTRY_VERIFY2_WITH_TIMEOUT() and QTRY_VERIFY2(), making it + possible to output a message after the timeout has expired. + +QtWidgets +--------- + + - QComboBox: + * QComboBox::setView() no longer deletes the old view directly. It now + checks the ownership first. + + - QListView: + * [QTBUG-37007] Horizontal scrolling with a vertical mouse wheel + is now possible. + + - QMainWindow: + * Added GroupedDragging as a DockOption which allow users to drag all + the tabs together when dragging the title of a QDockWidget which is + tabbed with others. + + - QSizePolicy: + * Added qHash(QSizePolicy). + + - QTabBar: + * [QTBUG-45173][QTBUG-15128] Fixed moving tab when a stylesheet is + applied. + + - QFontDialog: + * Added supportedSchemes property. + +**************************************************************************** +* Platform-specific Changes * +**************************************************************************** + +Android +------- + + - [QTBUG-38379] Stylus devices such as S Pen will generate QTabletEvents now. + - [QTBUG-40731] Implemented QInputMethod::keyboardRectangle. + - [QTBUG-45585] Fixed the opening of a local file using + QDesktopServices::openUrl(). + +Windows +------- + + - [QTBUG-41309][QTBUG-41883][QTBUG-42410] Add a function to + QWindowsWindowFunctions to enable working around a limitation with + showing other top level windows while showing a fullscreen OpenGL-based + window. + - DirectWrite support is now the default if available. + + - DirectWrite: + * [QTBUG-48546] Added differentiation between vertical hinting and no + hinting in DirectWrite font engine. + * [QTBUG-49562] Fixed clipping bug when rendering unhinted text with + grayscale antialiasing. + * [QTBUG-49562] Added transformation support to DirectWrite engine when + using grayscale antialiasing. + * [QTBUG-50009] Fixed transformed text when using the DirectWrite font + engine. + + - Text: + * [QTBUG-47141] Made it possible to disable antialiasing for text when + drawing into images. + * [QTBUG-48546] Fixed uneven kerning for some fonts. + +X11/XCB +------- + + - [QTBUG-42985] In case there are no physical screens attached, + QGuiApplication::screens() and QGuiApplication::primaryScreen() will + now return a placeholder QScreen object. + - [QTBUG-49071] Fixed focusIn event on hide/show being not delivered. + - Harmonized input context selection. QT_IM_MODULE environment variable + is taken into account now. + +QPA +--- + + - EGLFS/KMS: + * It is now possible to set the DPMS mode and get the current value for + each screen. + + - WinRT: + * Windows Store apps are now composited inside a XAML container, + allowing for tighter integration with the native UI layer. + * Application status bar is visible by default now. + +**************************************************************************** +* Tools * +**************************************************************************** + +configure & build system +------------------------ + + - Qt's build system now detects whether the compiler supports C++14 and + experimental support for C++1z. If the compiler supports it, Qt is + compiled using that. This does not apply to user applications built + using qmake: those are still built with C++11 support only. To build + your application with C++14 support, add "CONFIG += c++14" + (similarly for C++1z) to your .pro file. + - [GCC][ELF] The Qt libraries now contain ELF versions. + - [QTBUG-48958][OS X] Configure with -no-rpath now yields dynamic Qt + libraries and frameworks with an absolute install name (based in + -libdir). This restores Qt 4 behavior. + - [MinGW] Fixed detection of DirectWrite. + - [iOS] The build process was significantly changed in several ways. + This doesn't matter unless you're doing Something Very Special. + - [Unix] -force-pkg-config is now just an alias for -pkg-config. + - [QTBUG-47840] Fixed pointer size detection when cross-building. + - [QTBUG-47920] GStreamer 1.0 is now preferred over 0.10. + - [QTBUG-48041][WinRT] Fixed -no-opengl not bailing out despite the + configuration causing a build error later on. + - [Linux] Qt is now built with relative rpaths, as was already the + case on OS X. + - [Windows] Configure now supports the -verbose option, like on Unix. + - [Unix] Added configure option to enable link-time code generation. + - Introduced the -optimized-tools option; supersedes -optimized-qmake. + Tools are by default not optimized in debug builds any more. + - Non-prefix builds don't have install targets any more. + +qmake +----- + + - By default, GNU extensions are now enabled with Clang, GCC, and ICC + even in C++11 and C++14 modes. To disable the GNU extensions, add + CONFIG+=strict_c++ to your .pro file. + - In addition to .qrc files, it is now possible to list standalone files + and directories, and collections of files in RESOURCES. + - [QTBUG-17533] Fixed dependency scan being confused by directly adjacent + string literals without intermediate whitespace. The parser also got more + C++ compliant and now understands C++11 raw strings. + - [QTBUG-21854] Deprecated DEPLOYMENT in favor of INSTALLS. + - [QTBUG-30813] Makefile output no longer contains implicit suffix rules, + as all sources are built using explicit rules. + - [QTBUG-36575] Fixed handling of QMAKE_OBJECTIVE_CFLAGS for Objective-C + (as opposed to Objective-C++). OBJECTIVE_SOURCES was obsoleted; use just + SOURCES. This behavior matches Xcode. + - [QTBUG-44184][Windows] Added RC_DEFINES to allow overriding DEFINES. + This is a workaround for incompatible quoting requirements of rc.exe + compared to cl.exe. + - [QTBUG-46910][Unix] Fixed infinite recursion with link_prl (the default) + and .la files in a .libs/ subdirectory. + - [QTBUG-47951] Fixed QMAKE_CXX/CROSS_COMPILE verification with ccache. + - [QTBUG-48287][Unix] Fixed race in debug_and_release builds of static libs. + - [QTBUG-48648][VS2013] Fixed creation of empty (and thus invalid) + sections in manifest files. + - [QTBUG-49665][VS] Fixed shadow builds of subdirs projects. + - [QTBUG-50442][VS] Added support for precompiled headers without (or with + an uncommon) file extension. + - 'make check' targets will now extend QT_PLUGIN_PATH instead of + overwriting it. + - Fixed support for certain versions of (f)lex and yacc. + - [Darwin] Info.plist is now correctly placed also in plugin bundles. + - [Darwin] CONFIG+=plugin_bundle now actually creates Mach-O bundles. + - [Unix] Added support for paths relative to the target in QMAKE_RPATHDIR. + - [Unix] Support for CONFIG+=compile_libtool was removed. Use + CONFIG+=create_libtool and/or custom compilers instead. + - [Windows] Libraries coming with .prl files can now have non-standard file + extensions and a major version of zero. + - [WEC2013][VS] Fixed support for VS2013 SDKs. + - [MSys] Added workaround for MinGW-make's magic handling of paths. + Prepend @msyshack@ to INSTALL_ROOT to prevent MSys root prefixing. -- cgit v1.2.3 From 3bcc303711ed930a96c98a500e9f0aa5ff403da5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 1 Mar 2016 21:08:51 +0100 Subject: fix non-git non-prefix shadow builds turns out we need forwarding .pris in this case: without them, QT_MODULE_INCLUDE_BASE points into the build dir, so we fail to find the pre-generated headers. an alternative would be writing primary module .pris which already take that into account, but that would just add even more arcane code paths. Task-number: QTBUG-51521 Change-Id: I59f2a0d3f2095c9dfa0a8d1cabfc007a30bd2d23 Reviewed-by: Simon Hausmann --- mkspecs/features/qt_module_pris.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf index 5f5639a1cf..8b717c98f4 100644 --- a/mkspecs/features/qt_module_pris.prf +++ b/mkspecs/features/qt_module_pris.prf @@ -10,7 +10,7 @@ # load(qt_build_paths) -force_independent|!isEmpty(MODULE_FWD_INCLUDES): \ +force_independent|split_incpath: \ CONFIG += need_fwd_pri mod_work_pfx = $$MODULE_QMAKE_OUTDIR/mkspecs/modules need_fwd_pri: \ -- cgit v1.2.3 From d0cdc7ad1e2728caf363abf328b2ad81f2ed5a5b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 Mar 2016 22:17:13 -0800 Subject: DirectFB: Fix build in C++98 mode Many DirectFB types have constructors in C++, so we can't initialize them with = {...}, like we would be able to if they had been regular POD types. Change-Id: Ic747cc2ab45e4dc6bb70ffff143840e5780ac2bc Reviewed-by: Lars Knoll Reviewed-by: Andy Nichols --- src/plugins/platforms/directfb/qdirectfbbackingstore.cpp | 6 +++--- src/plugins/platforms/directfb/qdirectfbblitter.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp b/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp index 369fa3b9f8..8fe4bca788 100644 --- a/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp +++ b/src/plugins/platforms/directfb/qdirectfbbackingstore.cpp @@ -67,7 +67,7 @@ void QDirectFbBackingStore::flush(QWindow *, const QRegion ®ion, const QPoint QVector rects = region.rects(); for (int i = 0 ; i < rects.size(); i++) { const QRect rect = rects.at(i); - DFBRegion dfbReg = { rect.x() + offset.x(),rect.y() + offset.y(),rect.right() + offset.x(),rect.bottom() + offset.y()}; + DFBRegion dfbReg(rect.x() + offset.x(),rect.y() + offset.y(),rect.right() + offset.x(),rect.bottom() + offset.y()); m_dfbSurface->Flip(m_dfbSurface.data(), &dfbReg, DFBSurfaceFlipFlags(DSFLIP_BLIT|DSFLIP_ONSYNC)); } } @@ -86,9 +86,9 @@ void QDirectFbBackingStore::resize(const QSize &size, const QRegion& reg) static inline void scrollSurface(IDirectFBSurface *surface, const QRect &r, int dx, int dy) { - const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() }; + const DFBRectangle rect(r.x(), r.y(), r.width(), r.height()); surface->Blit(surface, surface, &rect, r.x() + dx, r.y() + dy); - const DFBRegion region = { rect.x + dx, rect.y + dy, r.right() + dx, r.bottom() + dy }; + const DFBRegion region(rect.x + dx, rect.y + dy, r.right() + dx, r.bottom() + dy); surface->Flip(surface, ®ion, DFBSurfaceFlipFlags(DSFLIP_BLIT)); } diff --git a/src/plugins/platforms/directfb/qdirectfbblitter.cpp b/src/plugins/platforms/directfb/qdirectfbblitter.cpp index b87310ed76..75af3f74d6 100644 --- a/src/plugins/platforms/directfb/qdirectfbblitter.cpp +++ b/src/plugins/platforms/directfb/qdirectfbblitter.cpp @@ -173,8 +173,8 @@ void QDirectFbBlitter::drawPixmapOpacity(const QRectF &rect, const QPixmap &pixm { QRect sQRect = subrect.toRect(); QRect dQRect = rect.toRect(); - DFBRectangle sRect = { sQRect.x(), sQRect.y(), sQRect.width(), sQRect.height() }; - DFBRectangle dRect = { dQRect.x(), dQRect.y(), dQRect.width(), dQRect.height() }; + DFBRectangle sRect(sQRect.x(), sQRect.y(), sQRect.width(), sQRect.height()); + DFBRectangle dRect(dQRect.x(), dQRect.y(), dQRect.width(), dQRect.height()); DFBResult result; // skip if dst too small -- cgit v1.2.3