Merge remote-tracking branch 'origin/5.4.0' into 5.4

Conflicts:
	dist/changes-5.4.0

7231e1fbe2 went into 5.4 instead of the
5.4.0 branch, thus the conflict.

Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
This commit is contained in:
Frederik Gladhorn 2014-11-27 18:12:10 +01:00
commit 3de7382044
49 changed files with 826 additions and 176 deletions

2
configure vendored
View File

@ -5489,7 +5489,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"

473
dist/changes-5.4.0 vendored
View File

@ -16,30 +16,429 @@ 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<T> from a QExplicitlySharedDataPointer<X>)
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}
* 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.
* 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.
- 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
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.
- [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
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.
- QImageReader now automatically rotates JPEG images according to Exif orientation
- 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.
* [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
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.
- [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
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 *
****************************************************************************
- 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
-------
- [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.
- [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
---------
- [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.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
----
@ -47,17 +446,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.
- 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.
****************************************************************************
* Tools *
* 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 *
****************************************************************************
- [QTBUG-30900] The obsolete findtr script was removed.
configure & build system
------------------------
@ -70,6 +503,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
-----
@ -90,3 +529,25 @@ 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
- [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.

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** 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.
@ -26,10 +26,10 @@
****************************************************************************/
/*!
\example codecs
\title Codecs Example
\example tools/codecs
\title Text Codecs Example
The Codecs example demonstrates the principles behind importing and exporting text
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.

View File

@ -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);

View File

@ -247,7 +247,6 @@ class Context
int mClientVersion;
TextureMap mZeroTextures;
TextureMap mIncompleteTextures;
typedef std::unordered_map<GLuint, Framebuffer*> FramebufferMap;
FramebufferMap mFramebufferMap;

View File

@ -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)
{

View File

@ -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:

View File

@ -1870,6 +1870,8 @@ bool Renderer11::testDeviceResettable()
void Renderer11::release()
{
RendererD3D::cleanup();
releaseShaderCompiler();
releaseDeviceResources();

View File

@ -151,6 +151,8 @@ Renderer9::~Renderer9()
void Renderer9::release()
{
RendererD3D::cleanup();
releaseShaderCompiler();
releaseDeviceResources();

View File

@ -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];

View File

@ -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];

View File

@ -1,2 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

View File

@ -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 {

View File

@ -0,0 +1,106 @@
From 014d3fcf6011109491b0489da9c1abb1fdc6dbdc Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@theqtcompany.com>
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<GLuint, Framebuffer*> 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

View File

@ -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}
*/
/*!

View File

@ -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 "|").

View File

@ -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.

View File

@ -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.
*/

View File

@ -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

View File

@ -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()

View File

@ -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.
*/

View File

@ -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().

View File

@ -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}
*/

View File

@ -2687,8 +2687,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
@ -2707,8 +2707,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().
@ -2725,8 +2725,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

View File

@ -37,6 +37,7 @@
#include <QtCore/qhash.h>
#include <QtCore/qstring.h>
#include <QtCore/QThread>
#include <QtCore/QReadWriteLock>
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<QString, jclass> 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<QString, jclass>::iterator it = cachedClasses->find(classDotEnc);
const bool found = (it != cachedClasses->end());
QReadLocker locker(cachedClassesLock);
const QHash<QString, jclass>::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<QString, jclass>::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<QString, jmethodID> 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<QString, jmethodID>::iterator it = cachedMethodID->find(key);
if (it == cachedMethodID->end()) {
const QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig));
QHash<QString, jmethodID>::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<QString, jfieldID> 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<QString, jfieldID>::iterator it = cachedFieldID->find(key);
if (it == cachedFieldID->end()) {
const QString key = keyBase().arg(size_t(clazz)).arg(QLatin1String(name)).arg(QLatin1String(sig));
QHash<QString, jfieldID>::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<QJNIEnvironmentPrivateTLS *>, 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<qulonglong>(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<QString, jclass>::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<jclass>(env->NewGlobalRef(fclazz));
@ -400,7 +434,6 @@ QJNIObjectPrivate::QJNIObjectPrivate(jobject obj)
d->m_jclass = static_cast<jclass>(env->NewGlobalRef(objectClass));
env->DeleteLocalRef(objectClass);
}
template <>
void QJNIObjectPrivate::callMethodV<void>(const char *methodName, const char *sig, va_list args) const
{

View File

@ -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

View File

@ -575,12 +575,12 @@ QList<QSslError> QSslCertificate::verify(QList<QSslCertificate> 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<QSslCertificate> *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

View File

@ -138,7 +138,7 @@ public:
static QList<QSslError> verify(QList<QSslCertificate> certificateChain, const QString &hostName = QString());
static bool importPKCS12(QIODevice *device,
static bool importPkcs12(QIODevice *device,
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates=0,
const QByteArray &passPhrase=QByteArray());

View File

@ -1671,7 +1671,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(QList<QSslCertificate> certifi
return errors;
}
bool QSslSocketBackendPrivate::importPKCS12(QIODevice *device,
bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device,
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase)

View File

@ -136,7 +136,7 @@ public:
static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509);
static QList<QSslError> verify(QList<QSslCertificate> certificateChain, const QString &hostName);
static QString getErrorsFromOpenSsl();
static bool importPKCS12(QIODevice *device,
static bool importPkcs12(QIODevice *device,
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase);

View File

@ -661,7 +661,7 @@ QList<QSslError> QSslSocketBackendPrivate::verify(QList<QSslCertificate> certifi
return errors;
}
bool QSslSocketBackendPrivate::importPKCS12(QIODevice *device,
bool QSslSocketBackendPrivate::importPkcs12(QIODevice *device,
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase)

View File

@ -92,7 +92,7 @@ public:
static QList<QSslCipher> defaultCiphers();
static QList<QSslError> verify(QList<QSslCertificate> certificateChain, const QString &hostName);
static bool importPKCS12(QIODevice *device,
static bool importPkcs12(QIODevice *device,
QSslKey *key, QSslCertificate *cert,
QList<QSslCertificate> *caCertificates,
const QByteArray &passPhrase);

View File

@ -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;

View File

@ -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

View File

@ -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;
}

View File

@ -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();

View File

@ -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

View File

@ -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.

View File

@ -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<QByteArray>()
QTest::newRow("time-process") << "<%{time process}>%{message}" << true << (QList<QByteArray>()
<< "< ");
#ifdef __GLIBC__

View File

@ -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();

View File

@ -0,0 +1,2 @@
[waitForConnectedEncryptedReadyRead:WithSocks5ProxyAuth]
*

View File

@ -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<QSqlDriverPrivate *>(QObjectPrivate::get(db.driver()));
return d->dbmsType;

View File

@ -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");

View File

@ -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

View File

@ -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)

View File

@ -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;

View File

@ -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");

View File

@ -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);

View File

@ -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