summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-02-18 20:03:20 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-18 20:03:20 +0100
commit3654a4a3c1cb2ac9bb8b486877d9f1e6a6b220be (patch)
tree611c16caa5096bd1348f188c9072354f1e613a9f
parentc04f3584abd621f09e8f2c81b9c6c87212a993a3 (diff)
parentf4900d340a4c620b56871995741696d28e53c167 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
-rwxr-xr-xconfigure10
-rw-r--r--dist/changes-5.0.26
-rw-r--r--doc/global/manifest-meta.qdocconf33
-rw-r--r--doc/global/qt-module-defaults.qdocconf1
-rw-r--r--doc/global/template/style/offline.css7
-rw-r--r--doc/global/template/style/online.css4
-rw-r--r--mkspecs/features/create_cmake.prf18
-rw-r--r--mkspecs/features/exclusive_builds.prf8
-rw-r--r--mkspecs/features/qt_functions.prf1
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp5
-rw-r--r--qmake/library/qmakeevaluator.cpp6
-rw-r--r--src/angle/src/common/common.pri12
-rw-r--r--src/angle/src/config.pri19
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp7
-rw-r--r--src/gui/accessible/qaccessible.h2
-rw-r--r--src/gui/image/qimage.cpp5
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/opengl/qopenglframebufferobject.cpp36
-rw-r--r--src/gui/text/qfont.cpp2
-rw-r--r--src/gui/text/qtextcursor.cpp4
-rw-r--r--src/network/access/qnetworkreply.cpp9
-rw-r--r--src/network/ssl/qsslsocket.cpp10
-rw-r--r--src/opengl/qglframebufferobject.cpp4
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm9
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp21
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp25
-rw-r--r--src/sql/drivers/db2/qsql_db2.cpp2
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp27
-rw-r--r--src/sql/kernel/qsqlresult.cpp101
-rw-r--r--src/sql/kernel/qsqlresult_p.h10
-rw-r--r--src/tools/qdoc/config.h1
-rw-r--r--src/tools/qdoc/cppcodemarker.cpp10
-rw-r--r--src/tools/qdoc/cppcodeparser.cpp9
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp2
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp62
-rw-r--r--src/tools/qdoc/htmlgenerator.h9
-rw-r--r--src/tools/qdoc/node.cpp2
-rw-r--r--src/tools/qdoc/node.h12
-rw-r--r--src/tools/qdoc/qdoc.pro2
-rw-r--r--src/tools/qdoc/qdocdatabase.cpp30
-rw-r--r--src/tools/qdoc/qdocdatabase.h1
-rw-r--r--src/tools/qdoc/qmlvisitor.cpp15
-rw-r--r--src/tools/qdoc/tree.cpp4
-rw-r--r--src/tools/tools.pro2
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp7
-rw-r--r--src/widgets/dialogs/qfiledialog.h1
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h1
-rw-r--r--src/widgets/doc/qtwidgets.qdocconf9
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp10
-rw-r--r--src/widgets/styles/qmacstyle_mac.mm3
-rw-r--r--src/widgets/styles/qstylehelper.cpp12
-rw-r--r--src/widgets/styles/qstylehelper_p.h2
-rw-r--r--src/widgets/util/qsystemtrayicon_qpa.cpp2
-rw-r--r--tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt5
-rw-r--r--tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt5
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp4
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp2
-rw-r--r--tests/auto/network/ssl/ssl.pro14
-rw-r--r--tests/auto/sql/kernel/qsqlresult/testsqldriver.h5
-rw-r--r--tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp34
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp26
-rw-r--r--tools/configure/configureapp.cpp10
83 files changed, 488 insertions, 333 deletions
diff --git a/configure b/configure
index 47640b1026..77536b0563 100755
--- a/configure
+++ b/configure
@@ -2815,8 +2815,14 @@ if [ -z "$QT_INSTALL_BINS" ]; then #default
fi
QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"`
+if [ "$XPLATFORM_MINGW" = "yes" ]; then
+ QT_INSTALL_LIBEXECS_DIRNAME="lib"
+else
+ QT_INSTALL_LIBEXECS_DIRNAME="libexec"
+fi
+
if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default
- QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/libexec" #fallback
+ QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/$$QT_INSTALL_LIBEXECS_DIRNAME" #fallback
fi
QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"`
@@ -3038,7 +3044,7 @@ Installation options:
-plugindir <dir> ...... Plugins will be installed to <dir>
(default ARCHDATADIR/plugins)
-libexecdir <dir> ..... Program executables will be installed to <dir>
- (default ARCHDATADIR/libexec)
+ (default ARCHDATADIR/$QT_INSTALL_LIBEXECS_DIRNAME)
-importdir <dir> ...... Imports for QML1 will be installed to <dir>
(default ARCHDATADIR/imports)
-qmldir <dir> ......... Imports for QML2 will be installed to <dir>
diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2
index b97e71ae03..5e170a35be 100644
--- a/dist/changes-5.0.2
+++ b/dist/changes-5.0.2
@@ -107,6 +107,12 @@ Qt for Windows CE
* Tools *
****************************************************************************
+qmake
+-----
+
+ - $$(VAR) style environment variable expansions will not split on
+ whitespace any more. Use $$split() if necessary.
+
****************************************************************************
* Plugins *
diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf
new file mode 100644
index 0000000000..3bfc3e12d4
--- /dev/null
+++ b/doc/global/manifest-meta.qdocconf
@@ -0,0 +1,33 @@
+# Additional meta information (attributes for matched entries, as well as tags)
+# to be added to manifest.xml files.
+#
+# manifestmeta.filters = <filter1>,<filter2>,...
+#
+# manifestmeta.<filter>.names = <Module1>/<name1>,<Module2>/<name2>,..
+# manifestmeta.<filter>.attributes = <attribute1:value1>,<attribute2:value2>,..
+# manifestmeta.<filter>.tags = <tag1>,<tag2>,..
+#
+# <filter>.names specify all the module/name combinations to apply the
+# attributes/tags to. You can use simple wildcard matching by appending
+# '*' at the end of name.
+#
+# Note: You cannot use operators (+, =, -) in the names.
+#
+# Examples: add a 'isHighlighted' attribute for two 'Analog Clock' examples,
+# add a 'database' tag for QtSql all examples, a 'webkit' tag for QtWebKit
+# examples, and a 'qt5' tag for all examples
+#
+# manifestmeta.filters = highlighted sql webkit global
+#
+# manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \
+# "QtWidgets/Analog Clock Example"
+# manifestmeta.highlighted.attributes = isHighlighted:true
+#
+# manifestmeta.sql.names = "QtSql/*"
+# manifestmeta.sql.tags = database
+#
+# manifestmeta.webkit.names = "QtWebKitExamples/*"
+# manifestmeta.webkit.tags = webkit
+#
+# manifestmeta.global.names = *
+# manifestmeta.global.tags = qt5
diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf
index 15b3724355..0365d5a6cd 100644
--- a/doc/global/qt-module-defaults.qdocconf
+++ b/doc/global/qt-module-defaults.qdocconf
@@ -3,6 +3,7 @@ include(qt-cpp-ignore.qdocconf)
include(qt-defines.qdocconf)
include(qt-html-templates-offline.qdocconf)
include(compat.qdocconf)
+include(manifest-meta.qdocconf)
dita.metadata.default.author = Qt Project
dita.metadata.default.permissions = all
diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css
index 8b8a7d9ae1..40257730ff 100644
--- a/doc/global/template/style/offline.css
+++ b/doc/global/template/style/offline.css
@@ -290,14 +290,10 @@ box-shadow: 0px 0px 0px #fff;
background-color: #F6F6F6;
border: 1px solid #E6E6E6;
border-collapse: separate;
-font-size: 12px;
-line-height: 1.2;
margin-bottom: 25px;
margin-left: 15px;
font-size: 12px;
line-height: 1.2;
-margin-bottom: 25px;
-margin-left: 15px;
}
@@ -451,6 +447,9 @@ padding: 3px 5px 3px 10px;
text-align: right;
}
+.qmldoc {
+margin-left: 15px;
+}
/*
-----------
Content table
diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css
index f933bac5eb..9dff745358 100644
--- a/doc/global/template/style/online.css
+++ b/doc/global/template/style/online.css
@@ -563,6 +563,10 @@ padding: 3px 5px 3px 10px;
text-align: right;
}
+.qmldoc {
+margin-left: 15px;
+}
+
/*
-----------
Content table
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index a06f268769..43dca4cd70 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -36,14 +36,24 @@ CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.)
CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::")
!isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}"
+# Several distros (ArchLinux, Fedora) have in the past installed libraries
+# in /lib(64)?, but are now moving to install libraries in /usr/lib(64)?/.
+# The /lib paths are made symlinks to the /usr/lib paths. If someone searching
+# for a Qt 5 package finds it in /lib/cmake/Qt5Core, although it has been
+# installed in /usr/lib/cmake/Qt5Core, relative paths to the includes and
+# executables will not work. So, we treat installations to /usr as non-relocatable
+# packages with absolute paths.
+CMAKE_INSTALL_LIBS_DIR = $$[QT_INSTALL_LIBS]
+contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_FORCE_ABSOLUTE_PATHS = True
+
CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
+!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") {
CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/
CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True
}
CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_LIB_DIR, "^\\.\\./.*") {
+!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_LIB_DIR,"^\\.\\./.*") {
CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/
CMAKE_LIB_DIR_IS_ABSOLUTE = True
} else {
@@ -54,13 +64,13 @@ contains(CMAKE_LIB_DIR, "^\\.\\./.*") {
}
CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
+!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_BIN_DIR, "^\\.\\./.*") {
CMAKE_BIN_DIR = $$[QT_HOST_BINS]/
CMAKE_BIN_DIR_IS_ABSOLUTE = True
}
CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX])
-contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs
+!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs
CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/
CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True
}
diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf
index 8898c96a43..0e0da05c70 100644
--- a/mkspecs/features/exclusive_builds.prf
+++ b/mkspecs/features/exclusive_builds.prf
@@ -1,9 +1,6 @@
# fixExclusiveOutputDirs(1config, 2config)
# Change all output paths that references 2config to have the string 1config in them
defineTest(fixExclusiveOutputDirs) {
- unset(firstBuild)
- unset(secondBuild)
- unset(appendFirstBuild)
firstBuild = $$1
secondBuild = $$2
count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false
@@ -29,11 +26,6 @@ defineTest(fixExclusiveOutputDirs) {
# addExclusiveBuilds(1config, 1name, 2config, 2name)
# Adds two BUILDS which are exclusive to each other.
defineTest(addExclusiveBuilds) {
- unset(firstBuild)
- unset(firstBuildName)
- unset(secondBuild)
- unset(secondBuildName)
-
firstBuild = $$1
firstBuildName = $$2
secondBuild = $$3
diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf
index aaf7a4710e..b6e3454f0e 100644
--- a/mkspecs/features/qt_functions.prf
+++ b/mkspecs/features/qt_functions.prf
@@ -9,7 +9,6 @@ defineReplace(qtPlatformTargetSuffix) {
}
defineReplace(qtLibraryTarget) {
- unset(LIBRARY_NAME)
LIBRARY_NAME = $$1
mac:!static:contains(QT_CONFIG, qt_framework) {
QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 5a077874d4..8b40d4e935 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -79,7 +79,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
#endif
if (!project->isHostBuild()) {
const ProValueMap &variables = project->variables();
- if (variables["QMAKESPEC"].first().contains("wince", Qt::CaseInsensitive)) {
+ if (project->isActiveConfig("wince")) {
CeSdkHandler sdkhandler;
sdkhandler.parse();
const QString sdkName = variables["CE_SDK"].join(' ')
@@ -414,7 +414,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t)
<< cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc;
if (generateManifest) {
- t << "\n\tif not exist $(DESTDIR_TARGET) del " << manifest << ">NUL 2>&1";
+ t << "\n\tif not exist $(DESTDIR_TARGET) if exist " << manifest
+ << " del " << manifest;
t << "\n\tif exist " << manifest << " copy /Y " << manifest << ' ' << manifest_bak;
const QString extraInlineFileContent = "\n!IF EXIST(" + manifest_res + ")\n" + manifest_res + "\n!ENDIF";
t << "\n\t";
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 1904b5136c..ad168774bc 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -454,9 +454,9 @@ void QMakeEvaluator::evaluateExpression(
break; }
case TokEnvVar: {
const ProString &var = getStr(tokPtr);
- const ProStringList &val = split_value_list(m_option->getEnv(var.toQString(m_tmp1)));
- debugMsg(2, "env var %s => %s", dbgStr(var), dbgStrList(val));
- addStrList(val, tok, ret, pending, joined);
+ const ProString &val = ProString(m_option->getEnv(var.toQString(m_tmp1)));
+ debugMsg(2, "env var %s => %s", dbgStr(var), dbgStr(val));
+ addStr(val, ret, pending, joined);
break; }
case TokFuncName: {
const ProKey &func = getHashStr(tokPtr);
diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri
index 8806c03c95..c7d2a2d5ae 100644
--- a/src/angle/src/common/common.pri
+++ b/src/angle/src/common/common.pri
@@ -15,17 +15,17 @@ win32-msvc2012 {
error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.")
}
- DXINC_DIR = $$quote($${DX_DIR}Include)
+ DXINC_DIR = $${DX_DIR}Include
contains(QT_ARCH, x86_64) {
- DXLIB_DIR = $$quote($${DX_DIR}Lib\\x64)
+ DXLIB_DIR = $${DX_DIR}Lib\\x64
} else {
- DXLIB_DIR = $$quote($${DX_DIR}Lib\\x86)
+ DXLIB_DIR = $${DX_DIR}Lib\\x86
}
equals(QMAKE_TARGET.arch, x86_64) {
- FXC = "\"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\""
+ FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\"
} else {
- FXC = "\"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\""
+ FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\"
}
msvc {
@@ -36,7 +36,7 @@ win32-msvc2012 {
# Similarly we want the MinGW linker to use the import libraries shipped with the compiler
# instead of those from the SDK which cause a crash on startup.
- LIBS += -L$$DXLIB_DIR
+ LIBS += -L\"$$DXLIB_DIR\"
}
}
diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri
index 4e52358205..73fbc2e13b 100644
--- a/src/angle/src/config.pri
+++ b/src/angle/src/config.pri
@@ -3,7 +3,7 @@
ANGLE_DIR = $$(ANGLE_DIR)
isEmpty(ANGLE_DIR) {
- ANGLE_DIR = $$PWD/../../3rdparty/angle
+ ANGLE_DIR = $$absolute_path(../../3rdparty/angle)
} else {
!build_pass:message("Using external ANGLE from $$ANGLE_DIR")
}
@@ -12,20 +12,19 @@ isEmpty(ANGLE_DIR) {
error("$$ANGLE_DIR does not contain ANGLE")
}
-win32 {
- GNUTOOLS_DIR=$$PWD/../../../../gnuwin32/bin
- exists($$GNUTOOLS_DIR/gperf.exe) {
- # Escape closing parens when expanding the variable, otherwise cmd confuses itself.
- GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)"
+equals(QMAKE_HOST.os, Windows) {
+ gnutools.value = $$absolute_path(../../../../gnuwin32/bin)
+ exists($$gnutools.value/gperf.exe) {
+ gnutools.name = PATH
+ gnutools.CONFIG = prepend
}
}
defineReplace(addGnuPath) {
- unset(gnuPath)
gnuPath = $$1
- !isEmpty(gnuPath):!isEmpty(GNUTOOLS) {
- eval(gnuPath = $${GNUTOOLS} && $$gnuPath)
- silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath))
+ !isEmpty(gnuPath):!isEmpty(gnutools.name) {
+ qtAddToolEnv(gnuPath, gnutools)
+ silent: gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$gnuPath
}
return($$gnuPath)
}
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index dcf779a5f1..9869d7e500 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -136,8 +136,11 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue)
if (newValue.userType() == propertyType) {
//no conversion is needed, we directly call the QMetaObject::metacall
- void *data = const_cast<void*>(newValue.constData());
- QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, &data);
+ //check QMetaProperty::write for an explanation of these
+ int status = -1;
+ int flags = 0;
+ void *argv[] = { const_cast<void *>(newValue.constData()), const_cast<QVariant *>(&newValue), &status, &flags };
+ QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, argv);
} else {
targetValue->setProperty(propertyName.constData(), newValue);
}
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 016e9b6d07..96fc7c031b 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#ifndef QT_NO_ACCESSIBILITY
#ifndef QACCESSIBLE_H
#define QACCESSIBLE_H
@@ -677,3 +678,4 @@ inline void QAccessible::updateAccessibility(QObject *object, int child, Event r
QT_END_NAMESPACE
#endif // QACCESSIBLE_H
+#endif //!QT_NO_ACCESSIBILITY
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 975ef54d6b..481cb37c8c 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4944,7 +4944,10 @@ QPaintEngine *QImage::paintEngine() const
if (!d->paintEngine) {
QPaintDevice *paintDevice = const_cast<QImage *>(this);
- QPaintEngine *paintEngine = QGuiApplicationPrivate::platformIntegration()->createImagePaintEngine(paintDevice);
+ QPaintEngine *paintEngine = 0;
+ QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration();
+ if (platformIntegration)
+ paintEngine = platformIntegration->createImagePaintEngine(paintDevice);
d->paintEngine = paintEngine ? paintEngine : new QRasterPaintEngine(paintDevice);
}
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 3a8428b332..89b3b9ab89 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -60,7 +60,9 @@
#include <QtCore/private/qthread_p.h>
#include <QtCore/qdir.h>
#include <QtDebug>
+#ifndef QT_NO_ACCESSIBILITY
#include "qaccessible.h"
+#endif
#include <qpalette.h>
#include <qscreen.h>
#include "qsessionmanager.h"
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp
index 8e92ab5d58..8d6b05d0b4 100644
--- a/src/gui/opengl/qopenglframebufferobject.cpp
+++ b/src/gui/opengl/qopenglframebufferobject.cpp
@@ -686,25 +686,24 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
\ingroup painting-3D
The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer
- object, defined by the \c{GL_EXT_framebuffer_object} extension. In
- addition it provides a rendering surface that can be painted on
- with a QPainter, rendered to using native OpenGL calls, or both. This
- surface can be bound and used as a regular texture in your own OpenGL
- drawing code. By default, the QOpenGLFramebufferObject class
- generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target),
- which is used as the internal rendering target.
+ object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides
+ a rendering surface that can be painted on with a QPainter with the help of
+ QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface
+ can be bound and used as a regular texture in your own OpenGL drawing code.
+ By default, the QOpenGLFramebufferObject class generates a 2D OpenGL
+ texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal
+ rendering target.
\b{It is important to have a current OpenGL context when creating a
QOpenGLFramebufferObject, otherwise initialization will fail.}
- When using a QPainter to paint to a QOpenGLFramebufferObject you should take
- care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil
- attachment for QPainter to be able to render correctly.
- Note that you need to create a QOpenGLFramebufferObject with more than one
- sample per pixel for primitives to be antialiased when drawing using a
- QPainter. To create a multisample framebuffer object you should use one of
- the constructors that take a QOpenGLFramebufferObject parameter, and set the
- QOpenGLFramebufferObject::samples() property to a non-zero value.
+ Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil
+ attachment if you want QPainter to render correctly. Note that you need to
+ create a QOpenGLFramebufferObject with more than one sample per pixel for
+ primitives to be antialiased when drawing using a QPainter. To create a
+ multisample framebuffer object you should use one of the constructors that
+ take a QOpenGLFramebufferObjectFormat parameter, and set the
+ QOpenGLFramebufferObjectFormat::samples() property to a non-zero value.
For multisample framebuffer objects a color render buffer is created,
otherwise a texture with the specified texture target is created.
@@ -716,11 +715,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen
as a texture, you first need to copy from it to a regular framebuffer
object using QOpenGLContext::blitFramebuffer().
- \section1 Threading
-
- As of Qt 4.8, it's possible to draw into a QOpenGLFramebufferObject
- using a QPainter in a separate thread. Note that OpenGL 2.0 or
- OpenGL ES 2.0 is required for this to work.
+ It is possible to draw into a QOpenGLFramebufferObject using QPainter and
+ QOpenGLPaintDevice in a separate thread.
*/
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 87ca5e4cfe..279d165322 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -671,7 +671,7 @@ void QFontPrivate::detachButKeepEngineData(QFont *font)
\sa QGuiApplication::setFont(), QGuiApplication::font()
*/
QFont::QFont()
- : d(QGuiApplication::font().d.data()), resolve_mask(0)
+ : d(QGuiApplicationPrivate::instance() ? QGuiApplication::font().d.data() : new QFontPrivate()), resolve_mask(0)
{
}
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index 182b9ac7fd..39fca795c9 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1283,7 +1283,7 @@ bool QTextCursor::movePosition(MoveOperation op, MoveMode mode, int n)
Returns true if the cursor does visual navigation; otherwise
returns false.
- Visual navigation means skipping over hidden text pragraphs. The
+ Visual navigation means skipping over hidden text paragraphs. The
default is false.
\sa setVisualNavigation(), movePosition()
@@ -1298,7 +1298,7 @@ bool QTextCursor::visualNavigation() const
Sets visual navigation to \a b.
- Visual navigation means skipping over hidden text pragraphs. The
+ Visual navigation means skipping over hidden text paragraphs. The
default is false.
\sa visualNavigation(), movePosition()
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 669725b016..fd3b7760cb 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -680,8 +680,13 @@ void QNetworkReply::ignoreSslErrorsImplementation(const QList<QSslError> &)
connection will be ignored, including certificate validation
errors.
- Note that calling this function without restraint may pose a
- security risk for your application. Use it with care.
+ \warning Be sure to always let the user inspect the errors
+ reported by the sslErrors() signal, and only call this method
+ upon confirmation from the user that proceeding is ok.
+ If there are unexpected errors, the reply should be aborted.
+ Calling this method without inspecting the actual errors will
+ most likely pose a security risk for your application. Use it
+ with great care!
This function can be called from the slot connected to the
sslErrors() signal, which indicates which errors were
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 712ba7aa79..c86234a5ac 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1714,9 +1714,13 @@ void QSslSocket::startServerEncryption()
will not emit the sslErrors() signal, and it is unnecessary to
call this function.
- Ignoring errors that occur during an SSL handshake should be done
- with caution. A fundamental characteristic of secure connections
- is that they should be established with an error free handshake.
+ \warning Be sure to always let the user inspect the errors
+ reported by the sslErrors() signal, and only call this method
+ upon confirmation from the user that proceeding is ok.
+ If there are unexpected errors, the connection should be aborted.
+ Calling this method without inspecting the actual errors will
+ most likely pose a security risk for your application. Use it
+ with great care!
\sa sslErrors()
*/
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index d1b3f355c9..15880108f3 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -752,8 +752,8 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz,
Note that you need to create a QGLFramebufferObject with more than one
sample per pixel for primitives to be antialiased when drawing using a
QPainter. To create a multisample framebuffer object you should use one of
- the constructors that take a QGLFramebufferObject parameter, and set the
- QGLFramebufferObject::samples() property to a non-zero value.
+ the constructors that take a QGLFramebufferObjectFormat parameter, and set
+ the QGLFramebufferObjectFormat::samples() property to a non-zero value.
When painting to a QGLFramebufferObject using QPainter, the state of
the current GL context will be altered by the paint engine to reflect
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index c23d924993..cdbaa235e4 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -667,9 +667,8 @@ static QTouchDevice *touchDevice = 0;
}
#endif
-
- NSPoint windowPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil];
- QPoint qt_windowPoint(windowPoint.x, windowPoint.y);
+ QPoint qt_windowPoint, qt_screenPoint;
+ [self convertFromEvent:theEvent toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint];
NSTimeInterval timestamp = [theEvent timestamp];
ulong qt_timestamp = timestamp * 1000;
@@ -687,7 +686,7 @@ static QTouchDevice *touchDevice = 0;
currentWheelModifiers = [self convertKeyModifiers:[theEvent modifierFlags]];
}
- QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta, currentWheelModifiers);
+ QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers);
if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled) {
currentWheelModifiers = Qt::NoModifier;
@@ -695,7 +694,7 @@ static QTouchDevice *touchDevice = 0;
} else
#endif
{
- QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta,
+ QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta,
[self convertKeyModifiers:[theEvent modifierFlags]]);
}
}
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 0ef9f931c2..081b42ce65 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -136,6 +136,10 @@
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
#endif
+#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#endif
+
QT_BEGIN_NAMESPACE
template <class MaskType, class FlagType> inline bool testFlag(MaskType mask, FlagType flag)
@@ -696,34 +700,27 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
result.version = (version.mid(0, majorDot).toInt() << 8)
+ version.mid(majorDot + 1, minorDot - majorDot - 1).toInt();
}
+ result.profile = QSurfaceFormat::NoProfile;
if (result.version < 0x0300) {
- result.profile = QSurfaceFormat::NoProfile;
result.options |= QSurfaceFormat::DeprecatedFunctions;
return result;
}
// v3 onwards
GLint value = 0;
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
- if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
+ if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
result.options |= QSurfaceFormat::DeprecatedFunctions;
- if (value & WGL_CONTEXT_DEBUG_BIT_ARB)
+ if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
result.options |= QSurfaceFormat::DebugContext;
if (result.version < 0x0302)
return result;
// v3.2 onwards: Profiles
value = 0;
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
- switch (value) {
- case WGL_CONTEXT_CORE_PROFILE_BIT_ARB:
+ if (value & GL_CONTEXT_CORE_PROFILE_BIT)
result.profile = QSurfaceFormat::CoreProfile;
- break;
- case WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
+ else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
result.profile = QSurfaceFormat::CompatibilityProfile;
- break;
- default:
- result.profile = QSurfaceFormat::NoProfile;
- break;
- }
return result;
}
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 5e2731430d..854f7bcd17 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -75,6 +75,10 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
#endif
+#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#endif
+
static Window createDummyWindow(QXcbScreen *screen, XVisualInfo *visualInfo)
{
Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(screen), screen->root(), visualInfo->visual, AllocNone);
@@ -169,6 +173,8 @@ static void updateFormatFromContext(QSurfaceFormat &format)
format.setMinorVersion(minor);
}
+ format.setProfile(QSurfaceFormat::NoProfile);
+
const int version = (major << 8) + minor;
if (version < 0x0300) {
format.setProfile(QSurfaceFormat::NoProfile);
@@ -180,9 +186,9 @@ static void updateFormatFromContext(QSurfaceFormat &format)
// a debug context
GLint value = 0;
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
- if (value & ~GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
+ if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
format.setOption(QSurfaceFormat::DeprecatedFunctions);
- if (value & GLX_CONTEXT_DEBUG_BIT_ARB)
+ if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
format.setOption(QSurfaceFormat::DebugContext);
if (version < 0x0302)
return;
@@ -190,17 +196,11 @@ static void updateFormatFromContext(QSurfaceFormat &format)
// Version 3.2 and newer have a profile
value = 0;
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value);
- switch (value) {
- case GLX_CONTEXT_CORE_PROFILE_BIT_ARB:
+
+ if (value & GL_CONTEXT_CORE_PROFILE_BIT)
format.setProfile(QSurfaceFormat::CoreProfile);
- break;
- case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB:
+ else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
format.setProfile(QSurfaceFormat::CompatibilityProfile);
- break;
- default:
- format.setProfile(QSurfaceFormat::NoProfile);
- break;
- }
}
/*!
@@ -287,6 +287,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
QList<QByteArray> glxExt = QByteArray(glXQueryExtensionsString(DISPLAY_FROM_XCB(m_screen), m_screen->screenNumber())).split(' ');
+ bool supportsProfiles = glxExt.contains("GLX_ARB_create_context_profile");
// Use glXCreateContextAttribsARB if is available
if (glxExt.contains("GLX_ARB_create_context") && glXCreateContextAttribsARB != 0) {
@@ -306,7 +307,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
<< GLX_CONTEXT_MINOR_VERSION_ARB << minorVersion;
// If asking for OpenGL 3.2 or newer we should also specify a profile
- if (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1)) {
+ if (supportsProfiles && (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1))) {
if (m_format.profile() == QSurfaceFormat::CoreProfile)
contextAttributes << GLX_CONTEXT_PROFILE_MASK_ARB << GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
else
diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp
index 537f77a8a3..9406861d4c 100644
--- a/src/sql/drivers/db2/qsql_db2.cpp
+++ b/src/sql/drivers/db2/qsql_db2.cpp
@@ -1030,7 +1030,7 @@ QVariant QDB2Result::data(int field)
v = new QVariant(qGetIntData(d->hStmt, field, isNull));
break;
case QSql::LowPrecisionInt64:
- v = new QVariant(qGetBigIntData(d->hStmt, field, isNull));
+ v = new QVariant((qint64) qGetBigIntData(d->hStmt, field, isNull));
break;
case QSql::LowPrecisionDouble:
v = new QVariant(qGetDoubleData(d->hStmt, field, isNull));
diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
index 1d96e9f93b..0eadceb1d1 100644
--- a/src/sql/drivers/psql/qsql_psql.cpp
+++ b/src/sql/drivers/psql/qsql_psql.cpp
@@ -53,6 +53,7 @@
#include <qsocketnotifier.h>
#include <qstringlist.h>
#include <qmutex.h>
+#include <QtSql/private/qsqlresult_p.h>
#include <libpq-fe.h>
#include <pg_config.h>
@@ -183,6 +184,7 @@ class QPSQLResultPrivate
{
public:
QPSQLResultPrivate(QPSQLResult *qq): q(qq), driver(0), result(0), currentSize(-1), preparedQueriesEnabled(false) {}
+ static QString fieldSerial(int i) { return QLatin1Char('$') + QString::number(i + 1); }
QPSQLResult *q;
const QPSQLDriverPrivate *driver;
@@ -515,29 +517,6 @@ void QPSQLResult::virtual_hook(int id, void *data)
QSqlResult::virtual_hook(id, data);
}
-static QString qReplacePlaceholderMarkers(const QString &query)
-{
- const int originalLength = query.length();
- bool inQuote = false;
- int markerIdx = 0;
- QString result;
- result.reserve(originalLength + 23);
- for (int i = 0; i < originalLength; ++i) {
- const QChar ch = query.at(i);
- if (ch == QLatin1Char('?') && !inQuote) {
- result += QLatin1Char('$');
- result += QString::number(++markerIdx);
- } else {
- if (ch == QLatin1Char('\''))
- inQuote = !inQuote;
- result += ch;
- }
- }
-
- result.squeeze();
- return result;
-}
-
static QString qCreateParamString(const QVector<QVariant> boundValues, const QSqlDriver *driver)
{
if (boundValues.isEmpty())
@@ -581,7 +560,7 @@ bool QPSQLResult::prepare(const QString &query)
qDeallocatePreparedStmt(d);
const QString stmtId = qMakePreparedStmtId();
- const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(qReplacePlaceholderMarkers(query));
+ const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(QSqlResultPrivate::positionalToNamedBinding(query, QPSQLResultPrivate::fieldSerial));
PGresult *result = d->driver->exec(stmt);
diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp
index b3e7ad5b38..ea972abf50 100644
--- a/src/sql/kernel/qsqlresult.cpp
+++ b/src/sql/kernel/qsqlresult.cpp
@@ -55,15 +55,13 @@
QT_BEGIN_NAMESPACE
-static QString qFieldSerial(int);
-
QString QSqlResultPrivate::holderAt(int index) const
{
- return holders.size() > index ? holders.at(index).holderName : qFieldSerial(index);
+ return holders.size() > index ? holders.at(index).holderName : fieldSerial(index);
}
// return a unique id for bound names
-static QString qFieldSerial(int i)
+QString QSqlResultPrivate::fieldSerial(int i)
{
ushort arr[] = { ':', 'f', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
ushort *ptr = &arr[1];
@@ -83,57 +81,90 @@ static bool qIsAlnum(QChar ch)
return u - 'a' < 26 || u - 'A' < 26 || u - '0' < 10 || u == '_';
}
-QString QSqlResultPrivate::positionalToNamedBinding()
+QString QSqlResultPrivate::positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx))
{
- int n = sql.size();
+ int n = query.size();
QString result;
result.reserve(n * 5 / 4);
- bool inQuote = false;
+ QChar closingQuote;
int count = 0;
for (int i = 0; i < n; ++i) {
- QChar ch = sql.at(i);
- if (ch == QLatin1Char('?') && !inQuote) {
- result += qFieldSerial(count++);
- } else {
- if (ch == QLatin1Char('\''))
- inQuote = !inQuote;
+ QChar ch = query.at(i);
+ if (!closingQuote.isNull()) {
+ if (ch == closingQuote) {
+ if (closingQuote == QLatin1Char(']')
+ && i + 1 < n && query.at(i + 1) == closingQuote) {
+ // consume the extra character. don't close.
+ ++i;
+ result += ch;
+ } else {
+ closingQuote = QChar();
+ }
+ }
result += ch;
+ } else {
+ if (ch == QLatin1Char('?')) {
+ result += fieldSerialFunc(count++);
+ } else {
+ if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`'))
+ closingQuote = ch;
+ else if (ch == QLatin1Char('['))
+ closingQuote = QLatin1Char(']');
+ result += ch;
+ }
}
}
result.squeeze();
return result;
}
-QString QSqlResultPrivate::namedToPositionalBinding()
+QString QSqlResultPrivate::namedToPositionalBinding(const QString &query)
{
- int n = sql.size();
+ int n = query.size();
QString result;
result.reserve(n);
- bool inQuote = false;
+ QChar closingQuote;
int count = 0;
int i = 0;
while (i < n) {
- QChar ch = sql.at(i);
- if (ch == QLatin1Char(':') && !inQuote
- && (i == 0 || sql.at(i - 1) != QLatin1Char(':'))
- && (i + 1 < n && qIsAlnum(sql.at(i + 1)))) {
- int pos = i + 2;
- while (pos < n && qIsAlnum(sql.at(pos)))
- ++pos;
- QString holder(sql.mid(i, pos - i));
- indexes[holder].append(count++);
- holders.append(QHolder(holder, i));
- result += QLatin1Char('?');
- i = pos;
- } else {
- if (ch == QLatin1Char('\''))
- inQuote = !inQuote;
+ QChar ch = query.at(i);
+ if (!closingQuote.isNull()) {
+ if (ch == closingQuote) {
+ if (closingQuote == QLatin1Char(']')
+ && i + 1 < n && query.at(i + 1) == closingQuote) {
+ // consume the extra character. don't close.
+ ++i;
+ result += ch;
+ } else {
+ closingQuote = QChar();
+ }
+ }
result += ch;
++i;
+ } else {
+ if (ch == QLatin1Char(':')
+ && (i == 0 || query.at(i - 1) != QLatin1Char(':'))
+ && (i + 1 < n && qIsAlnum(query.at(i + 1)))) {
+ int pos = i + 2;
+ while (pos < n && qIsAlnum(query.at(pos)))
+ ++pos;
+ QString holder(query.mid(i, pos - i));
+ indexes[holder].append(count++);
+ holders.append(QHolder(holder, i));
+ result += QLatin1Char('?');
+ i = pos;
+ } else {
+ if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`'))
+ closingQuote = ch;
+ else if (ch == QLatin1Char('['))
+ closingQuote = QLatin1Char(']');
+ result += ch;
+ ++i;
+ }
}
}
result.squeeze();
@@ -531,10 +562,10 @@ bool QSqlResult::savePrepare(const QString& query)
return prepare(query);
// parse the query to memorize parameter location
- d->executedQuery = d->namedToPositionalBinding();
+ d->executedQuery = d->namedToPositionalBinding(query);
if (driver()->hasFeature(QSqlDriver::NamedPlaceholders))
- d->executedQuery = d->positionalToNamedBinding();
+ d->executedQuery = QSqlResultPrivate::positionalToNamedBinding(query);
return prepare(d->executedQuery);
}
@@ -551,7 +582,7 @@ bool QSqlResult::prepare(const QString& query)
d->sql = query;
if (d->holders.isEmpty()) {
// parse the query to memorize parameter location
- d->namedToPositionalBinding();
+ d->namedToPositionalBinding(query);
}
return true; // fake prepares should always succeed
}
@@ -617,7 +648,7 @@ bool QSqlResult::exec()
void QSqlResult::bindValue(int index, const QVariant& val, QSql::ParamType paramType)
{
d->binds = PositionalBinding;
- d->indexes[qFieldSerial(index)].append(index);
+ d->indexes[QSqlResultPrivate::fieldSerial(index)].append(index);
if (d->values.count() <= index)
d->values.resize(index + 1);
d->values[index] = val;
diff --git a/src/sql/kernel/qsqlresult_p.h b/src/sql/kernel/qsqlresult_p.h
index 65f9be7a05..246b914ec7 100644
--- a/src/sql/kernel/qsqlresult_p.h
+++ b/src/sql/kernel/qsqlresult_p.h
@@ -106,8 +106,14 @@ public:
clearIndex();;
}
- QString positionalToNamedBinding();
- QString namedToPositionalBinding();
+ // positionalToNamedBinding uses fieldSerial() by default, which converts to Oracle-style names,
+ // because this style is used in the API. A driver can reuse positionalToNamedBinding()
+ // internally for its own naming style by supplying its own fieldSerialFunc. We cannot make
+ // fieldSerial() virtual because it would allow a driver to impose its naming style on
+ // executedQuery when set by QSqlResult::savePrepare().
+ static QString fieldSerial(int);
+ static QString positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx) = fieldSerial);
+ QString namedToPositionalBinding(const QString &query);
QString holderAt(int index) const;
QSqlResult *q;
diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h
index 2c655cdf23..521f1c12b8 100644
--- a/src/tools/qdoc/config.h
+++ b/src/tools/qdoc/config.h
@@ -188,6 +188,7 @@ private:
#define CONFIG_INDEXES "indexes"
#define CONFIG_LANGUAGE "language"
#define CONFIG_MACRO "macro"
+#define CONFIG_MANIFESTMETA "manifestmeta"
#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_NOLINKERRORS "nolinkerrors"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp
index 0bebe0d670..c85c5c64ef 100644
--- a/src/tools/qdoc/cppcodemarker.cpp
+++ b/src/tools/qdoc/cppcodemarker.cpp
@@ -1165,8 +1165,8 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
}
++c;
}
- if (qcn->qmlBase() != 0) {
- qcn = static_cast<const QmlClassNode*>(qcn->qmlBase());
+ if (qcn->qmlBaseNode() != 0) {
+ qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode());
if (!qcn->isAbstract())
qcn = 0;
}
@@ -1241,8 +1241,8 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
}
++c;
}
- if (qcn->qmlBase() != 0) {
- qcn = static_cast<const QmlClassNode*>(qcn->qmlBase());
+ if (qcn->qmlBaseNode() != 0) {
+ qcn = static_cast<const QmlClassNode*>(qcn->qmlBaseNode());
if (!qcn->isAbstract())
qcn = 0;
}
@@ -1287,7 +1287,7 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno
}
++c;
}
- const DocNode* dn = current->qmlBase();
+ const DocNode* dn = current->qmlBaseNode();
if (dn) {
if (dn->subType() == Node::QmlClass)
current = static_cast<const QmlClassNode*>(dn);
diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp
index 0af5a841eb..68edb1336a 100644
--- a/src/tools/qdoc/cppcodeparser.cpp
+++ b/src/tools/qdoc/cppcodeparser.cpp
@@ -951,11 +951,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
else if (command == COMMAND_QMLINHERITS) {
if (node->name() == arg)
doc.location().warning(tr("%1 tries to inherit itself").arg(arg));
- else {
- setLink(node, Node::InheritsLink, arg);
- if (node->subType() == Node::QmlClass) {
- QmlClassNode::addInheritedBy(arg,node);
- }
+ else if (node->subType() == Node::QmlClass) {
+ QmlClassNode *qmlClass = static_cast<QmlClassNode*>(node);
+ qmlClass->setQmlBaseName(arg);
+ QmlClassNode::addInheritedBy(arg,node);
}
}
else if (command == COMMAND_QMLINSTANTIATES) {
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 43d3a8071d..22694dd0d3 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -4198,7 +4198,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker*
{
if (!qcn)
return;
- const DocNode* base = qcn->qmlBase();
+ const DocNode* base = qcn->qmlBaseNode();
if (base) {
writeStartTag(DT_qmlInherits);
//writeStartTag(DT_qmlTypeDef);
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 8052558dc6..2666f10eb4 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -223,6 +223,7 @@ void HtmlGenerator::initializeGenerator(const Config &config)
QString prefix = CONFIG_QHP + Config::dot + project + Config::dot;
manifestDir = "qthelp://" + config.getString(prefix + "namespace");
manifestDir += QLatin1Char('/') + config.getString(prefix + "virtualFolder") + QLatin1Char('/');
+ readManifestMetaContent(config);
examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH);
if (!examplesPath.isEmpty())
examplesPath += QLatin1Char('/');
@@ -3869,7 +3870,7 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker* mar
{
if (!qcn)
return;
- const DocNode* base = qcn->qmlBase();
+ const DocNode* base = qcn->qmlBaseNode();
if (base) {
Text text;
text << Atom::ParaLeft << "Inherits ";
@@ -3991,10 +3992,11 @@ void HtmlGenerator::generateManifestFiles()
generateManifestFile("examples", "example");
generateManifestFile("demos", "demo");
ExampleNode::exampleNodeMap.clear();
+ manifestMetaContent.clear();
}
/*!
- This function is called by generaqteManiferstFile(), once
+ This function is called by generateManifestFiles(), once
for each manifest file to be generated. \a manifest is the
type of manifest file.
*/
@@ -4086,6 +4088,36 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
}
if (!en->imageFileName().isEmpty())
writer.writeAttribute("imageUrl", manifestDir + en->imageFileName());
+
+ QString fullName = project + QLatin1Char('/') + en->title();
+ QSet<QString> tags;
+ for (int idx=0; idx < manifestMetaContent.size(); ++idx) {
+ foreach (const QString &name, manifestMetaContent[idx].names) {
+ bool match = false;
+ int wildcard = name.indexOf(QChar('*'));
+ switch (wildcard) {
+ case -1: // no wildcard, exact match
+ match = (fullName == name);
+ break;
+ case 0: // '*' matches all
+ match = true;
+ break;
+ default: // match with wildcard at the end
+ match = fullName.startsWith(name.left(wildcard));
+ }
+ if (match) {
+ tags += manifestMetaContent[idx].tags;
+ foreach (const QString &attr, manifestMetaContent[idx].attributes) {
+ QStringList attrList = attr.split(QLatin1Char(':'), QString::SkipEmptyParts);
+ if (attrList.count() == 1)
+ attrList.append(QStringLiteral("true"));
+ if (attrList.count() == 2)
+ writer.writeAttribute(attrList[0], attrList[1]);
+ }
+ }
+ }
+ }
+
writer.writeStartElement("description");
Text brief = en->doc().briefText();
if (!brief.isEmpty())
@@ -4093,12 +4125,11 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
else
writer.writeCDATA(QString("No description available"));
writer.writeEndElement(); // description
- QStringList tags = en->title().toLower().split(QLatin1Char(' '));
+ tags += QSet<QString>::fromList(en->title().toLower().split(QLatin1Char(' ')));
if (!tags.isEmpty()) {
writer.writeStartElement("tags");
bool wrote_one = false;
- for (int n=0; n<tags.size(); ++n) {
- QString tag = tags.at(n);
+ foreach (QString tag, tags) {
if (tag.at(0).isDigit())
continue;
if (tag.at(0) == '-')
@@ -4109,7 +4140,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
continue;
if (tag.endsWith(QLatin1Char(':')))
tag.chop(1);
- if (n>0 && wrote_one)
+ if (wrote_one)
writer.writeCharacters(",");
writer.writeCharacters(tag);
wrote_one = true;
@@ -4163,6 +4194,25 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element)
}
/*!
+ Reads metacontent - additional attributes and tags to apply
+ when generating manifest files, read from config. Takes the
+ configuration class \a config as a parameter.
+ */
+void HtmlGenerator::readManifestMetaContent(const Config &config)
+{
+ QStringList names = config.getStringList(CONFIG_MANIFESTMETA + Config::dot + QStringLiteral("filters"));
+
+ foreach (const QString &manifest, names) {
+ ManifestMetaFilter filter;
+ QString prefix = CONFIG_MANIFESTMETA + Config::dot + manifest + Config::dot;
+ filter.names = config.getStringSet(prefix + QStringLiteral("names"));
+ filter.attributes = config.getStringSet(prefix + QStringLiteral("attributes"));
+ filter.tags = config.getStringSet(prefix + QStringLiteral("tags"));
+ manifestMetaContent.append(filter);
+ }
+}
+
+/*!
Find global entities that have documentation but no
\e{relates} comand. Report these as errors if they
are not also marked \e {internal}.
diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h
index 65d874f619..f2efab78a1 100644
--- a/src/tools/qdoc/htmlgenerator.h
+++ b/src/tools/qdoc/htmlgenerator.h
@@ -108,6 +108,7 @@ protected:
virtual QString linkForNode(const Node *node, const Node *relative);
void generateManifestFile(QString manifest, QString element);
+ void readManifestMetaContent(const Config &config);
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
@@ -118,6 +119,13 @@ private:
EndMark
};
+ struct ManifestMetaFilter
+ {
+ QSet<QString> names;
+ QSet<QString> attributes;
+ QSet<QString> tags;
+ };
+
const QPair<QString,QString> anchorForNode(const Node *node);
void generateBreadCrumbs(const QString& title,
const Node *node,
@@ -242,6 +250,7 @@ private:
bool obsoleteLinks;
QStack<QXmlStreamWriter*> xmlWriterStack;
static int id;
+ QList<ManifestMetaFilter> manifestMetaContent;
public:
static bool debugging_on;
static QString divNavTop;
diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp
index 0fb9ccc97f..5fbdb487db 100644
--- a/src/tools/qdoc/node.cpp
+++ b/src/tools/qdoc/node.cpp
@@ -2097,7 +2097,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name)
abstract_(false),
cnodeRequired_(false),
cnode_(0),
- base_(0)
+ baseNode_(0)
{
int i = 0;
if (name.startsWith("QML:")) {
diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h
index 11c08fb659..ecb3c5771e 100644
--- a/src/tools/qdoc/node.h
+++ b/src/tools/qdoc/node.h
@@ -131,8 +131,7 @@ public:
NextLink,
PreviousLink,
ContentsLink,
- IndexLink,
- InheritsLink /*,
+ IndexLink /*,
GlossaryLink,
CopyrightLink,
ChapterLink,
@@ -546,8 +545,10 @@ public:
virtual void setAbstract(bool b) { abstract_ = b; }
const ImportList& importList() const { return importList_; }
void setImportList(const ImportList& il) { importList_ = il; }
- const DocNode* qmlBase() const { return base_; }
- void setQmlBase(DocNode* b) { base_ = b; }
+ const QString& qmlBaseName() const { return baseName_; }
+ void setQmlBaseName(const QString& name) { baseName_ = name; }
+ const DocNode* qmlBaseNode() const { return baseNode_; }
+ void setQmlBaseNode(DocNode* b) { baseNode_ = b; }
void requireCppClass() { cnodeRequired_ = true; }
bool cppClassRequired() const { return cnodeRequired_; }
static void addInheritedBy(const QString& base, Node* sub);
@@ -562,7 +563,8 @@ private:
bool abstract_;
bool cnodeRequired_;
ClassNode* cnode_;
- DocNode* base_;
+ QString baseName_;
+ DocNode* baseNode_;
ImportList importList_;
};
diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro
index 9729a758f0..9df79ec718 100644
--- a/src/tools/qdoc/qdoc.pro
+++ b/src/tools/qdoc/qdoc.pro
@@ -91,3 +91,5 @@ qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf
load(qt_tool)
+
+TR_EXCLUDE += $$PWD/*
diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp
index 982df5bbc3..4208d529c8 100644
--- a/src/tools/qdoc/qdocdatabase.cpp
+++ b/src/tools/qdoc/qdocdatabase.cpp
@@ -623,6 +623,7 @@ const NodeMultiMap& QDocDatabase::getSinceMap(const QString& key) const
to generating documentation.
*/
void QDocDatabase::resolveIssues() {
+ resolveQmlInheritance(treeRoot());
resolveTargets(treeRoot());
tree_->resolveCppToQmlLinks();
}
@@ -822,6 +823,35 @@ QString QDocDatabase::findTarget(const QString& target, const Node* node) const
}
/*!
+ For each QML Type node in the tree beginning at \a root,
+ if it has a QML base type name but its QML base type node
+ pointer is 0, use the QML base type name to look up the
+ base type node. If the node is found in the tree, set the
+ node's QML base type node pointer.
+ */
+void QDocDatabase::resolveQmlInheritance(InnerNode* root)
+{
+ // Dop we need recursion?
+ foreach (Node* child, root->childNodes()) {
+ if (child->type() == Node::Document && child->subType() == Node::QmlClass) {
+ QmlClassNode* qcn = static_cast<QmlClassNode*>(child);
+ if ((qcn->qmlBaseNode() == 0) && !qcn->qmlBaseName().isEmpty()) {
+ QmlClassNode* bqcn = findQmlType(QString(), qcn->qmlBaseName());
+ if (bqcn) {
+ qcn->setQmlBaseNode(bqcn);
+ }
+#if 0
+ else {
+ qDebug() << "Unable to resolve QML base type:" << qcn->qmlBaseName()
+ << "for QML type:" << qcn->name();
+ }
+#endif
+ }
+ }
+ }
+}
+
+/*!
*/
void QDocDatabase::resolveTargets(InnerNode* root)
{
diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h
index 857fd301bb..9c6810941d 100644
--- a/src/tools/qdoc/qdocdatabase.h
+++ b/src/tools/qdoc/qdocdatabase.h
@@ -140,6 +140,7 @@ class QDocDatabase
Tree* tree() { return tree_; }
NamespaceNode* treeRoot() { return tree_->root(); }
void resolveInheritance() { tree_->resolveInheritance(); }
+ void resolveQmlInheritance(InnerNode* root);
void resolveIssues();
void fixInheritance() { tree_->fixInheritance(); }
void resolveProperties() { tree_->resolveProperties(); }
diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp
index 9dc15d56f1..15af03d9ba 100644
--- a/src/tools/qdoc/qmlvisitor.cpp
+++ b/src/tools/qdoc/qmlvisitor.cpp
@@ -106,7 +106,7 @@ QmlDocVisitor::~QmlDocVisitor()
}
/*!
- Returns the location of thre nearest comment above the \a offset.
+ Returns the location of the nearest comment above the \a offset.
*/
QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const
{
@@ -322,11 +322,10 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation,
else if (command == COMMAND_QMLINHERITS) {
if (node->name() == args[0].first)
doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first));
- else {
- CodeParser::setLink(node, Node::InheritsLink, args[0].first);
- if (node->subType() == Node::QmlClass) {
- QmlClassNode::addInheritedBy(args[0].first,node);
- }
+ else if (node->subType() == Node::QmlClass) {
+ QmlClassNode *qmlClass = static_cast<QmlClassNode*>(node);
+ qmlClass->setQmlBaseName(args[0].first);
+ QmlClassNode::addInheritedBy(args[0].first,node);
}
}
else if (command == COMMAND_QMLDEFAULT) {
@@ -389,11 +388,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition)
QmlClassNode *component = new QmlClassNode(current, name);
component->setTitle(name);
component->setImportList(importList);
-
if (applyDocumentation(definition->firstSourceLocation(), component)) {
QmlClassNode::addInheritedBy(type, component);
- if (!component->links().contains(Node::InheritsLink))
- component->setLink(Node::InheritsLink, type, type);
+ component->setQmlBaseName(type);
}
current = component;
}
diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp
index ea1d2a92e2..1efab11a92 100644
--- a/src/tools/qdoc/tree.cpp
+++ b/src/tools/qdoc/tree.cpp
@@ -399,10 +399,12 @@ void Tree::addPropertyFunction(PropertyNode* property,
/*!
This function resolves inheritance and reimplementation settings
- for each class node found in the namspace beginning ar \a rootNode.
+ for each C++ class node found in the namspace beginning at \a rootNode.
If it finds another namespace node in the child list of \a rootNode,
it calls itself recursively. For each child of \a rootNode that is a
class node, it calls the other resolveInheritance() function.
+
+ This function does not resolve QML inheritance.
*/
void Tree::resolveInheritance(NamespaceNode* rootNode)
{
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
index c3a9ea228e..fa9ed54c50 100644
--- a/src/tools/tools.pro
+++ b/src/tools/tools.pro
@@ -41,5 +41,3 @@ SUBDIRS = $$TOOLS_SUBDIRS
bootstrap_prepare_docs.depends += $${src_tools_qdoc.target}-make_first
bootstrap_prepare_docs.target = $${src_tools_bootstrap.target}-prepare_docs
QMAKE_EXTRA_TARGETS += bootstrap_prepare_docs
-
-TR_EXCLUDE += $$PWD/*
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 4442b3f00c..3320cc7c04 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -536,6 +536,7 @@ void QFileDialogPrivate::initHelper(QPlatformDialogHelper *h)
QObject::connect(h, SIGNAL(filesSelected(QStringList)), d, SIGNAL(filesSelected(QStringList)));
QObject::connect(h, SIGNAL(currentChanged(QString)), d, SIGNAL(currentChanged(QString)));
QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SIGNAL(directoryEntered(QString)));
+ QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SLOT(_q_nativeEnterDirectory(QString)));
QObject::connect(h, SIGNAL(filterSelected(QString)), d, SIGNAL(filterSelected(QString)));
static_cast<QPlatformFileDialogHelper *>(h)->setOptions(options);
}
@@ -3114,6 +3115,12 @@ void QFileDialogPrivate::_q_fileRenamed(const QString &path, const QString oldNa
}
}
+void QFileDialogPrivate::_q_nativeEnterDirectory(const QString &directory)
+{
+ if (!directory.isEmpty()) // Windows native dialogs occasionally emit signals with empty strings.
+ *lastVisitedDir() = directory;
+}
+
/*!
\internal
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index 6ddbb7c0d0..973bccf940 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -240,6 +240,7 @@ private:
Q_PRIVATE_SLOT(d_func(), void _q_updateOkButton())
Q_PRIVATE_SLOT(d_func(), void _q_currentChanged(const QModelIndex &index))
Q_PRIVATE_SLOT(d_func(), void _q_enterDirectory(const QModelIndex &index))
+ Q_PRIVATE_SLOT(d_func(), void _q_nativeEnterDirectory(const QString&))
Q_PRIVATE_SLOT(d_func(), void _q_goToDirectory(const QString &path))
Q_PRIVATE_SLOT(d_func(), void _q_useNameFilter(int index))
Q_PRIVATE_SLOT(d_func(), void _q_selectionChanged())
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index 304eada093..ffaa2bc6f8 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -204,6 +204,7 @@ public:
void _q_updateOkButton();
void _q_currentChanged(const QModelIndex &index);
void _q_enterDirectory(const QModelIndex &index);
+ void _q_nativeEnterDirectory(const QString &directory);
void _q_goToDirectory(const QString &);
void _q_useNameFilter(int index);
void _q_selectionChanged();
diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf
index e960ebfeba..a989ef9363 100644
--- a/src/widgets/doc/qtwidgets.qdocconf
+++ b/src/widgets/doc/qtwidgets.qdocconf
@@ -34,6 +34,15 @@ headerdirs += ..
sourcedirs += .. \
../../../examples/widgets/doc/src
+excludefiles += ../widgets/qmacnativewidget_mac.h \
+ ../widgets/qmaccocoaviewcontainer_mac.h \
+ ../widgets/qcocoatoolbardelegate_mac_p.h \
+ ../widgets/qcocoamenu_mac_p.h \
+ ../widgets/qmaccocoaviewcontainer_mac.mm \
+ ../widgets/qcocoatoolbardelegate_mac.mm \
+ ../widgets/qmainwindowlayout_mac.mm \
+ ../widgets/qmacnativewidget_mac.mm
+
exampledirs += ../../../examples/widgets \
../../../doc/src/snippets \
../ \
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 5dc59436ad..f04667e167 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -2178,6 +2178,8 @@ bool QGraphicsItem::hasCursor() const
*/
void QGraphicsItem::unsetCursor()
{
+ if (!d_ptr->hasCursor)
+ return;
d_ptr->unsetExtra(QGraphicsItemPrivate::ExtraCursor);
d_ptr->hasCursor = 0;
if (d_ptr->scene) {
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 9112e48869..1b6f6b8f8f 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1391,6 +1391,14 @@ QWidget::~QWidget()
QT_TRY {
+#ifndef QT_NO_GRAPHICSVIEW
+ const QWidget* w = this;
+ while (w->d_func()->extra && w->d_func()->extra->focus_proxy)
+ w = w->d_func()->extra->focus_proxy;
+ QWidget *window = w->window();
+ QWExtra *e = window ? window->d_func()->extra : 0;
+ if (!e || !e->proxyWidget)
+#endif
clearFocus();
} QT_CATCH(...) {
// swallow this problem because we are in a destructor
@@ -8414,7 +8422,7 @@ void QWidget::mouseReleaseEvent(QMouseEvent *event)
void QWidget::mouseDoubleClickEvent(QMouseEvent *event)
{
- Q_UNUSED(event);
+ event->ignore();
}
#ifndef QT_NO_WHEELEVENT
diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm
index 085bf627aa..00356b7468 100644
--- a/src/widgets/styles/qmacstyle_mac.mm
+++ b/src/widgets/styles/qmacstyle_mac.mm
@@ -2705,7 +2705,8 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
ret = false;
break;
case SH_ScrollBar_Transient:
- if (qobject_cast<const QScrollBar *>(w) ||
+ if ((qobject_cast<const QScrollBar *>(w) && w->parent() &&
+ qobject_cast<QAbstractScrollArea*>(w->parent()->parent())) ||
(opt && QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ScrollBar))) {
ret = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp
index 6d8a3ce0c3..75c74e4a88 100644
--- a/src/widgets/styles/qstylehelper.cpp
+++ b/src/widgets/styles/qstylehelper.cpp
@@ -86,17 +86,13 @@ qreal dpiScaled(qreal value)
#endif
}
+#ifndef QT_NO_ACCESSIBILITY
bool isInstanceOf(QObject *obj, QAccessible::Role role)
{
bool match = false;
-#ifndef QT_NO_ACCESSIBILITY
QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj);
match = iface && iface->role() == role;
delete iface;
-#else
- Q_UNUSED(obj)
- Q_UNUSED(role)
-#endif // QT_NO_ACCESSIBILITY
return match;
}
@@ -104,19 +100,15 @@ bool isInstanceOf(QObject *obj, QAccessible::Role role)
bool hasAncestor(QObject *obj, QAccessible::Role role)
{
bool found = false;
-#ifndef QT_NO_ACCESSIBILITY
QObject *parent = obj ? obj->parent() : 0;
while (parent && !found) {
if (isInstanceOf(parent, role))
found = true;
parent = parent->parent();
}
-#else
- Q_UNUSED(obj)
- Q_UNUSED(role)
-#endif // QT_NO_ACCESSIBILITY
return found;
}
+#endif // QT_NO_ACCESSIBILITY
#ifndef QT_NO_DIAL
diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h
index 41f823def7..01772e765c 100644
--- a/src/widgets/styles/qstylehelper_p.h
+++ b/src/widgets/styles/qstylehelper_p.h
@@ -82,8 +82,10 @@ namespace QStyleHelper
void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
int left = 0, int top = 0, int right = 0,
int bottom = 0);
+#ifndef QT_NO_ACCESSIBILITY
bool isInstanceOf(QObject *obj, QAccessible::Role role);
bool hasAncestor(QObject *obj, QAccessible::Role role);
+#endif
}
diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp
index 11d82b2332..113f0b68b2 100644
--- a/src/widgets/util/qsystemtrayicon_qpa.cpp
+++ b/src/widgets/util/qsystemtrayicon_qpa.cpp
@@ -68,7 +68,7 @@ void QSystemTrayIconPrivate::install_sys()
if (qpa_sys) {
qpa_sys->init();
QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)),
- q_func(), SLOT(emitActivated(QPlatformSystemTrayIcon::ActivationReason)));
+ q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason)));
QObject::connect(qpa_sys, SIGNAL(messageClicked()),
q_func(), SIGNAL(messageClicked()));
updateMenu_sys();
diff --git a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt
index 1e50448b10..945b757898 100644
--- a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt
@@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f4f93c4fa90) 0
QObject (0x7f4f93e37f60) 0
primary-for QObjectCleanupHandler (0x7f4f93c4fa90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f4f93c62060) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt
index b18f1c933c..dcf2570753 100644
--- a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45852d0) 0
QObject (0xb4452038) 0
primary-for QObjectCleanupHandler (0xb45852d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4452578) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt
index 7308f3c082..bb689d46ea 100644
--- a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f392077aa90) 0
QObject (0x7f3920962f60) 0
primary-for QObjectCleanupHandler (0x7f392077aa90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f392078d060) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt
index 469e52f1fb..00f8ca14c1 100644
--- a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45942d0) 0
QObject (0xb4461038) 0
primary-for QObjectCleanupHandler (0xb45942d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4461578) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt
index 8bca40b218..275271594b 100644
--- a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fbaa1e96a90) 0
QObject (0x7fbaa1ea7000) 0
primary-for QObjectCleanupHandler (0x7fbaa1e96a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7fbaa1ea70c0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt
index 8e9b2acdc5..8c509033ad 100644
--- a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb452e2d0) 0
QObject (0xb43fc038) 0
primary-for QObjectCleanupHandler (0xb452e2d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb43fc578) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt
index 1b57180796..875b25ffc5 100644
--- a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f7180f27a90) 0
QObject (0x7f7180e6d480) 0
primary-for QObjectCleanupHandler (0x7f7180f27a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f7180e6d540) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt
index 0b344d7411..cb310963bd 100644
--- a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42044ec) 0
QObject (0xb41bb348) 0
primary-for QObjectCleanupHandler (0xb42044ec)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb41bb888) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt
index 540ce9196b..4bfa81650a 100644
--- a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fb654a90a90) 0
QObject (0x7fb654c78f60) 0
primary-for QObjectCleanupHandler (0x7fb654a90a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7fb654aa3060) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt
index db3eab60c1..313f83968c 100644
--- a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb434b2d0) 0
QObject (0xb4418070) 0
primary-for QObjectCleanupHandler (0xb434b2d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb44185b0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt
index 2d7d1aa224..0f51bab46e 100644
--- a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f04b9c1da90) 0
QObject (0x7f04b9b0e900) 0
primary-for QObjectCleanupHandler (0x7f04b9c1da90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f04b9b0e9c0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt
index 71154e9150..78509e24cc 100644
--- a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb4463c30) 0
QObject (0xb4070508) 0
primary-for QObjectCleanupHandler (0xb4463c30)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4070a48) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt
index 902bffaa02..bcdbbaf895 100644
--- a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt
@@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f0bd6b6ba90) 0
QObject (0x7f0bd6aac4e0) 0
primary-for QObjectCleanupHandler (0x7f0bd6b6ba90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f0bd6aac5a0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt
index 4aba60c3b6..19cbef7918 100644
--- a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb426f5dc) 0
QObject (0xb4063508) 0
primary-for QObjectCleanupHandler (0xb426f5dc)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4063a48) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt
index 859f5621bc..6b1b8b3e72 100644
--- a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f5e7bb99a90) 0
QObject (0x7f5e7bd82f60) 0
primary-for QObjectCleanupHandler (0x7f5e7bb99a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f5e7bbad060) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt
index ca049cfb11..f3e4d84ee1 100644
--- a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45532d0) 0
QObject (0xb4422038) 0
primary-for QObjectCleanupHandler (0xb45532d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4422578) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt
index 6c78fab45b..cda6ea5ec6 100644
--- a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fdcea1e6a90) 0
QObject (0x7fdcea1e2120) 0
primary-for QObjectCleanupHandler (0x7fdcea1e6a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7fdcea1e21e0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt
index aa7b491552..6583d33b0f 100644
--- a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb44aa348) 0
QObject (0xb441f0a8) 0
primary-for QObjectCleanupHandler (0xb44aa348)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb441f5e8) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt
index 30e5f7a2d7..25e4d7d84e 100644
--- a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f8720705a90) 0
QObject (0x7f87206474e0) 0
primary-for QObjectCleanupHandler (0x7f8720705a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f87206475a0) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt
index 5768949810..64234d8c58 100644
--- a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt
@@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42315dc) 0
QObject (0xb4025508) 0
primary-for QObjectCleanupHandler (0xb42315dc)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb4025a48) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt
index 10e33c0c0e..3658e535b9 100644
--- a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt
+++ b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt
@@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f6638185a90) 0
QObject (0x7f663836ef60) 0
primary-for QObjectCleanupHandler (0x7f6638185a90)
-Class QPointerBase
- size=16 align=8
- base size=16 base align=8
-QPointerBase (0x7f663819a060) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt
index 62f4df364a..5d75609cf5 100644
--- a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt
+++ b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt
@@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0xb457e2d0) 0
QObject (0xb444d038) 0
primary-for QObjectCleanupHandler (0xb457e2d0)
-Class QPointerBase
- size=8 align=4
- base size=8 base align=4
-QPointerBase (0xb444d578) 0
-
Class QSharedMemory::QPrivateSignal
size=1 align=1
base size=0 base align=1
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 4138795973..dd76fdd938 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -1657,6 +1657,10 @@ void tst_QLocale::ampm()
QLocale id("id_ID");
QCOMPARE(id.amText(), QLatin1String("AM"));
QCOMPARE(id.pmText(), QLatin1String("PM"));
+
+ QLocale ta("ta_LK");
+ QCOMPARE(ta.amText(), QLatin1String("AM"));
+ QCOMPARE(ta.pmText(), QLatin1String("PM"));
}
void tst_QLocale::dateFormat()
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index b668f57909..2cd5216c59 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -2115,5 +2115,5 @@ void tst_QImage::cleanupFunctions()
}
-QTEST_MAIN(tst_QImage)
+QTEST_GUILESS_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro
index 294caeba5a..06f4a05241 100644
--- a/tests/auto/network/ssl/ssl.pro
+++ b/tests/auto/network/ssl/ssl.pro
@@ -4,11 +4,11 @@ SUBDIRS=\
qsslcipher \
qsslerror \
qsslkey \
- qsslsocket \
- qsslsocket_onDemandCertificates_member \
- qsslsocket_onDemandCertificates_static \
-!contains(QT_CONFIG, private_tests): SUBDIRS -= \
- qsslsocket \
- qsslsocket_onDemandCertificates_member \
- qsslsocket_onDemandCertificates_static \
+contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked):
+ contains(QT_CONFIG, private_tests) {
+ SUBDIRS += \
+ qsslsocket \
+ qsslsocket_onDemandCertificates_member \
+ qsslsocket_onDemandCertificates_static \
+ }
diff --git a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
index 93f4978ea6..9d435a0f7c 100644
--- a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
+++ b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h
@@ -58,6 +58,11 @@ public:
return QSqlResult::savePrepare(sqlquery);
}
+ QVector<QVariant> boundValues() const
+ {
+ return QSqlResult::boundValues();
+ }
+
protected:
QVariant data(int /* index */) { return QVariant(); }
bool isNull(int /* index */) { return false; }
diff --git a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
index 7e901d4b2c..ba6b4d1fbf 100644
--- a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
+++ b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp
@@ -53,6 +53,7 @@ public:
private slots:
void positionalToNamedBinding();
+ void parseOfBoundValues();
};
@@ -66,6 +67,39 @@ void tst_QSqlResult::positionalToNamedBinding()
TestSqlDriverResult result(&testDriver);
QString query("INSERT INTO MYTABLE (ID, NAME, BIRTH) VALUES(?, ?, ?)");
QVERIFY(result.savePrepare(query));
+ QCOMPARE(result.boundValues().count(), 3);
+}
+
+void tst_QSqlResult::parseOfBoundValues()
+{
+ TestSqlDriver testDriver;
+ TestSqlDriverResult result(&testDriver);
+ QVERIFY(result.savePrepare("SELECT :1 AS \":2\""));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT :1 AS ':2'"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT :1 AS [:2]"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]]]"));
+ QCOMPARE(result.boundValues().count(), 1);
+
+ QVERIFY(result.savePrepare("SELECT ? AS \"?\""));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT ? AS '?'"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT ? AS [?]"));
+ QCOMPARE(result.boundValues().count(), 1);
+
+ QVERIFY(result.savePrepare("SELECT ? AS \"'?\""));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT ? AS '?\"'"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT ? AS '?''?'"));
+ QCOMPARE(result.boundValues().count(), 1);
+ QVERIFY(result.savePrepare("SELECT ? AS [\"?']"));
+ QCOMPARE(result.boundValues().count(), 1);
}
QTEST_MAIN( tst_QSqlResult )
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index ab1500ee32..c1927c9d1f 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -411,6 +411,7 @@ private slots:
void destroyedSignal();
void keyboardModifiers();
+ void mouseDoubleClickBubbling_QTBUG29680();
private:
bool ensureScreenSize(int width, int height);
@@ -10047,5 +10048,30 @@ void tst_QWidget::keyboardModifiers()
QCOMPARE(int(w->m_appModifiers), int(Qt::ControlModifier));
}
+class DClickWidget : public QWidget
+{
+public:
+ DClickWidget() : triggered(false) {}
+ void mouseDoubleClickEvent(QMouseEvent *)
+ {
+ triggered = true;
+ }
+ bool triggered;
+};
+
+void tst_QWidget::mouseDoubleClickBubbling_QTBUG29680()
+{
+ DClickWidget parent;
+ QWidget child(&parent);
+ parent.resize(200, 200);
+ child.resize(200, 200);
+ parent.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&parent));
+
+ QTest::mouseDClick(&child, Qt::LeftButton);
+
+ QTRY_VERIFY(parent.triggered);
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 240859aa14..5fe1e029fb 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -1602,7 +1602,7 @@ bool Configure::displayHelp()
desc( "-libdir <dir>", "Libraries will be installed to <dir>\n(default PREFIX/lib)");
desc( "-headerdir <dir>", "Headers will be installed to <dir>\n(default PREFIX/include)");
desc( "-archdatadir <dir>", "Architecture-dependent data used by Qt will be installed to <dir>\n(default PREFIX)");
- desc( "-libexecdir <dir>", "Program executables will be installed to <dir>\n(default ARCHDATADIR/libexec)");
+ desc( "-libexecdir <dir>", "Program executables will be installed to <dir>\n(default ARCHDATADIR/lib)");
desc( "-plugindir <dir>", "Plugins will be installed to <dir>\n(default ARCHDATADIR/plugins)");
desc( "-importdir <dir>", "Imports for QML1 will be installed to <dir>\n(default ARCHDATADIR/imports)");
desc( "-qmldir <dir>", "Imports for QML2 will be installed to <dir>\n(default ARCHDATADIR/qml)");
@@ -3561,8 +3561,12 @@ void Configure::generateQConfigCpp()
dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib";
if (!dictionary["QT_INSTALL_ARCHDATA"].size())
dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"];
- if (!dictionary["QT_INSTALL_LIBEXECS"].size())
- dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec";
+ if (!dictionary["QT_INSTALL_LIBEXECS"].size()) {
+ if (dictionary["QT_INSTALL_ARCHDATA"] == dictionary["QT_INSTALL_PREFIX"])
+ dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/lib";
+ else
+ dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec";
+ }
if (!dictionary["QT_INSTALL_BINS"].size())
dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin";
if (!dictionary["QT_INSTALL_PLUGINS"].size())