From 0792943d59eaa41f5e04b6ccaf39322eb8657f2a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 18 Nov 2014 21:30:45 -0800 Subject: Update the ChangeLog for 5.4.0 for the rest of qtbase Change-Id: I255892a9c84a8d873195f9440f9c1808cbe2b5a8 Reviewed-by: Oswald Buddenhagen --- dist/changes-5.4.0 | 443 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 437 insertions(+), 6 deletions(-) diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 index 614f57afe2..f989904484 100644 --- a/dist/changes-5.4.0 +++ b/dist/changes-5.4.0 @@ -16,26 +16,398 @@ Each of these identifiers can be entered in the bug tracker to obtain more information about a particular change. **************************************************************************** -* Library * +* Deprecation Notice * **************************************************************************** + - The Q_COMPILER_xxx macros for C++14 compiler features introduced in Qt + 5.3 are deprecated and will not be updated for new compilers either. + User code should be changed to use the macros from Standing Document 6 + instead: + http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations. + This does not affect C++11 feature macros. + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + + - QExplicitelySharedDataPointer's copy constructor which performs a + static_cast from "X *" to "T *" (when constructing a + QExplicitlySharedDataPointer from a QExplicitlySharedDataPointer) + doesn't perform a static_cast from "X *" to "T *" any more. Instead, an + implicit cast is now performed. This change will break compilation of code + that relied on the downcast (i.e. cast towards a more derived type) of the + templated type when copy constructing a QExplicitelySharedDataPointer + object. Please refer to the class documentation for more information about + this issue and a workaround to keep old code compiling. + - QImageReader now automatically rotates JPEG images according to Exif + orientation + - [QTBUG-18980] HarfBuzz-NG is now the default shaper on all platforms. + This results in a better shaping results for various languages, better + performance, and lower memory consumption. + - [QTBUG-41858] Changed QStringRef::right() to be consistent with + QString::right(). The function now returns the N right-most characters, + like the documentation already claimed. + - The mutable Java-style iterators like QListMutableIterator and + QHashMutableIterator no longer set the parent container to unsharable + mode. If you create a copy of the container being iterated on after the + iterator, any changes done with the iterator might affect the copy too. + + - Logging (including qDebug and qWarning): + * Support for the deprecated environment variables QT_NO_JOURNALD_LOG + and QT_ANDROID_PLAIN_LOG has been removed. Instead, set + QT_LOGGING_TO_CONSOLE to 1 to force logging to the console (stderr). + Set that variable to 0 to force logging to the system-specific event + log (if any). + * [QTCREATORBUG-12564] Log output will now go to the system log (if + support for it was compiled into Qt) if the application has no + controlling terminal or console window. Set QT_LOGGING_TO_CONSOLE to 1 + to force logging to go to stderr. + + - QSettings: + * [QTBUG-41812] QSettings::value() now returns an invalid QVariant when + passing an empty key. The code path ran into an assert, which was only + noticeable in debug builds. + * [QTBUG-21739] The locking mechanism inside QSettings has changed + and is no longer compatible with the one of previous versions of + Qt. There might be corruption if two applications running different + versions of Qt are writing to the same config file at the same + time. You must also now have write permissions in the directory + containing the settings file in order to write settings. + +**************************************************************************** +* Library * +**************************************************************************** + +QtConcurrent +------------ + + - [QTBUG-17220] run() now optionally takes as its first argument the + QThreadPool to run the task on. + QtCore ------ - Added QEnableSharedFromThis, a class that allows obtaining a QSharedPointer for an object already managed by a shared pointer. + - Added qHashBits() to aid implementing qHash() overloads for custom + types. + - Added new QByteArrayList class. + - Added QStorageInfo class to retrive information about mounted volumes + and drives + + - Logging: + * QT_MESSAGE_PATTERN can include a backtrace using %{backtrace} + * Added QtMsgType argument to QLoggingCategory constructor and + Q_LOGGING_CATEGORY macro that controls the default category + configuration. + * File, line, function information are not recorded anymore for logging + statements in release builds. Set QT_MESSAGELOGCONTEXT explicitly to + enable recording in all configurations. + + - QAbstractProxyModel: + * [QTBUG-39549] QAbstractProxyModel now forwards the drop-related API. + + - QByteArray: + * Added convenience methods to convert directly to and from std::string. + * Fixed a bug that would cause QByteArray to stop converting toUpper or + toLower at the first embedded null character. + + - QCommandLineParser: + * Added addOptions() method. + + - QElapsedTimer: + * Is no longer a POD; its default constructor now initializes the object to + an invalid QElapsedTimer + + - QFlags: + * [QTBUG-39786] Added initializer_list constructor + + - QFuture: + * [QTBUG-17220] Can now be used with any QThreadPool, not just + globalInstance(). + + - QPair: + * Can now be used in C++11 constexpr contexts. + + - QSaveFile: + * Now follows symbolic links when writing to a link instead of + replacing the link with the contents. + + - QSettings: + * [QTBUG-21739] Fixed data loss while writing the config to the disk + fails. + + - QStandardPaths: + * [QTBUG-38483] QStandardPaths now has new enumeration values + AppDataLocation, AppLocalDataLocation to be able to differentiate + between roaming and local paths on the Windows operating system. + DataLocation is deprecated in favor of AppDataLocation. + + - QString: + * QString can now split a string to a list of QStringRef. + * Added the QStringRef::split() function + + - QTextStream: + * QTextStream now uses group separators when writing floating-point + numbers when the locale is not the C locale. The old behavior can be + restored by setting QLocale::OmitGroupSeparator on the locale. + + - QTimer: + * [QTBUG-26406] Implemented new style connect syntax, including + functors, in QTimer::singleShot + + - QUrl: + * QUrl::fromLocalFile now returns an empty URL if the input string is + empty. + + - QVariant: + * [QTBUG-40363] Fixed ordered comparison between QVariants that do not + match but produce identical toString output. + + - QVector: + * Added removeOne() and removeAll() for QList compatibility. + + - QWeakPointer: + * Added lock() method for std::weak_ptr compatibility. + * Added member-swap function. + + - QtJson: + * [QTBUG-26606] QJsonArray and QJsonObject now supports C++11 + initializer lists. + + - QtMath: + * Introduced qNextPowerOfTwo methods. + +QtDBus +------ + + - Blocking calls that take a long time will now generate a warning. The + time taken may be tuned using the environment variables + Q_DBUS_BLOCKING_CALL_MAIN_THREAD_WARNING_MS and + Q_DBUS_BLOCKING_CALL_OTHER_THREAD_WARNING_MS. The value represents (in + milliseconds) how long before a blocking call is warned about. A value + below zero disables the warning, a value of zero will warn about all + blocking calls. + +QtGui +----- + + - Added QPixelFormat class. + - [QTBUG-38168] QtGui's OpenGL headers are now automatically including the + highest available header (gl31.h, gl3.h or gl2.h) in OpenGL ES builds. + - [QTBUG-36483] Dynamic OpenGL implementation loading is now supported on + Windows. This requires Qt to be configured with -opengl dynamic. + - [QTBUG-39583] Keymaps are now changeable at runtime when using eglfs. + - [QTBUG-40841] environment variable QT_DBL_CLICK_DIST customizes the + amount of movement allowed when detecting a double click. + + - Clipboard: + * [QTBUG-41852] Fixed a memory leak in setMimeData() when the platform + plugin did not support the requested mode. + + - Painting: + *[QTBUG-41413] Fixed some very rare cases of mismatched raster modes + in QPainter. + + - QEvent: + * [QTBUG-38858] The debug output for events has been significantly + improved. + + - QFont: + * [QTBUG-22814][QTBUG-22946] QFont now serializes its data properly, + without any data loss. + + - QGuiApplication: + * Add support for -icon command line argument on X11, add -qwindowicon + on all platforms. + * Added QGuiApplication::screenRemoved signal to inform that a screen + has been removed, before Qt reacts to it. + + - QImage: + * [QTBUG-25998] Added support for 10-bit per color channel image + formats. + + - QOpenGLBuffer: + * [QTBUG-38168] Added QOpenGLBuffer::mapBufferRange(). + + - QOpenGLFramebufferObject: + * Introduced an argument to QOpenGLFramebufferObject::toImage() to save + mirroring the result. + * Added support 10-bit per color channels formats as the internal + framebuffer format, making it possible to render in that precision. + + - QOpenGLTextureCache: + * Added support for uploading common QImage formats directly to OpenGL, + if supported by the OpenGL implementation. + + - QPicture: + * [QTBUG-20578] QPicture now serializes its data properly by also + accounting for QDataStream versions greater than Qt 4.5. + + - Tablet support: + * [QTBUG-39458] Added buttons to QTabletEvent + - Text: + * [QTBUG-41372] Fixed regression when rendering Uchen text in WebKit + on Windows. + * Fixed use of uninitialized memory in the FreeType font engine + +QtNetwork +--------- + + - QNetworkAccessManager: + * Fixed behavior of upload QIODevice that generate data on readyRead() + for HTTP PUT/POST + + - QSsl: + * QSsl::SecureProtocols now also excludes SSLv3 + + - QSslCertificate: + * Can now be used as a key in QSet/QHash. + + - QSslError: + * Can now be used in QSet/QHash. + + - QSslSocket: + * [QTBUG-28471] Added support for finding the version of SSL/TLS in + use by a connection. + * Added accessors for the version of OpenSSL used at build-time. This + will help when debugging problems caused by a mismatch with the + run-time version. + * [QTBUG-1565] Support for loading PKCS#12 bundles was added. These are + often used to conveniently transport keys and certificates, + particularly when making use of client certificates. + +QtPrintSupport +-------------- + + - QPrinter: + * [QTBUG-11332] Added duplex support for Windows and OS X. QtSql ----- - - qsql ibase: fix memory corruption due to LONG being 4 bytes in firebird. - - QSqlDriver::dbmsType(): New method reports DBMS type. Especially useful when using ODBC. + - ibase: Fixed memory corruption due to LONG being 4 bytes in firebird. + + - QSqlDriver: + * Add support for determining DBMS type from SQL driver using + QSqlDriver::dbmsType() + +QtTest +------ + + - Tests now output build information. + +QtWidgets +--------- + + - All widgets with a setReadOnly method now send a ReadOnlyChange event + (e.g., for app-specific palette changes) + - [QTBUG-32888] Accessibility for widgets is now included in the widget + library instead of being a separate plugin. For static builds this means + that libqtaccessiblewidgets is no longer required. + + - QComboBox: + * [QTBUG-33537] Fixed positions of items when QComboBox is set as + editable in Fusion style. + * [QTBUG-33537] Fixed updating appearance of popup menu when changing + the editable state of the combo box. + + - QDialog / Windows: + * [QTBUG-2027] Dialogs can now be menuless. + + - QGraphicsScene: + * Added the minimumRenderSize property which can be used to speed up + rendering by not painting items smaller than a give size. + * The removal of items when using the linear index is now more + efficient. + + - QLayout: + * [QTBUG-37673] Widgets and dialogs containing layouts with + heightForWidth (such as a label with word wrap) will no longer get a + minimum size of 0x0. + + - QLineEdit: + * [QTBUG-40287] The signal textEdited() is now emitted when the user + clicks the clear button created by setClearButtonEnabled() as well. + + - QMainWindow: + * [QTBUG-40410] Dock widgets will now be resized properly when the + central widget has a fixed size. + + - QPlainTextEdit: + * [QTBUG-36415] Fixed a crash when using full width selections and + issuing a complex undo command chain which removes and inserts an + empty block in one go. + * [QTBUG-40347] Fixed a possible divide by zero crash when font metrics + were missing for the font. + + - QTabBar: + * Added changeCurrentOnDrag property. + + - QTableView / QTableWidget: + * [QTBUG-29239] currentIndex() now reflects the top left cell when in a + span. + + - QTreeView: + * Indentation is now style-dependent by default. + * Added resetIndentation(). + + - Styles: + * Allow overriding standardIcon() in a proxy style **************************************************************************** * Platform Specific Changes * **************************************************************************** +Android +------- + + - [QTBUG-36019] Enable using native style also when Ministro deployment + mechanism is not in use. + - [QTBUG-29069] Release all windows when the application is suspended. + - Added Gradle support to build the APK. + - [QTBUG-39688] Back key no longer kills the application when no window is + visible. + - [QTBUG-41365] Default open-source license for Qt for Android is now + LGPLv3. For compatibility with the LGPLv2.1 license, add + "-no-android-style-assets" to your configuration. + - [QTBUG-32399] Input panels are now hidden when focus changes to an object + that does not accept input. + - [QTBUG-41854] Added support for QClipboard::clear() + - [QTBUG-41852] Fixed memory leak in QClipboard::setMimeData() + - [QTBUG-41817] QClipboard::mimeData() now returns an empty object instead + of null pointer from QClipboard when clipboard is empty for consistency + with other platforms. + + - Important Behavior Changes: + * [QTBUG-36274] The main event loop is now stopped when the app is + suspended + +iOS +--- + + - [QTBUG-39097] Accessibility was added to the iOS platform port. This + enables Qt applications to be read by VoiceOver on iOS devices. + - [QTBUG-42276] Fixed path to QStandardPaths::DataLocation. Until now, + DataLocation was pointing to the Document directory. With this patch, + it will return the more accurate Library/Application Support. + Applications making use of DataLocation should move these data to the + new location. This can be done using the path provided by + DocumentLocation as the source path. + +Linux/XCB +--------- + + - [QTBUG-35832] Fixed transparency of tray icons in cases where there + is no alpha channel or system tray visual. + - environment variables QT_XCB_DEBUG_XINPUT and + QT_XCB_DEBUG_XINPUT_DEVICES are deprecated and replaced with logging + categories qt.qpa.events.input and qt.qpa.devices respectively + - [QTBUG-39572] Wacom touch devices are not mistaken for additional + graphics tablets any more. + + OS X ---- @@ -43,17 +415,51 @@ OS X - OS X 10.10 is now supported. - QMacStyle has been updated with better OS 10.10 support. - The Qt binary packages are now configured with C++11 enabled. + - [QTBUG-41208] Fixed detection of writing system support in fonts for + some scripts such as Mkhedruli. + - [QTBUG-41192] Fixed menu item shortcuts without keyboard modifiers. + - [QTBUG-31301] Drag-and-drop QMimeData requests are now delayed until + drop time. + - [QTBUG-10899] Added support for ApplicationState + capability. Application can now detect when an application states + have changed as well when the dock icon has been clicked. + + - Fonts: + * [QTBUG-40986][QTBUG-40549] Fixed missing glyph box shown in place of + some uncommon Unicode code points. Windows ------- - - [QTBUG-38259] Changed configure defaults so that Qt5Core does not - link against ICU libraries anymore. Pass '-icu' to enable it. + - [QTBUG-38259] Changed configure defaults so that Qt5Core does not link + against ICU libraries anymore. Pass '-icu' to enable it. + - [QTBUG-35432][QTBUG-23687] Command line parsing on Windows now uses + the WinAPI function CommandLineToArgvW() to exactly match the quoting + behavior used by the majority of applications. + + - Fonts: + * [QTBUG-41783] Fix off-by-one in font descent when using the + DirectWrite font engine. + * [QTBUG-39961] Set default fallback font to MS Shell Dlg 2 instead of + Arial. + +**************************************************************************** +* Compiler Specific Changes * +**************************************************************************** + + - Release builds with Microsoft Visual Studio 2013 now enable the + standard-conforming C and C++ strict string behavior. This option will + be enabled in all builds with future Visual Studio versions. + Non-conforming code should be fixed for maximum portability and + correctness. See http://msdn.microsoft.com/en-us/library/dn449508.aspx + for more information. **************************************************************************** -* Tools * +* Tools * **************************************************************************** + - [QTBUG-30900] The obsolete findtr script was removed. + configure & build system ------------------------ @@ -66,6 +472,12 @@ configure & build system from a pre-existing Qt installation. - [QTBUG-41267] Fixed parallelized (jom) -debug-and-release builds. +moc +--- + + - Fixed "zero as null pointer constant" warnings in moc's generated + code. + qmake ----- @@ -86,3 +498,22 @@ qmake - QMAKE_EXTRA_COMPILERS' commands and depend_command are no longer mangled. Use $$shell_path() and $$shell_quote() to prepare the commands correctly. - Added link-time optimization support for Clang, GCC and ICC. CONFIG+=ltgc. + +rcc +--- + + - rcc now supports an optional, two-pass compilation that improves build + times for large resource bundles. This feature can be enabled by adding + "CONFIG += resources_big" to your .pro file. Note that this feature may + interfere with builds that enable link-time code generation or other + optimization techniques. + +**************************************************************************** +* Third-party libraries * +**************************************************************************** + + - ANGLE has been upgraded to version 2.1, bringing partial support for + OpenGL ES3 over Direct3D 11, numerous bug fixes, and several new vendor + extensions. + - [QTBUG-40649][QTBUG-40658][QTBUG-41031][QTBUG-41081][QTBUG-41308][QTBUG- + 41563] ANGLE updated to 2.1~f8602ad91e4f -- cgit v1.2.3 From bb07737614d3fdf867e8e5da835554ae731ba04f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 19 Nov 2014 14:14:36 -0800 Subject: Fix the %{time} printing to *not* default to the process's time MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default should be the actual time of day. Showing the process's time is the optional case. In the future, we'll provide a way to showing the monotonic reference time ("boot") and we should improve the detection of actual application runtime. Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16 Reviewed-by: Jan Arve Sæther Reviewed-by: Shawn Rutledge --- dist/changes-5.4.0 | 5 +++++ src/corelib/global/qlogging.cpp | 18 +++++++++++------- tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 index f989904484..fc3e3a5466 100644 --- a/dist/changes-5.4.0 +++ b/dist/changes-5.4.0 @@ -97,6 +97,11 @@ QtCore - Logging: * QT_MESSAGE_PATTERN can include a backtrace using %{backtrace} + * QT_MESSAGE_PATTERN can include a timestamp using %{time}. By + default, this shows the time in ISO format (YYYY-MM-DDTHH:mm:ss), + but a different format string can be specified in the tag (e.g., + %{time YYYYMMDDHHmmsszzz}). If the format is "process", Qt will + display the elapsed time since the process started. * Added QtMsgType argument to QLoggingCategory constructor and Q_LOGGING_CATEGORY macro that controls the default category configuration. diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 39c5ac602e..843ec6b0ca 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1201,11 +1201,14 @@ QString qFormatLogMessage(QtMsgType type, const QMessageLogContext &context, con } #endif } else if (token == timeTokenC) { - quint64 ms = pattern->timer.elapsed(); - if (pattern->timeFormat.isEmpty()) + if (pattern->timeFormat == QLatin1String("process")) { + quint64 ms = pattern->timer.elapsed(); message.append(QString().sprintf("%6d.%03d", uint(ms / 1000), uint(ms % 1000))); - else - message.append(pattern->startTime.addMSecs(ms).toString(pattern->timeFormat)); + } else if (pattern->timeFormat.isEmpty()) { + message.append(QDateTime::currentDateTime().toString(Qt::ISODate)); + } else { + message.append(QDateTime::currentDateTime().toString(pattern->timeFormat)); + } #endif } else if (token == ifCategoryTokenC) { if (!context.category || (strcmp(context.category, "default") == 0)) @@ -1550,9 +1553,10 @@ void qErrnoWarning(int code, const char *msg, ...) \row \li \c %{pid} \li QCoreApplication::applicationPid() \row \li \c %{threadid} \li ID of current thread \row \li \c %{type} \li "debug", "warning", "critical" or "fatal" - \row \li \c %{time} \li time of the message, in seconds since the process started - \row \li \c %{time format} \li system time when the message occurred, formatted by - passing the \c format to \l QDateTime::toString() + \row \li \c %{time process} \li time of the message, in seconds since the process started (the token "process" is literal) + \row \li \c %{time [format]} \li system time when the message occurred, formatted by + passing the \c format to \l QDateTime::toString(). If the format is + not specified, the format of Qt::ISODate is used. \row \li \c{%{backtrace [depth=N] [separator="..."]}} \li A backtrace with the number of frames specified by the optional \c depth parameter (defaults to 5), and separated by the optional \c separator parameter (defaults to "|"). diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 0a55da5b7e..749c7da789 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -765,7 +765,7 @@ void tst_qmessagehandler::qMessagePattern_data() // %{time} should have a padding of 6 so if it takes less than 10 seconds to show // the first message, there should be 5 spaces - QTest::newRow("time") << "<%{time}>%{message}" << true << (QList() + QTest::newRow("time-process") << "<%{time process}>%{message}" << true << (QList() << "< "); #ifdef __GLIBC__ -- cgit v1.2.3 From d0ef89caaba9ee8c57428447f04a17233b8888f5 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Fri, 21 Nov 2014 10:15:58 +0100 Subject: Android: Make old manifests work on Android 5 On newer Androids, exceptions have started happening when using old manifests that refer to splash.xml because the layout is missing some required attributes. We add these to avoid crashing with these apps. Change-Id: Iefd4718e811df844e53890ee5bc772871d0a9803 Task-number: QTBUG-42807 Reviewed-by: Christian Stromme --- src/android/java/res/layout/splash.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/android/java/res/layout/splash.xml b/src/android/java/res/layout/splash.xml index 6875521a12..476d91a844 100644 --- a/src/android/java/res/layout/splash.xml +++ b/src/android/java/res/layout/splash.xml @@ -1,2 +1,4 @@ - + -- cgit v1.2.3 From f9408cc81c7d3cb3fa212005fb30cd8318ebf247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Fri, 21 Nov 2014 11:33:09 +0100 Subject: Android: protect global jni cache. This fixes a issue that has been neglected for a while, namely, that the access to the global jni caches where not sufficiently protected for concurrent usage. This change also fixes an issue with the thread-name storage. Task-number: QTBUG-42755 Change-Id: I22f95ae7f44d1f6a13e289e52b050d98ccb9fb28 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/corelib/kernel/qjni.cpp | 83 +++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 25 deletions(-) diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp index b179323fdc..9d74fd69de 100644 --- a/src/corelib/kernel/qjni.cpp +++ b/src/corelib/kernel/qjni.cpp @@ -37,6 +37,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -45,11 +46,6 @@ static inline QString keyBase() return QStringLiteral("%1%2%3"); } -static inline QByteArray threadBaseName() -{ - return QByteArrayLiteral("QtThread-"); -} - static QString qt_convertJString(jstring string) { QJNIEnvironmentPrivate env; @@ -74,6 +70,7 @@ static inline bool exceptionCheckAndClear(JNIEnv *env) typedef QHash JClassHash; Q_GLOBAL_STATIC(JClassHash, cachedClasses) +Q_GLOBAL_STATIC(QReadWriteLock, cachedClassesLock) static QString toDotEncodedClassName(const char *className) { @@ -82,8 +79,9 @@ static QString toDotEncodedClassName(const char *className) static jclass getCachedClass(const QString &classDotEnc, bool *isCached = 0) { - QHash::iterator it = cachedClasses->find(classDotEnc); - const bool found = (it != cachedClasses->end()); + QReadLocker locker(cachedClassesLock); + const QHash::const_iterator &it = cachedClasses->constFind(classDotEnc); + const bool found = (it != cachedClasses->constEnd()); if (isCached != 0) *isCached = found; @@ -102,6 +100,12 @@ static jclass loadClassDotEnc(const QString &classDotEnc, JNIEnv *env) if (!classLoader.isValid()) return 0; + QWriteLocker locker(cachedClassesLock); + // did we lose the race? + const QHash::const_iterator &it = cachedClasses->constFind(classDotEnc); + if (it != cachedClasses->constEnd()) + return it.value(); + QJNIObjectPrivate stringName = QJNIObjectPrivate::fromString(classDotEnc); QJNIObjectPrivate classObject = classLoader.callObjectMethod("loadClass", "(Ljava/lang/String;)Ljava/lang/Class;", @@ -121,6 +125,7 @@ inline static jclass loadClass(const char *className, JNIEnv *env) typedef QHash JMethodIDHash; Q_GLOBAL_STATIC(JMethodIDHash, cachedMethodID) +Q_GLOBAL_STATIC(QReadWriteLock, cachedMethodIDLock) static jmethodID getCachedMethodID(JNIEnv *env, jclass clazz, @@ -128,11 +133,24 @@ static jmethodID getCachedMethodID(JNIEnv *env, const char *sig, bool isStatic = false) { - jmethodID id = 0; // TODO: We need to use something else then the ref. from clazz to avoid collisions. - QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig)); - QHash::iterator it = cachedMethodID->find(key); - if (it == cachedMethodID->end()) { + const QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig)); + QHash::const_iterator it; + + { + QReadLocker locker(cachedMethodIDLock); + it = cachedMethodID->constFind(key); + if (it != cachedMethodID->constEnd()) + return it.value(); + } + + { + QWriteLocker locker(cachedMethodIDLock); + it = cachedMethodID->constFind(key); + if (it != cachedMethodID->constEnd()) + return it.value(); + + jmethodID id = 0; if (isStatic) id = env->GetStaticMethodID(clazz, name, sig); else @@ -142,14 +160,13 @@ static jmethodID getCachedMethodID(JNIEnv *env, id = 0; cachedMethodID->insert(key, id); - } else { - id = it.value(); + return id; } - return id; } typedef QHash JFieldIDHash; Q_GLOBAL_STATIC(JFieldIDHash, cachedFieldID) +Q_GLOBAL_STATIC(QReadWriteLock, cachedFieldIDLock) static jfieldID getCachedFieldID(JNIEnv *env, jclass clazz, @@ -157,10 +174,23 @@ static jfieldID getCachedFieldID(JNIEnv *env, const char *sig, bool isStatic = false) { - jfieldID id = 0; - QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig)); - QHash::iterator it = cachedFieldID->find(key); - if (it == cachedFieldID->end()) { + const QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig)); + QHash::const_iterator it; + + { + QReadLocker locker(cachedFieldIDLock); + it = cachedFieldID->constFind(key); + if (it != cachedFieldID->constEnd()) + return it.value(); + } + + { + QWriteLocker locker(cachedFieldIDLock); + it = cachedFieldID->constFind(key); + if (it != cachedFieldID->constEnd()) + return it.value(); + + jfieldID id = 0; if (isStatic) id = env->GetStaticFieldID(clazz, name, sig); else @@ -170,10 +200,8 @@ static jfieldID getCachedFieldID(JNIEnv *env, id = 0; cachedFieldID->insert(key, id); - } else { - id = it.value(); + return id; } - return id; } class QJNIEnvironmentPrivateTLS @@ -187,14 +215,14 @@ public: Q_GLOBAL_STATIC(QThreadStorage, jniEnvTLS) +static const char qJniThreadName[] = "QtThread"; + QJNIEnvironmentPrivate::QJNIEnvironmentPrivate() : jniEnv(0) { JavaVM *vm = QtAndroidPrivate::javaVM(); if (vm->GetEnv((void**)&jniEnv, JNI_VERSION_1_6) == JNI_EDETACHED) { - const qulonglong id = reinterpret_cast(QThread::currentThreadId()); - const QByteArray threadName = threadBaseName() + QByteArray::number(id); - JavaVMAttachArgs args = { JNI_VERSION_1_6, threadName, Q_NULLPTR }; + JavaVMAttachArgs args = { JNI_VERSION_1_6, qJniThreadName, Q_NULLPTR }; if (vm->AttachCurrentThread(&jniEnv, &args) != JNI_OK) return; } @@ -223,6 +251,12 @@ jclass QJNIEnvironmentPrivate::findClass(const char *className, JNIEnv *env) return clazz; if (env != 0) { // We got an env. pointer (We expect this to be the right env. and call FindClass()) + QWriteLocker locker(cachedClassesLock); + const QHash::const_iterator &it = cachedClasses->constFind(classDotEnc); + // Did we lose the race? + if (it != cachedClasses->constEnd()) + return it.value(); + jclass fclazz = env->FindClass(className); if (!exceptionCheckAndClear(env)) { clazz = static_cast(env->NewGlobalRef(fclazz)); @@ -400,7 +434,6 @@ QJNIObjectPrivate::QJNIObjectPrivate(jobject obj) d->m_jclass = static_cast(env->NewGlobalRef(objectClass)); env->DeleteLocalRef(objectClass); } - template <> void QJNIObjectPrivate::callMethodV(const char *methodName, const char *sig, va_list args) const { -- cgit v1.2.3 From c9c40af130763d81531ebee35d22d3b5573f48ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Wed, 12 Nov 2014 12:27:39 +0200 Subject: Mark QSocks5SocketEngine tests blacklisted This patch is cherry-picked from 63ae74f36533d92c5b38df1eb2a7fcf4c586bf11 and 07f234d2a8283081aabdd1465f09b04a26bec1a3 Task-number: QTBUG-42528 Change-Id: I5f86679e62a4be48ce25afa5a4987a2b6678a357 Reviewed-by: Frederik Gladhorn --- tests/auto/network/socket/qsocks5socketengine/BLACKLIST | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/auto/network/socket/qsocks5socketengine/BLACKLIST diff --git a/tests/auto/network/socket/qsocks5socketengine/BLACKLIST b/tests/auto/network/socket/qsocks5socketengine/BLACKLIST new file mode 100644 index 0000000000..bf4afa8c45 --- /dev/null +++ b/tests/auto/network/socket/qsocks5socketengine/BLACKLIST @@ -0,0 +1,4 @@ +[udpTest] +* +[passwordAuth] +* -- cgit v1.2.3 From 800f832201267bcbf6a7e9b4b9dbc69f9029dcc0 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 21 Nov 2014 15:30:01 +0100 Subject: Apply r1513 to our PCRE bundled copy Fixes CVE-2014-8964. Upstream diff: http://www.exim.org/viewvc/pcre?view=revision&revision=1513 Change-Id: I59dc1f4c290e29ab5f22ed68eaeba702f4232e0e Reviewed-by: Oswald Buddenhagen Reviewed-by: Lars Knoll Reviewed-by: Richard J. Moore --- src/3rdparty/pcre/patches/pcre-r1513.patch | 18 ++++++++++++++++++ src/3rdparty/pcre/pcre_exec.c | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 src/3rdparty/pcre/patches/pcre-r1513.patch diff --git a/src/3rdparty/pcre/patches/pcre-r1513.patch b/src/3rdparty/pcre/patches/pcre-r1513.patch new file mode 100644 index 0000000000..d84aa0cc61 --- /dev/null +++ b/src/3rdparty/pcre/patches/pcre-r1513.patch @@ -0,0 +1,18 @@ +Index: pcre_exec.c +=================================================================== +--- pcre_exec.c (revisione 1512) ++++ pcre_exec.c (revisione 1513) +@@ -1404,8 +1404,11 @@ + condition = TRUE; + + /* Advance ecode past the assertion to the start of the first branch, +- but adjust it so that the general choosing code below works. */ +- ++ but adjust it so that the general choosing code below works. If the ++ assertion has a quantifier that allows zero repeats we must skip over ++ the BRAZERO. This is a lunatic thing to do, but somebody did! */ ++ ++ if (*ecode == OP_BRAZERO) ecode++; + ecode += GET(ecode, 1); + while (*ecode == OP_ALT) ecode += GET(ecode, 1); + ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode]; diff --git a/src/3rdparty/pcre/pcre_exec.c b/src/3rdparty/pcre/pcre_exec.c index b0101da351..7755aaf13a 100644 --- a/src/3rdparty/pcre/pcre_exec.c +++ b/src/3rdparty/pcre/pcre_exec.c @@ -1394,8 +1394,11 @@ for (;;) condition = TRUE; /* Advance ecode past the assertion to the start of the first branch, - but adjust it so that the general choosing code below works. */ - + but adjust it so that the general choosing code below works. If the + assertion has a quantifier that allows zero repeats we must skip over + the BRAZERO. This is a lunatic thing to do, but somebody did! */ + + if (*ecode == OP_BRAZERO) ecode++; ecode += GET(ecode, 1); while (*ecode == OP_ALT) ecode += GET(ecode, 1); ecode += 1 + LINK_SIZE - PRIV(OP_lengths)[condcode]; -- cgit v1.2.3 From d958a16bc15603dc3dfce36d126b4917d4290945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Thu, 13 Nov 2014 13:25:12 +0200 Subject: Blacklist one test function in tst_QNetworkReply This patch is cherry-picked from c38f1f19b87d20f79394bca151268fc3cdcdd189 and d29d727d720fa4ac7ba046b6bfb96707586de7d3 Task-number: QTBUG-32435 Change-Id: I6dbbb668b96737a5791bc688949a00bc09f1357f Reviewed-by: Frederik Gladhorn --- tests/auto/network/access/qnetworkreply/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index fbd72492d8..7792e05e0f 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -7,3 +7,6 @@ osx [SslHandshakeFailedError] osx [httpAbort] +* +[backgroundRequestInterruption:ftp, bg, nobg] +* -- cgit v1.2.3 From 0fc578829115d593c9a09bd4b2a5e9fea1a759d1 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 21 Nov 2014 16:08:29 +0100 Subject: Fix for HTC Pinyin input method HTC does not do beginBatchEdit/endBatchEdit when committing text. We implement the commit in two steps: first set the text, then move the cursor. To avoid sending an updateSelection for the intermediate state, we need to block updates when we set the text in the editor. Task-number: QTBUG-42300 Change-Id: Icd18700ecf1fba5acb9f8a78762555c1309b221b Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/android/qandroidinputcontext.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/platforms/android/qandroidinputcontext.cpp b/src/plugins/platforms/android/qandroidinputcontext.cpp index a3848c9c2b..7e81735de9 100644 --- a/src/plugins/platforms/android/qandroidinputcontext.cpp +++ b/src/plugins/platforms/android/qandroidinputcontext.cpp @@ -611,6 +611,9 @@ jboolean QAndroidInputContext::endBatchEdit() */ jboolean QAndroidInputContext::commitText(const QString &text, jint newCursorPosition) { + bool updateSelectionWasBlocked = m_blockUpdateSelection; + m_blockUpdateSelection = true; + QInputMethodEvent event; event.setCommitString(text); sendInputMethodEventThreadSafe(&event); @@ -630,6 +633,7 @@ jboolean QAndroidInputContext::commitText(const QString &text, jint newCursorPos newLocalPos, 0, QVariant())); } } + m_blockUpdateSelection = updateSelectionWasBlocked; updateCursorPosition(); return JNI_TRUE; -- cgit v1.2.3 From 78c43ce8ea882839bb507ebb2a71ec6752697d8e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Sat, 22 Nov 2014 19:37:29 +0100 Subject: Update 5.4.0 changes with missing entries Change-Id: I2bd0fb79817ac391a2a7c6b9d12ccef5c19ebd88 Reviewed-by: Thiago Macieira --- dist/changes-5.4.0 | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 index fc3e3a5466..2b6cd2b4db 100644 --- a/dist/changes-5.4.0 +++ b/dist/changes-5.4.0 @@ -198,6 +198,10 @@ QtGui ----- - Added QPixelFormat class. + - Added QOpenGLWidget class. + - Added QOpenGLWindow class. + - Added QRasterWindow class. + - QOpenGLContext is now able to adopt existing native contexts. - [QTBUG-38168] QtGui's OpenGL headers are now automatically including the highest available header (gl31.h, gl3.h or gl2.h) in OpenGL ES builds. - [QTBUG-36483] Dynamic OpenGL implementation loading is now supported on @@ -205,6 +209,10 @@ QtGui - [QTBUG-39583] Keymaps are now changeable at runtime when using eglfs. - [QTBUG-40841] environment variable QT_DBL_CLICK_DIST customizes the amount of movement allowed when detecting a double click. + - [QTBUG-37552] The eglfs mouse cursor properly resets the array buffer + from now on to avoid rendering issues. + - [QTBUG-40093] QWindow::close() is changed to send a QCloseEvent which + must be accepted before destroy() will be called. - Clipboard: * [QTBUG-41852] Fixed a memory leak in setMimeData() when the platform @@ -250,7 +258,11 @@ QtGui accounting for QDataStream versions greater than Qt 4.5. - Tablet support: - * [QTBUG-39458] Added buttons to QTabletEvent + * [QTBUG-39458] Added buttons to QTabletEvent. + * [QTBUG-39666] Events correctly identify the tool. + * [QTBUG-39570][QTBUG-40469] Corrected valuator ranges across platforms. + * Better support for non-Wacom devices. + * Better manual test to verify more features. - Text: * [QTBUG-41372] Fixed regression when rendering Uchen text in WebKit @@ -311,6 +323,8 @@ QtWidgets - [QTBUG-32888] Accessibility for widgets is now included in the widget library instead of being a separate plugin. For static builds this means that libqtaccessiblewidgets is no longer required. + - [QTBUG-39814] Accessors for Qt::MouseEventSource and Qt::MouseEventFlags + are now available in QGraphicsSceneMouseEvent. - QComboBox: * [QTBUG-33537] Fixed positions of items when QComboBox is set as @@ -365,6 +379,10 @@ QtWidgets * Platform Specific Changes * **************************************************************************** +- Several QPA logging categories are added under qt.qpa to enable logging + of various platform-specific details. qt.qpa.input is now used + consistently. + Android ------- @@ -408,10 +426,9 @@ Linux/XCB is no alpha channel or system tray visual. - environment variables QT_XCB_DEBUG_XINPUT and QT_XCB_DEBUG_XINPUT_DEVICES are deprecated and replaced with logging - categories qt.qpa.events.input and qt.qpa.devices respectively - - [QTBUG-39572] Wacom touch devices are not mistaken for additional - graphics tablets any more. - + categories qt.qpa.input and qt.qpa.input.devices respectively + - [QTBUG-39572] Wacom touch devices are now working correctly. + - [QTBUG-42249] A path to a font file can now contain non-Latin characters. OS X ---- @@ -522,3 +539,6 @@ rcc extensions. - [QTBUG-40649][QTBUG-40658][QTBUG-41031][QTBUG-41081][QTBUG-41308][QTBUG- 41563] ANGLE updated to 2.1~f8602ad91e4f + - [QTBUG-41031] The ANGLE D3D11 renderer is now enabled by default. Systems + which cannot use the new renderer will automatically fall back to the D3D9 + renderer at runtime. -- cgit v1.2.3 From f88ab80c8a7510ff01410631eeaec81d48365316 Mon Sep 17 00:00:00 2001 From: Alejandro Exojo Date: Fri, 21 Nov 2014 12:44:33 +0100 Subject: Use camel case in PKCS#12 function This makes it follow the coding style, which says to camel case acronyms too, and makes it consistent with the rest of the class. Change-Id: I4a1b21de1815530e476fc5aa8a0d41c724fc8021 Reviewed-by: Richard J. Moore Reviewed-by: hjk --- src/network/ssl/qsslcertificate.cpp | 4 ++-- src/network/ssl/qsslcertificate.h | 2 +- src/network/ssl/qsslsocket_openssl.cpp | 2 +- src/network/ssl/qsslsocket_openssl_p.h | 2 +- src/network/ssl/qsslsocket_winrt.cpp | 2 +- src/network/ssl/qsslsocket_winrt_p.h | 2 +- tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 13bddcb3ea..125a7a0250 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -575,12 +575,12 @@ QList QSslCertificate::verify(QList certificateChain \note The \a device must be open and ready to be read from. */ -bool QSslCertificate::importPKCS12(QIODevice *device, +bool QSslCertificate::importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *certificate, QList *caCertificates, const QByteArray &passPhrase) { - return QSslSocketBackendPrivate::importPKCS12(device, key, certificate, caCertificates, passPhrase); + return QSslSocketBackendPrivate::importPkcs12(device, key, certificate, caCertificates, passPhrase); } // These certificates are known to be fraudulent and were created during the comodo diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h index e34ea97fc4..6aa7544815 100644 --- a/src/network/ssl/qsslcertificate.h +++ b/src/network/ssl/qsslcertificate.h @@ -138,7 +138,7 @@ public: static QList verify(QList certificateChain, const QString &hostName = QString()); - static bool importPKCS12(QIODevice *device, + static bool importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert, QList *caCertificates=0, const QByteArray &passPhrase=QByteArray()); diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 84b0d9c75e..13fc534259 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -1671,7 +1671,7 @@ QList QSslSocketBackendPrivate::verify(QList certifi return errors; } -bool QSslSocketBackendPrivate::importPKCS12(QIODevice *device, +bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert, QList *caCertificates, const QByteArray &passPhrase) diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h index 8b02f32be0..29907e9ae7 100644 --- a/src/network/ssl/qsslsocket_openssl_p.h +++ b/src/network/ssl/qsslsocket_openssl_p.h @@ -136,7 +136,7 @@ public: static QList STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509); static QList verify(QList certificateChain, const QString &hostName); static QString getErrorsFromOpenSsl(); - static bool importPKCS12(QIODevice *device, + static bool importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert, QList *caCertificates, const QByteArray &passPhrase); diff --git a/src/network/ssl/qsslsocket_winrt.cpp b/src/network/ssl/qsslsocket_winrt.cpp index da4c72be01..418a7416e4 100644 --- a/src/network/ssl/qsslsocket_winrt.cpp +++ b/src/network/ssl/qsslsocket_winrt.cpp @@ -661,7 +661,7 @@ QList QSslSocketBackendPrivate::verify(QList certifi return errors; } -bool QSslSocketBackendPrivate::importPKCS12(QIODevice *device, +bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert, QList *caCertificates, const QByteArray &passPhrase) diff --git a/src/network/ssl/qsslsocket_winrt_p.h b/src/network/ssl/qsslsocket_winrt_p.h index aa31c85d6e..f0df7c6ef1 100644 --- a/src/network/ssl/qsslsocket_winrt_p.h +++ b/src/network/ssl/qsslsocket_winrt_p.h @@ -92,7 +92,7 @@ public: static QList defaultCiphers(); static QList verify(QList certificateChain, const QString &hostName); - static bool importPKCS12(QIODevice *device, + static bool importPkcs12(QIODevice *device, QSslKey *key, QSslCertificate *cert, QList *caCertificates, const QByteArray &passPhrase); diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp index 49ff1b48fe..82050e73fd 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -1312,7 +1312,7 @@ void tst_QSslCertificate::pkcs12() #ifdef QT_NO_OPENSSL QEXPECT_FAIL("", "QTBUG-40884: WinRT API does not support pkcs12 imports", Abort); #endif - ok = QSslCertificate::importPKCS12(&f, &key, &cert, &caCerts); + ok = QSslCertificate::importPkcs12(&f, &key, &cert, &caCerts); QVERIFY(ok); f.close(); -- cgit v1.2.3 From 155306ffee1941194d44dd632a7993fce4a05606 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 24 Nov 2014 10:52:03 +0100 Subject: ANGLE: Fix releasing textures after we kill D3D11 Cherry-pick upstream commit cc4cd2925b9a4f1142a86df131345a861c9d7cd9 to fix crashes on exit. Task-number: QTBUG-42772 Change-Id: Ib74be17f2b5fdd58f9e0568e1da74ba19e943019 Reviewed-by: Andrew Knight Reviewed-by: Friedemann Kleint --- src/3rdparty/angle/src/libGLESv2/Context.cpp | 6 -- src/3rdparty/angle/src/libGLESv2/Context.h | 1 - .../src/libGLESv2/renderer/d3d/RendererD3D.cpp | 5 + .../angle/src/libGLESv2/renderer/d3d/RendererD3D.h | 2 + .../libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 2 + .../src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 2 + ...ix-releasing-textures-after-we-kill-D3D11.patch | 106 +++++++++++++++++++++ 7 files changed, 117 insertions(+), 7 deletions(-) create mode 100644 src/angle/patches/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch diff --git a/src/3rdparty/angle/src/libGLESv2/Context.cpp b/src/3rdparty/angle/src/libGLESv2/Context.cpp index b87689cd3f..3772da6f42 100644 --- a/src/3rdparty/angle/src/libGLESv2/Context.cpp +++ b/src/3rdparty/angle/src/libGLESv2/Context.cpp @@ -162,12 +162,6 @@ Context::~Context() deleteTransformFeedback(mTransformFeedbackMap.begin()->first); } - for (TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); i++) - { - i->second.set(NULL); - } - mIncompleteTextures.clear(); - for (TextureMap::iterator i = mZeroTextures.begin(); i != mZeroTextures.end(); i++) { i->second.set(NULL); diff --git a/src/3rdparty/angle/src/libGLESv2/Context.h b/src/3rdparty/angle/src/libGLESv2/Context.h index 1e890de3ef..0699592d91 100644 --- a/src/3rdparty/angle/src/libGLESv2/Context.h +++ b/src/3rdparty/angle/src/libGLESv2/Context.h @@ -247,7 +247,6 @@ class Context int mClientVersion; TextureMap mZeroTextures; - TextureMap mIncompleteTextures; typedef std::unordered_map FramebufferMap; FramebufferMap mFramebufferMap; diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp index 97da6da7fd..5cddd8ab5e 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp @@ -26,6 +26,11 @@ RendererD3D::RendererD3D(egl::Display *display) } RendererD3D::~RendererD3D() +{ + cleanup(); +} + +void RendererD3D::cleanup() { for (gl::TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); ++i) { diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h index 9919207667..a2f778763c 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h @@ -160,6 +160,8 @@ class RendererD3D : public Renderer const gl::Rectangle *scissor, bool blitRenderTarget, bool blitDepth, bool blitStencil, GLenum filter) = 0; + void cleanup(); + egl::Display *mDisplay; private: diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp index e6d7f3025b..777308e6cc 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp @@ -1870,6 +1870,8 @@ bool Renderer11::testDeviceResettable() void Renderer11::release() { + RendererD3D::cleanup(); + releaseShaderCompiler(); releaseDeviceResources(); diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp index 601cd24b10..18e6e2d7f0 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp +++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp @@ -151,6 +151,8 @@ Renderer9::~Renderer9() void Renderer9::release() { + RendererD3D::cleanup(); + releaseShaderCompiler(); releaseDeviceResources(); diff --git a/src/angle/patches/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch b/src/angle/patches/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch new file mode 100644 index 0000000000..97847ad684 --- /dev/null +++ b/src/angle/patches/0018-ANGLE-Fix-releasing-textures-after-we-kill-D3D11.patch @@ -0,0 +1,106 @@ +From 014d3fcf6011109491b0489da9c1abb1fdc6dbdc Mon Sep 17 00:00:00 2001 +From: Kai Koehne +Date: Mon, 24 Nov 2014 10:52:03 +0100 +Subject: [PATCH] ANGLE: Fix releasing textures after we kill D3D11 + +Cherry-pick upstream commit cc4cd2925b9a4f1142a86df131345a861c9d7cd9 +to fix crashes on exit. + +Task-number: QTBUG-42772 +Change-Id: Ib74be17f2b5fdd58f9e0568e1da74ba19e943019 +--- + src/3rdparty/angle/src/libGLESv2/Context.cpp | 6 ------ + src/3rdparty/angle/src/libGLESv2/Context.h | 1 - + src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp | 5 +++++ + src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h | 2 ++ + src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp | 2 ++ + src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp | 2 ++ + 6 files changed, 11 insertions(+), 7 deletions(-) + +diff --git a/src/3rdparty/angle/src/libGLESv2/Context.cpp b/src/3rdparty/angle/src/libGLESv2/Context.cpp +index b87689c..3772da6 100644 +--- a/src/3rdparty/angle/src/libGLESv2/Context.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/Context.cpp +@@ -162,12 +162,6 @@ Context::~Context() + deleteTransformFeedback(mTransformFeedbackMap.begin()->first); + } + +- for (TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); i++) +- { +- i->second.set(NULL); +- } +- mIncompleteTextures.clear(); +- + for (TextureMap::iterator i = mZeroTextures.begin(); i != mZeroTextures.end(); i++) + { + i->second.set(NULL); +diff --git a/src/3rdparty/angle/src/libGLESv2/Context.h b/src/3rdparty/angle/src/libGLESv2/Context.h +index 1e890de..0699592 100644 +--- a/src/3rdparty/angle/src/libGLESv2/Context.h ++++ b/src/3rdparty/angle/src/libGLESv2/Context.h +@@ -247,7 +247,6 @@ class Context + int mClientVersion; + + TextureMap mZeroTextures; +- TextureMap mIncompleteTextures; + + typedef std::unordered_map FramebufferMap; + FramebufferMap mFramebufferMap; +diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp +index 97da6da..5cddd8a 100644 +--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.cpp +@@ -27,6 +27,11 @@ RendererD3D::RendererD3D(egl::Display *display) + + RendererD3D::~RendererD3D() + { ++ cleanup(); ++} ++ ++void RendererD3D::cleanup() ++{ + for (gl::TextureMap::iterator i = mIncompleteTextures.begin(); i != mIncompleteTextures.end(); ++i) + { + i->second.set(NULL); +diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h +index 9919207..a2f7787 100644 +--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h ++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/RendererD3D.h +@@ -160,6 +160,8 @@ class RendererD3D : public Renderer + const gl::Rectangle *scissor, bool blitRenderTarget, + bool blitDepth, bool blitStencil, GLenum filter) = 0; + ++ void cleanup(); ++ + egl::Display *mDisplay; + + private: +diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp +index e6d7f30..777308e 100644 +--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d11/Renderer11.cpp +@@ -1870,6 +1870,8 @@ bool Renderer11::testDeviceResettable() + + void Renderer11::release() + { ++ RendererD3D::cleanup(); ++ + releaseShaderCompiler(); + releaseDeviceResources(); + +diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp +index 601cd24..18e6e2d 100644 +--- a/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/renderer/d3d/d3d9/Renderer9.cpp +@@ -151,6 +151,8 @@ Renderer9::~Renderer9() + + void Renderer9::release() + { ++ RendererD3D::cleanup(); ++ + releaseShaderCompiler(); + releaseDeviceResources(); + +-- +1.9.4.msysgit.0 + -- cgit v1.2.3 From 9b01589e58d458b6367b3578079e73ddc2ef458f Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Tue, 25 Nov 2014 13:31:20 +0200 Subject: Turn off optimizations of qt_depthForFormat on Windows Runtime ARM This function is apparently optimized in a way that gives a bad return value (or leaves the variable where it is used uninitialized), leading to extreme memory allocations and eventual heap exhaustion. Task-number: QTBUG-42038 Change-Id: Ia4ee9fc6475a0bf40e25eed356b027a4dc68d119 Reviewed-by: Maurice Kalinowski --- src/gui/image/qimage_p.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/image/qimage_p.h b/src/gui/image/qimage_p.h index eec54ed4eb..7e2d4305ef 100644 --- a/src/gui/image/qimage_p.h +++ b/src/gui/image/qimage_p.h @@ -116,6 +116,9 @@ void qInitImageConversions(); const uchar *qt_get_bitflip_array(); Q_GUI_EXPORT void qGamma_correct_back_to_linear_cs(QImage *image); +#if defined(Q_OS_WINRT) && defined(_M_ARM) // QTBUG-42038 +#pragma optimize("", off) +#endif inline int qt_depthForFormat(QImage::Format format) { int depth = 0; @@ -158,6 +161,9 @@ inline int qt_depthForFormat(QImage::Format format) } return depth; } +#if defined(Q_OS_WINRT) && defined(_M_ARM) +#pragma optimize("", on) +#endif QT_END_NAMESPACE -- cgit v1.2.3 From aed71b6832703e0c6cb953ac9a5cd7cfba95f7b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Saraj=C3=A4rvi?= Date: Tue, 25 Nov 2014 11:05:10 +0200 Subject: Blacklist one tst_qsslsocket test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-29941 Change-Id: Ieb3418a2d6d88ebd399964b5df20d9fe4d6ca37b Reviewed-by: Simo Fält --- tests/auto/network/ssl/qsslsocket/BLACKLIST | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 tests/auto/network/ssl/qsslsocket/BLACKLIST diff --git a/tests/auto/network/ssl/qsslsocket/BLACKLIST b/tests/auto/network/ssl/qsslsocket/BLACKLIST new file mode 100644 index 0000000000..17b606e2be --- /dev/null +++ b/tests/auto/network/ssl/qsslsocket/BLACKLIST @@ -0,0 +1,2 @@ +[waitForConnectedEncryptedReadyRead:WithSocks5ProxyAuth] +* -- cgit v1.2.3 From 89867f86fc5766c30253748560b8c16f721e808e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 24 Nov 2014 16:44:31 +0100 Subject: iOS, QComboBox: don't apply special case for OS X on iOS The special-case that was added for OS X before the iOS port came to be stops the virtual keyboard from working correctly. Task-number: QTBUG-41613 Change-Id: I0b8c83e98584389ea4a8aada16a1ee1a64300400 Reviewed-by: Jake Petroules --- src/widgets/widgets/qcombobox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index fda37c49de..40cf2f0f95 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -942,8 +942,8 @@ QComboBox::QComboBox(QComboBoxPrivate &dd, QWidget *parent) void QComboBoxPrivate::init() { Q_Q(QComboBox); -#ifdef Q_OS_MAC - // On Mac, only line edits and list views always get tab focus. It's only +#ifdef Q_OS_OSX + // On OS X, only line edits and list views always get tab focus. It's only // when we enable full keyboard access that other controls can get tab focus. // When it's not editable, a combobox looks like a button, and it behaves as // such in this respect. -- cgit v1.2.3 From 503b9c318164122b0111f6d0d9d3b680c8ca016f Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Mon, 24 Nov 2014 11:21:07 +0100 Subject: iOS: fallback to use [UIScreen mainScreen] when [UIScreen screens] fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On iOS 7.1 [UIScreen screens] sometimes (and against documentation) returns an empty array, which will lead to a crash. This patch will add a fallback path that uses [UIScreen mainScreen] instead when the screen count is 0. Task-number: QTBUG-42345 Change-Id: Ie72578ff7ecd0c8fbc971fafea45047bf1347cd9 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosintegration.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 9a722ead37..461f160892 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -88,7 +88,13 @@ QIOSIntegration::QIOSIntegration() // Set current directory to app bundle folder QDir::setCurrent(QString::fromUtf8([[[NSBundle mainBundle] bundlePath] UTF8String])); - for (UIScreen *screen in [UIScreen screens]) + NSMutableArray *screens = [[[UIScreen screens] mutableCopy] autorelease]; + if (![screens containsObject:[UIScreen mainScreen]]) { + // Fallback for iOS 7.1 (QTBUG-42345) + [screens insertObject:[UIScreen mainScreen] atIndex:0]; + } + + for (UIScreen *screen in screens) addScreen(new QIOSScreen(screen)); // Depends on a primary screen being present -- cgit v1.2.3 From 37fb892767baa08fca6f5172c51bdc1e270c72ec Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 24 Nov 2014 12:15:34 +0100 Subject: Android: Report error when OpenSSL is on and headers are missing There was an override for Android which would disable the configure error when doing an OpenSSL build without having the headers available. This has several times lead to packaging errors where OpenSSL gets disabled but it's not noticed before the package testing, which delays the process. I'm not 100% sure of the reasoning behind the override, but I think it's a left-over from Necessitas where OpenSSL was statically linked into Qt. Change-Id: I2bdc33fb60c59cd493987959d4bbbbb4e9735a92 Task-number: QTBUG-42851 Reviewed-by: Frederik Gladhorn Reviewed-by: BogDan Vatra Reviewed-by: Kai Koehne Reviewed-by: Oswald Buddenhagen --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 1a002b4081..d95d8a2a4a 100755 --- a/configure +++ b/configure @@ -5481,7 +5481,7 @@ if [ "$CFG_OPENSSL" != "no" ]; then CFG_OPENSSL=yes fi else - if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ] && [ "$XPLATFORM_ANDROID" = "no" ]; then + if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then echo "OpenSSL support cannot be enabled due to functionality tests!" echo " Turn on verbose messaging (-v) to $0 to see the final report." echo " If you believe this message is in error you may use the continue" -- cgit v1.2.3 From 6ea6ee7a129523dfe2973b92359afd672ef92f47 Mon Sep 17 00:00:00 2001 From: Alejandro Exojo Date: Thu, 20 Nov 2014 12:55:56 +0100 Subject: Adjust DBMSType to DbmsType to follow conventions The enum was made public in f84b00c6d26eb7a3a6802210d2a8b12ddbf815aa, but this makes it follow the convention to camel case acronyms too before it's too late to change it. Change-Id: Ibb81e9221cb73fe0502d0a26f2d73512dd142f08 Reviewed-by: Thiago Macieira --- src/sql/kernel/qsqldriver.cpp | 6 +-- src/sql/kernel/qsqldriver.h | 6 +-- src/sql/kernel/qsqldriver_p.h | 4 +- tests/auto/sql/kernel/qsqldatabase/tst_databases.h | 10 ++--- .../sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 32 +++++++-------- .../auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp | 6 +-- tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp | 46 +++++++++++----------- .../models/qsqlquerymodel/tst_qsqlquerymodel.cpp | 8 ++-- .../tst_qsqlrelationaltablemodel.cpp | 20 +++++----- .../models/qsqltablemodel/tst_qsqltablemodel.cpp | 6 +-- tests/benchmarks/sql/kernel/qsqlquery/main.cpp | 6 +-- 11 files changed, 75 insertions(+), 75 deletions(-) diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp index 736fe310e3..f218016876 100644 --- a/src/sql/kernel/qsqldriver.cpp +++ b/src/sql/kernel/qsqldriver.cpp @@ -237,11 +237,11 @@ bool QSqlDriver::isOpenError() const */ /*! - \enum QSqlDriver::DBMSType + \enum QSqlDriver::DbmsType This enum contains DBMS types. - \value UnknownDBMS + \value UnknownDbms \value MSSqlServer \value MySqlServer \value PostgreSQL @@ -787,7 +787,7 @@ QSql::NumericalPrecisionPolicy QSqlDriver::numericalPrecisionPolicy() const Returns the current DBMS type for the database connection. */ -QSqlDriver::DBMSType QSqlDriver::dbmsType() const +QSqlDriver::DbmsType QSqlDriver::dbmsType() const { return d_func()->dbmsType; } diff --git a/src/sql/kernel/qsqldriver.h b/src/sql/kernel/qsqldriver.h index 767c1ac74d..eabda74da5 100644 --- a/src/sql/kernel/qsqldriver.h +++ b/src/sql/kernel/qsqldriver.h @@ -71,8 +71,8 @@ public: enum NotificationSource { UnknownSource, SelfSource, OtherSource }; - enum DBMSType { - UnknownDBMS, + enum DbmsType { + UnknownDbms, MSSqlServer, MySqlServer, PostgreSQL, @@ -123,7 +123,7 @@ public: void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy precisionPolicy); QSql::NumericalPrecisionPolicy numericalPrecisionPolicy() const; - DBMSType dbmsType() const; + DbmsType dbmsType() const; public Q_SLOTS: virtual bool cancelQuery(); diff --git a/src/sql/kernel/qsqldriver_p.h b/src/sql/kernel/qsqldriver_p.h index 427e3984fa..c511f8e13b 100644 --- a/src/sql/kernel/qsqldriver_p.h +++ b/src/sql/kernel/qsqldriver_p.h @@ -61,14 +61,14 @@ public: isOpen(false), isOpenError(false), precisionPolicy(QSql::LowPrecisionDouble), - dbmsType(QSqlDriver::UnknownDBMS) + dbmsType(QSqlDriver::UnknownDbms) { } uint isOpen; uint isOpenError; QSqlError error; QSql::NumericalPrecisionPolicy precisionPolicy; - QSqlDriver::DBMSType dbmsType; + QSqlDriver::DbmsType dbmsType; }; QT_END_NAMESPACE diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index d5ccc194bb..af6dc6b9f4 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -385,7 +385,7 @@ public: bool wasDropped; QSqlQuery q( db ); QStringList dbtables=db.tables(); - QSqlDriver::DBMSType dbType = getDatabaseType(db); + QSqlDriver::DbmsType dbType = getDatabaseType(db); foreach(const QString &tableName, tableNames) { wasDropped = true; @@ -462,7 +462,7 @@ public: // blobSize is only used if the db doesn't have a generic blob type static QString blobTypeName( QSqlDatabase db, int blobSize = 10000 ) { - const QSqlDriver::DBMSType dbType = getDatabaseType(db); + const QSqlDriver::DbmsType dbType = getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) return "longblob"; @@ -491,7 +491,7 @@ public: static QString dateTimeTypeName(QSqlDatabase db) { - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) return QLatin1String("timestamp"); if (dbType == QSqlDriver::Oracle && getOraVersion(db) >= 9) @@ -501,7 +501,7 @@ public: static QString autoFieldName( QSqlDatabase db ) { - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) return "AUTO_INCREMENT"; if (dbType == QSqlDriver::Sybase || dbType == QSqlDriver::MSSqlServer) @@ -538,7 +538,7 @@ public: return result.toLocal8Bit(); } - static QSqlDriver::DBMSType getDatabaseType(QSqlDatabase db) + static QSqlDriver::DbmsType getDatabaseType(QSqlDatabase db) { QSqlDriverPrivate *d = static_cast(QObjectPrivate::get(db.driver())); return d->dbmsType; diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 6faf8b7ed5..c314528065 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -234,7 +234,7 @@ struct FieldDef { // excluding the primary key field static int createFieldTable(const FieldDef fieldDefs[], QSqlDatabase db) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString tableName = qTableName("qtestfields", __FILE__, db); tst_Databases::safeDropTable(db, tableName); QSqlQuery q(db); @@ -281,7 +281,7 @@ void tst_QSqlDatabase::createTestTables(QSqlDatabase db) return; const QString tableName = qTableName("qtest", __FILE__, db); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) { // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script @@ -318,7 +318,7 @@ void tst_QSqlDatabase::dropTestTables(QSqlDatabase db) if (!db.isValid()) return; - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) { QSqlQuery q(db); QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -485,7 +485,7 @@ void tst_QSqlDatabase::open() QVERIFY(!db.isOpenError()); } - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::SQLite && db.databaseName() == ":memory:") { // tables in in-memory databases don't survive an open/close createTestTables(db); @@ -498,7 +498,7 @@ void tst_QSqlDatabase::tables() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest(qTableName("qtest", __FILE__, db)), qtest_view(qTableName("qtest_view", __FILE__, db)), temp_tab(qTableName("test_tab", __FILE__, db)); @@ -562,7 +562,7 @@ void tst_QSqlDatabase::whitespaceInIdentifiers() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (testWhiteSpaceNames(db.driverName())) { const QString tableName(qTableName("qtest", __FILE__, db) + " test"); @@ -830,7 +830,7 @@ void tst_QSqlDatabase::recordPSQL() QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); const QString tableName = qTableName("qtestfields", __FILE__, db); @@ -1017,7 +1017,7 @@ void tst_QSqlDatabase::recordSQLServer() QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL server specific test"); @@ -1076,7 +1076,7 @@ void tst_QSqlDatabase::transaction() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest(qTableName("qtest", __FILE__, db)); if (!db.driver()->hasFeature(QSqlDriver::Transactions)) @@ -1124,7 +1124,7 @@ void tst_QSqlDatabase::bigIntField() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest_bigint(qTableName("qtest_bigint", __FILE__, db)); QSqlQuery q(db); @@ -1189,7 +1189,7 @@ void tst_QSqlDatabase::caseSensivity() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); bool cs = false; if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::SQLite || dbType == QSqlDriver::Sybase @@ -1222,7 +1222,7 @@ void tst_QSqlDatabase::noEscapedFieldNamesInRecord() CHECK_DATABASE(db); QString fieldname("t_varchar"); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Oracle || dbType == QSqlDriver::Interbase || dbType == QSqlDriver::DB2) fieldname = fieldname.toUpper(); @@ -1405,7 +1405,7 @@ void tst_QSqlDatabase::precisionPolicy() QString query = QString("SELECT num FROM %1 WHERE id = 1").arg(tableName); QVERIFY_SQL(q, exec(query)); QVERIFY_SQL(q, next()); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::SQLite) QEXPECT_FAIL("", "SQLite returns this value as determined by contents of the field, not the declaration", Continue); QCOMPARE(q.value(0).type(), QVariant::String); @@ -1742,7 +1742,7 @@ void tst_QSqlDatabase::odbc_bindBoolean() QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) QSKIP("MySql has inconsistent behaviour of bit field type across versions."); @@ -1777,7 +1777,7 @@ void tst_QSqlDatabase::odbc_testqGetString() const QString testqGetString(qTableName("testqGetString", __FILE__, db)); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MSSqlServer) QVERIFY_SQL(q, exec("CREATE TABLE " + testqGetString + "(id int, vcvalue varchar(MAX))")); else if(tst_Databases::isMSAccess(db)) @@ -1957,7 +1957,7 @@ void tst_QSqlDatabase::odbc_uniqueidentifier() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server (ODBC) specific test"); diff --git a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp index fa0f7eaf34..7c0b4ebc88 100644 --- a/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp +++ b/tests/auto/sql/kernel/qsqldriver/tst_qsqldriver.cpp @@ -71,7 +71,7 @@ void tst_QSqlDriver::recreateTestTables(QSqlDatabase db) QSqlQuery q(db); const QString relTEST1(qTableName("relTEST1", __FILE__, db)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -122,7 +122,7 @@ void tst_QSqlDriver::record() QSqlRecord rec = db.driver()->record(tablename); QCOMPARE(rec.count(), 4); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // QTBUG-1363: QSqlField::length() always return -1 when using QODBC3 driver and QSqlDatabase::record() if (dbType == QSqlDriver::MSSqlServer && db.driverName().startsWith("QODBC")) QCOMPARE(rec.field(1).length(), 20); @@ -174,7 +174,7 @@ void tst_QSqlDriver::primaryIndex() QSqlIndex index = db.driver()->primaryIndex(tablename); QCOMPARE(index.count(), 1); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::Oracle || dbType == QSqlDriver::DB2) QCOMPARE(index.fieldName(0), QString::fromLatin1("ID")); else diff --git a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp index b4863d4a82..f5d71a75cf 100644 --- a/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp +++ b/tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp @@ -283,7 +283,7 @@ void tst_QSqlQuery::cleanup() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( QTest::currentTestFunction() == QLatin1String( "numRowsAffected" ) || QTest::currentTestFunction() == QLatin1String( "transactions" ) || QTest::currentTestFunction() == QLatin1String( "size" ) @@ -311,7 +311,7 @@ void tst_QSqlQuery::generic_data(const QString& engine) void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QStringList tablenames; // drop all the table in case a testcase failed tablenames << qtest @@ -374,7 +374,7 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) void tst_QSqlQuery::createTestTables( QSqlDatabase db ) { QSqlQuery q( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script @@ -426,7 +426,7 @@ void tst_QSqlQuery::char1Select() QVERIFY_SQL(q, exec("insert into " + tbl + " values ('a')")); QVERIFY_SQL(q, exec("select * from " + tbl)); QVERIFY( q.next() ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) QCOMPARE( q.value( 0 ).toString().left( 1 ), QString( "a" ) ); else @@ -441,7 +441,7 @@ void tst_QSqlQuery::char1SelectUnicode() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::DB2) QSKIP("Needs someone with more Unicode knowledge than I have to fix"); @@ -588,7 +588,7 @@ void tst_QSqlQuery::bindBool() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString tableName(qTableName("bindBool", __FILE__, db)); q.exec("DROP TABLE " + tableName); @@ -845,7 +845,7 @@ void tst_QSqlQuery::outValues() QSqlQuery q( db ); q.setForwardOnly( true ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Oracle) { QVERIFY_SQL( q, exec( "create or replace procedure " + tst_outValues + "(x out int) is\n" "begin\n" @@ -934,7 +934,7 @@ void tst_QSqlQuery::value() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q( db ); QVERIFY_SQL( q, exec( "select id, t_varchar, t_char from " + qtest + " order by id" ) ); int i = 1; @@ -1520,7 +1520,7 @@ void tst_QSqlQuery::precision() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) QSKIP("DB unable to store high precision"); @@ -1596,7 +1596,7 @@ void tst_QSqlQuery::transaction() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( !db.driver()->hasFeature( QSqlDriver::Transactions ) ) QSKIP( "DBMS not transaction capable"); @@ -1679,7 +1679,7 @@ void tst_QSqlQuery::joins() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtestj1(qTableName("qtestj1", __FILE__, db)), qtestj2(qTableName("qtestj2", __FILE__, db)); if (dbType == QSqlDriver::Oracle || dbType == QSqlDriver::Sybase @@ -1763,7 +1763,7 @@ void tst_QSqlQuery::prepare_bind_exec() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); const QString qtest_prepare(qTableName("qtest_prepare", __FILE__, db)); if (dbType == QSqlDriver::Interbase && (db.databaseName() == "silence.nokia.troll.no:c:\\ibase\\testdb_ascii" || db.databaseName() == "/opt/interbase/qttest.gdb")) @@ -1785,7 +1785,7 @@ void tst_QSqlQuery::prepare_bind_exec() useUnicode = false; QString createQuery; - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -2059,7 +2059,7 @@ void tst_QSqlQuery::sqlServerLongStrings() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP( "SQL Server specific test"); @@ -2105,7 +2105,7 @@ void tst_QSqlQuery::invalidQuery() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q( db ); QVERIFY( !q.exec() ); @@ -2442,7 +2442,7 @@ void tst_QSqlQuery::createQueryOnClosedDatabase() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // Only supported by these drivers if (dbType != QSqlDriver::PostgreSQL && dbType != QSqlDriver::Oracle @@ -2574,7 +2574,7 @@ void tst_QSqlQuery::nextResult() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( !db.driver()->hasFeature( QSqlDriver::MultipleResultSets ) || !db.driver()->hasFeature( QSqlDriver::BatchOperations ) ) QSKIP( "DBMS does not support multiple result sets or batch operations"); @@ -2774,7 +2774,7 @@ void tst_QSqlQuery::blobsPreparedQuery() // In PostgreSQL a BLOB is not called a BLOB, but a BYTEA! :-) // ... and in SQL Server it can be called a lot, but IMAGE will do. - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QString typeName( "BLOB" ); if (dbType == QSqlDriver::PostgreSQL) typeName = "BYTEA"; @@ -3053,7 +3053,7 @@ void tst_QSqlQuery::sqlServerReturn0() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server specific test"); @@ -3169,7 +3169,7 @@ void tst_QSqlQuery::QTBUG_18435() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer || !db.driverName().startsWith("QODBC")) QSKIP("SQL Server specific test"); @@ -3251,7 +3251,7 @@ void tst_QSqlQuery::QTBUG_6618() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::MSSqlServer) QSKIP("SQL Server specific test"); @@ -3668,7 +3668,7 @@ void tst_QSqlQuery::sqlite_constraint() QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::SQLite) QSKIP("Sqlite3 specific test"); @@ -3720,7 +3720,7 @@ void tst_QSqlQuery::aggregateFunctionTypes() CHECK_DATABASE(db); QVariant::Type intType = QVariant::Int; // QPSQL uses LongLong for manipulation of integers - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer || dbType == QSqlDriver::PostgreSQL) intType = QVariant::LongLong; else if (dbType == QSqlDriver::Oracle) diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp index 84e2fd57de..fc10f21904 100644 --- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp +++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp @@ -150,7 +150,7 @@ void tst_QSqlQueryModel::createTestTables(QSqlDatabase db) { dropTestTables(db); QSqlQuery q(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); QVERIFY_SQL( q, exec("create table " + qTableName("test", __FILE__, db) + "(id integer not null, name varchar(20), title integer, primary key (id))")); @@ -305,7 +305,7 @@ void tst_QSqlQueryModel::insertColumn() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); DBTestModel model; model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__, db), db)); @@ -409,7 +409,7 @@ void tst_QSqlQueryModel::record() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQueryModel model; model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__, db), db)); @@ -440,7 +440,7 @@ void tst_QSqlQueryModel::setHeaderData() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQueryModel model; diff --git a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp index e97c391a52..a32c672370 100644 --- a/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp +++ b/tests/auto/sql/models/qsqlrelationaltablemodel/tst_qsqlrelationaltablemodel.cpp @@ -143,7 +143,7 @@ void tst_QSqlRelationalTableModel::initTestCase() { foreach (const QString &dbname, dbs.dbNames) { QSqlDatabase db=QSqlDatabase::database(dbname); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase) { db.exec("SET DIALECT 3"); } else if (dbType == QSqlDriver::MSSqlServer) { @@ -238,7 +238,7 @@ void tst_QSqlRelationalTableModel::setData() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // set the values using OnRowChange Strategy { @@ -554,7 +554,7 @@ void tst_QSqlRelationalTableModel::insertWithStrategies() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -746,7 +746,7 @@ void tst_QSqlRelationalTableModel::sort() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -912,7 +912,7 @@ void tst_QSqlRelationalTableModel::clearDisplayValuesCache() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); @@ -966,7 +966,7 @@ void tst_QSqlRelationalTableModel::insertRecordDuplicateFieldNames() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlRelationalTableModel model(0, db); model.setTable(reltest3); @@ -1088,7 +1088,7 @@ void tst_QSqlRelationalTableModel::casing() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::Interbase || dbType == QSqlDriver::SQLite || dbType == QSqlDriver::MSSqlServer) QSKIP("The casing test for this database is irrelevant since this database does not treat different cases as separate entities"); @@ -1155,7 +1155,7 @@ void tst_QSqlRelationalTableModel::escapedRelations() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); recreateTestTables(db); @@ -1266,7 +1266,7 @@ void tst_QSqlRelationalTableModel::escapedTableName() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); // set the values using OnRowChange Strategy with an escaped tablename { @@ -1455,7 +1455,7 @@ void tst_QSqlRelationalTableModel::psqlSchemaTest() QFETCH_GLOBAL(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType != QSqlDriver::PostgreSQL) QSKIP("Postgresql specific test"); diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp index b77b883b03..f0aaa36170 100644 --- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp @@ -160,7 +160,7 @@ void tst_QSqlTableModel::dropTestTables() { for (int i = 0; i < dbs.dbNames.count(); ++i) { QSqlDatabase db = QSqlDatabase::database(dbs.dbNames.at(i)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); if (dbType == QSqlDriver::PostgreSQL) QVERIFY_SQL( q, exec("set client_min_messages='warning'")); @@ -189,7 +189,7 @@ void tst_QSqlTableModel::createTestTables() { for (int i = 0; i < dbs.dbNames.count(); ++i) { QSqlDatabase db = QSqlDatabase::database(dbs.dbNames.at(i)); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); QVERIFY_SQL( q, exec("create table " + test + "(id int, name varchar(20), title int)")); @@ -1699,7 +1699,7 @@ void tst_QSqlTableModel::primaryKeyOrder() QFETCH(QString, dbName); QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QSqlQuery q(db); diff --git a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp index 769dbe6d47..c8375a6d28 100644 --- a/tests/benchmarks/sql/kernel/qsqlquery/main.cpp +++ b/tests/benchmarks/sql/kernel/qsqlquery/main.cpp @@ -109,7 +109,7 @@ void tst_QSqlQuery::cleanup() QFETCH( QString, dbName ); QSqlDatabase db = QSqlDatabase::database( dbName ); CHECK_DATABASE( db ); - const QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + const QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if ( QTest::currentTestFunction() == QLatin1String( "numRowsAffected" ) || QTest::currentTestFunction() == QLatin1String( "transactions" ) @@ -138,7 +138,7 @@ void tst_QSqlQuery::generic_data(const QString& engine) void tst_QSqlQuery::dropTestTables( QSqlDatabase db ) { - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); QStringList tablenames; // drop all the table in case a testcase failed tablenames << qtest @@ -199,7 +199,7 @@ void tst_QSqlQuery::createTestTables( QSqlDatabase db ) { const QString qtestNull = qTableName("qtest_null", __FILE__, db); QSqlQuery q( db ); - QSqlDriver::DBMSType dbType = tst_Databases::getDatabaseType(db); + QSqlDriver::DbmsType dbType = tst_Databases::getDatabaseType(db); if (dbType == QSqlDriver::MySqlServer) // ### stupid workaround until we find a way to hardcode this // in the MySQL server startup script -- cgit v1.2.3 From 5ed2f422fc3c80731be7a07da3875aaa5572d4e6 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Fri, 31 Oct 2014 14:20:20 +0100 Subject: Doc: corrected autolink errors corelib/io Task-number: QTBUG-40362 Change-Id: I1cdbde1f6b003556ba4b5e97a49c6d918518da0d Reviewed-by: Venugopal Shivashankar Reviewed-by: Jerome Pasion --- doc/src/examples/codecs.qdoc | 37 ----------------------- examples/widgets/tools/codecs/doc/src/codecs.qdoc | 37 +++++++++++++++++++++++ src/corelib/codecs/qtextcodec.cpp | 4 +-- src/corelib/io/qdebug.cpp | 4 +-- src/corelib/io/qfiledevice.cpp | 6 ++-- src/corelib/io/qloggingcategory.cpp | 8 ++--- src/corelib/io/qprocess.cpp | 10 +++--- src/corelib/io/qstandardpaths.cpp | 8 ++--- src/corelib/io/qtemporarydir.cpp | 2 +- src/corelib/io/qtextstream.cpp | 16 +++++----- src/corelib/io/qurl.cpp | 13 ++++---- 11 files changed, 73 insertions(+), 72 deletions(-) delete mode 100644 doc/src/examples/codecs.qdoc create mode 100644 examples/widgets/tools/codecs/doc/src/codecs.qdoc diff --git a/doc/src/examples/codecs.qdoc b/doc/src/examples/codecs.qdoc deleted file mode 100644 index d9f69563ac..0000000000 --- a/doc/src/examples/codecs.qdoc +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! - \example codecs - \title Codecs Example - - The Codecs example demonstrates the principles behind importing and exporting text - using codecs to ensure that characters are encoded properly, avoiding loss of data - and retaining the correct symbols used in various scripts. - - \image codecs-example.png -*/ diff --git a/examples/widgets/tools/codecs/doc/src/codecs.qdoc b/examples/widgets/tools/codecs/doc/src/codecs.qdoc new file mode 100644 index 0000000000..e81cc00c54 --- /dev/null +++ b/examples/widgets/tools/codecs/doc/src/codecs.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \example tools/codecs + \title Text Codecs Example + + The Text Codecs example demonstrates the principles behind importing and exporting text + using codecs to ensure that characters are encoded properly, avoiding loss of data + and retaining the correct symbols used in various scripts. + + \image codecs-example.png +*/ diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index d2857c03b6..6eae9e598d 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -380,7 +380,7 @@ QTextCodec::ConverterState::~ConverterState() If Qt is compiled with ICU support enabled, most codecs supported by ICU will also be available to the application. - QTextCodecs can be used as follows to convert some locally encoded + \l {QTextCodec}s can be used as follows to convert some locally encoded string to Unicode. Suppose you have some string encoded in Russian KOI8-R encoding, and want to convert it to Unicode. The simple way to do it is like this: @@ -453,7 +453,7 @@ QTextCodec::ConverterState::~ConverterState() \li Converts a Unicode string to an 8-bit character string. \endtable - \sa QTextStream, QTextDecoder, QTextEncoder, {Codecs Example} + \sa QTextStream, QTextDecoder, QTextEncoder, {Text Codecs Example} */ /*! diff --git a/src/corelib/io/qdebug.cpp b/src/corelib/io/qdebug.cpp index c1e0125cb1..5c77ccdcbf 100644 --- a/src/corelib/io/qdebug.cpp +++ b/src/corelib/io/qdebug.cpp @@ -403,8 +403,8 @@ QDebug &QDebug::resetFormat() \brief Convenience class for custom QDebug operators Saves the settings used by QDebug, and restores them upon destruction, - then calls maybeSpace(), to separate arguments with a space if - autoInsertSpaces() was true at the time of constructing the QDebugStateSaver. + then calls \l {QDebug::maybeSpace()}{maybeSpace()}, to separate arguments with a space if + \l {QDebug::autoInsertSpaces()}{autoInsertSpaces()} was true at the time of constructing the QDebugStateSaver. The automatic insertion of spaces between writes is one of the settings that QDebugStateSaver stores for the duration of the current block. diff --git a/src/corelib/io/qfiledevice.cpp b/src/corelib/io/qfiledevice.cpp index 598347a56f..29b59f1dcc 100644 --- a/src/corelib/io/qfiledevice.cpp +++ b/src/corelib/io/qfiledevice.cpp @@ -240,7 +240,7 @@ bool QFileDevice::isSequential() const Returns the file handle of the file. This is a small positive integer, suitable for use with C library - functions such as fdopen() and fcntl(). On systems that use file + functions such as \c fdopen() and \c fcntl(). On systems that use file descriptors for sockets (i.e. Unix systems, but not Windows) the handle can be used with QSocketNotifier as well. @@ -389,9 +389,9 @@ bool QFileDevice::atEnd() const return false. Seeking beyond the end of a file: - If the position is beyond the end of a file, then seek() shall not + If the position is beyond the end of a file, then seek() will not immediately extend the file. If a write is performed at this position, - then the file shall be extended. The content of the file between the + then the file will be extended. The content of the file between the previous end of file and the newly written data is UNDEFINED and varies between platforms and file systems. */ diff --git a/src/corelib/io/qloggingcategory.cpp b/src/corelib/io/qloggingcategory.cpp index fef48a9040..79d20601a6 100644 --- a/src/corelib/io/qloggingcategory.cpp +++ b/src/corelib/io/qloggingcategory.cpp @@ -149,10 +149,10 @@ static void setBoolLane(QBasicAtomicInt *atomic, bool enable, int shift) Order of evaluation: \list - \li Rules from QtProject/qtlogging.ini - \li Rules set by \l setFilterRules() - \li Rules from file in \c QT_LOGGING_CONF - \li Rules from environment variable QT_LOGGING_RULES + \li QtProject/qtlogging.ini + \li \l setFilterRules() + \li \c QT_LOGGING_CONF + \li \c QT_LOGGING_RULES \endlist The \c QtProject/qtlogging.ini file is looked up in all directories returned diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index e76a836954..a234050777 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1853,8 +1853,8 @@ void QProcess::setProcessState(ProcessState state) /*! This function is called in the child process context just before the - program is executed on Unix or Mac OS X (i.e., after \e fork(), but before - \e execve()). Reimplement this function to do last minute initialization + program is executed on Unix or OS X (i.e., after \c fork(), but before + \c execve()). Reimplement this function to do last minute initialization of the child process. Example: \snippet code/src_corelib_io_qprocess.cpp 4 @@ -1864,7 +1864,7 @@ void QProcess::setProcessState(ProcessState state) execution, your workaround is to emit finished() and then call exit(). - \warning This function is called by QProcess on Unix and Mac OS X + \warning This function is called by QProcess on Unix and OS X only. On Windows and QNX, it is not called. */ void QProcess::setupChildProcess() @@ -2272,7 +2272,7 @@ void QProcess::setArguments(const QStringList &arguments) On Windows, terminate() posts a WM_CLOSE message to all toplevel windows of the process and then to the main thread of the process itself. On Unix - and Mac OS X the SIGTERM signal is sent. + and OS X the \c SIGTERM signal is sent. Console applications on Windows that do not run an event loop, or whose event loop does not handle the WM_CLOSE message, can only be terminated by @@ -2289,7 +2289,7 @@ void QProcess::terminate() /*! Kills the current process, causing it to exit immediately. - On Windows, kill() uses TerminateProcess, and on Unix and Mac OS X, the + On Windows, kill() uses TerminateProcess, and on Unix and OS X, the SIGKILL signal is sent to the process. \sa terminate() diff --git a/src/corelib/io/qstandardpaths.cpp b/src/corelib/io/qstandardpaths.cpp index c206e432f6..538292f0a5 100644 --- a/src/corelib/io/qstandardpaths.cpp +++ b/src/corelib/io/qstandardpaths.cpp @@ -588,11 +588,11 @@ QString QStandardPaths::displayName(StandardLocation type) GenericCacheLocation, CacheLocation. Other locations are not affected. - On Unix, XDG_DATA_HOME is set to ~/.qttest/share, XDG_CONFIG_HOME is - set to ~/.qttest/config, and XDG_CACHE_HOME is set to ~/.qttest/cache. + On Unix, \c XDG_DATA_HOME is set to \e ~/.qttest/share, \c XDG_CONFIG_HOME is + set to \e ~/.qttest/config, and \c XDG_CACHE_HOME is set to \e ~/.qttest/cache. - On Mac, data goes to "~/.qttest/Application Support", cache goes to - ~/.qttest/Cache, and config goes to ~/.qttest/Preferences. + On OS X, data goes to \e ~/.qttest/Application Support, cache goes to + \e ~/.qttest/Cache, and config goes to \e ~/.qttest/Preferences. On Windows, everything goes to a "qttest" directory under Application Data. */ diff --git a/src/corelib/io/qtemporarydir.cpp b/src/corelib/io/qtemporarydir.cpp index 7ce37fd320..5e0def74ee 100644 --- a/src/corelib/io/qtemporarydir.cpp +++ b/src/corelib/io/qtemporarydir.cpp @@ -180,7 +180,7 @@ void QTemporaryDirPrivate::create(const QString &templateName) \snippet code/src_corelib_io_qtemporarydir.cpp 0 It is very important to test that the temporary directory could be - created, using isValid(). Do not use exists(), since a default-constructed + created, using isValid(). Do not use \l {QDir::exists()}{exists()}, since a default-constructed QDir represents the current directory, which exists. The path to the temporary dir can be found by calling path(). diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp index 66727e7dc4..089a915a36 100644 --- a/src/corelib/io/qtextstream.cpp +++ b/src/corelib/io/qtextstream.cpp @@ -85,8 +85,8 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384; \li Chunk by chunk, by calling readLine() or readAll(). - \li Word by word. QTextStream supports streaming into QStrings, - QByteArrays and char* buffers. Words are delimited by space, and + \li Word by word. QTextStream supports streaming into \l {QString}s, + \l {QByteArray}s and char* buffers. Words are delimited by space, and leading white space is automatically skipped. \li Character by character, by streaming into QChar or char types. @@ -158,7 +158,7 @@ static const int QTEXTSTREAM_BUFFERSIZE = 16384; parameter: qSetFieldWidth(), qSetPadChar(), and qSetRealNumberPrecision(). - \sa QDataStream, QIODevice, QFile, QBuffer, QTcpSocket, {Codecs Example} + \sa QDataStream, QIODevice, QFile, QBuffer, QTcpSocket, {Text Codecs Example} */ /*! \enum QTextStream::RealNumberNotation @@ -1531,7 +1531,7 @@ bool QTextStream::atEnd() const QString. Avoid this function when working on large files, as it will consume a significant amount of memory. - Calling readLine() is better if you do not know how much data is + Calling \l {QTextStream::readLine()}{readLine()} is better if you do not know how much data is available. \sa readLine() @@ -1556,9 +1556,9 @@ QString QTextStream::readAll() The returned line has no trailing end-of-line characters ("\\n" or "\\r\\n"), so calling QString::trimmed() is unnecessary. - If the stream has read to the end of the file, readLine() will return a - null QString. For strings, or for devices that support it, you can - explicitly test for the end of the stream using atEnd(). + If the stream has read to the end of the file, \l {QTextStream::readLine()}{readLine()} + will return a null QString. For strings, or for devices that support it, + you can explicitly test for the end of the stream using atEnd(). \sa readAll(), QIODevice::readLine() */ @@ -2790,7 +2790,7 @@ QTextStream &endl(QTextStream &stream) /*! \relates QTextStream - Calls QTextStream::flush() on \a stream and returns \a stream. + Calls \l{QTextStream::flush()}{flush()} on \a stream and returns \a stream. \sa endl(), reset(), {QTextStream manipulators} */ diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index d4c5e03058..d4c5a34cef 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -2671,8 +2671,8 @@ void QUrl::setQuery(const QUrlQuery &query) Sets the query string of the URL to an encoded version of \a query. The contents of \a query are converted to a string internally, each pair delimited by the character returned by - queryPairDelimiter(), and the key and value are delimited by - queryValueDelimiter(). + \l {QUrlQuery::queryPairDelimiter()}{queryPairDelimiter()}, and the key and value are delimited by + \l {QUrlQuery::queryValueDelimiter()}{queryValueDelimiter()} \note This method does not encode spaces (ASCII 0x20) as plus (+) signs, like HTML forms do. If you need that kind of encoding, you must encode @@ -2691,8 +2691,8 @@ void QUrl::setQuery(const QUrlQuery &query) Sets the query string of the URL to the encoded version of \a query. The contents of \a query are converted to a string internally, each pair delimited by the character returned by - queryPairDelimiter(), and the key and value are delimited by - queryValueDelimiter(). + \l {QUrlQuery::queryPairDelimiter()}{queryPairDelimiter()}, and the key and value are delimited by + \l {QUrlQuery::queryValueDelimiter()}{queryValueDelimiter()}. \obsolete Use QUrlQuery and setQuery(). @@ -2709,8 +2709,9 @@ void QUrl::setQuery(const QUrlQuery &query) The key-value pair is encoded before it is added to the query. The pair is converted into separate strings internally. The \a key and \a value is first encoded into UTF-8 and then delimited by the - character returned by queryValueDelimiter(). Each key-value pair is - delimited by the character returned by queryPairDelimiter(). + character returned by \l {QUrlQuery::queryValueDelimiter()}{queryValueDelimiter()}. + Each key-value pair is delimited by the character returned by + \l {QUrlQuery::queryPairDelimiter()}{queryPairDelimiter()} \note This method does not encode spaces (ASCII 0x20) as plus (+) signs, like HTML forms do. If you need that kind of encoding, you must encode -- cgit v1.2.3 From b7f6e6282b9220c28a2f0b3e703ba9b9aceac52b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 26 Nov 2014 16:04:13 -0800 Subject: Removed wrong task number from changelog entry See http://lists.qt-project.org/pipermail/development/2014-November/019331.html Change-Id: I54876dd210c87690117b6aacf78aef0961e704ef Reviewed-by: Jani Heikkinen --- dist/changes-5.4.0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 index 2b6cd2b4db..48c2507ea6 100644 --- a/dist/changes-5.4.0 +++ b/dist/changes-5.4.0 @@ -439,7 +439,7 @@ OS X - The Qt binary packages are now configured with C++11 enabled. - [QTBUG-41208] Fixed detection of writing system support in fonts for some scripts such as Mkhedruli. - - [QTBUG-41192] Fixed menu item shortcuts without keyboard modifiers. + - Fixed menu item shortcuts without keyboard modifiers. - [QTBUG-31301] Drag-and-drop QMimeData requests are now delayed until drop time. - [QTBUG-10899] Added support for ApplicationState -- cgit v1.2.3 From 7c539579b9e883c87e5f7fb3bbec80847fc83ae2 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 26 Nov 2014 14:55:51 +0200 Subject: Use Holo theme on Android 5.0. This is a temporary "fix" until we'll fix all the problems with the new Android Material theme. Task-number: QTBUG-42900 Change-Id: I5485cfd5ac5fdd66cb85da423fe2e63e65be010f Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: J-P Nurmi --- src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java index 0c52bc7530..75f10ad3ba 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java @@ -187,7 +187,7 @@ public class QtActivity extends Activity QT_ANDROID_THEMES = new String[] {"Theme_Light"}; QT_ANDROID_DEFAULT_THEME = "Theme_Light"; } - else if (Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 13) { + else if ((Build.VERSION.SDK_INT >= 11 && Build.VERSION.SDK_INT <= 13) || Build.VERSION.SDK_INT == 21){ QT_ANDROID_THEMES = new String[] {"Theme_Holo_Light"}; QT_ANDROID_DEFAULT_THEME = "Theme_Holo_Light"; } else { -- cgit v1.2.3 From 7b33faa1e97353d658fc7cd13ca789fccfa7ec1f Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 26 Nov 2014 14:54:33 +0100 Subject: changes-5.4.0: additional changes for iOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie8dc10be7ac8a73857a2b47e9bfb00954a7421a9 Reviewed-by: Tor Arne Vestbø --- dist/changes-5.4.0 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dist/changes-5.4.0 b/dist/changes-5.4.0 index 48c2507ea6..2cdf52e4d3 100644 --- a/dist/changes-5.4.0 +++ b/dist/changes-5.4.0 @@ -418,6 +418,13 @@ iOS Applications making use of DataLocation should move these data to the new location. This can be done using the path provided by DocumentLocation as the source path. + - [QTBUG-41458] screen resolution update after device rotation now works. + - [QTBUG-42345] fixed crash on startup on iOS 7.1 + - iOS is now using fat builds with both 32-, and 64-bit support. + - New launch screen added to support iPhone6/6+. + - QtQuick Controls now support native text selection and popup menus. + - Virtual keyboard visibility is now automatically managed by the platform plugin. + - Default theme fonts now uses Dynamic Type, which is based on user system settings. Linux/XCB --------- -- cgit v1.2.3