summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure14
-rw-r--r--dist/README4
-rw-r--r--doc/README2
-rw-r--r--doc/global/externalsites/qt-webpages.qdoc12
-rw-r--r--doc/global/html-footer-online.qdocconf4
-rw-r--r--doc/global/html-footer.qdocconf4
-rw-r--r--doc/global/html-header-online.qdocconf2
-rw-r--r--doc/global/qt-html-templates-online.qdocconf3
-rw-r--r--doc/global/qt-module-defaults-online-commercial.qdocconf2
-rw-r--r--doc/global/qt-module-defaults-online.qdocconf2
-rw-r--r--doc/global/template/style/online.css30
-rw-r--r--mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf2
-rw-r--r--mkspecs/devices/linux-rasp-pi-g++/qmake.conf2
-rw-r--r--mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf2
-rw-r--r--mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf2
-rw-r--r--mkspecs/devices/linux-snowball-g++/qmake.conf2
-rw-r--r--mkspecs/features/qt_headersclean.prf2
-rw-r--r--mkspecs/modules/README2
-rw-r--r--src/corelib/codecs/qsimplecodec.cpp2
-rw-r--r--src/corelib/global/qlibraryinfo.cpp4
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp39
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.cpp24
-rw-r--r--src/widgets/doc/src/modelview.qdoc2
-rw-r--r--tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp9
-rw-r--r--tests/auto/gui/image/qimage/tst_qimage.cpp13
-rw-r--r--tests/auto/gui/text/qtexttable/tst_qtexttable.cpp115
-rw-r--r--tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp8
-rw-r--r--tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp4
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp2
31 files changed, 253 insertions, 66 deletions
diff --git a/configure b/configure
index b4285b88f6..61064bca59 100755
--- a/configure
+++ b/configure
@@ -594,6 +594,7 @@ CFG_WIDGETS=yes
CFG_QCONFIG=full
CFG_DEBUG=auto
CFG_MYSQL_CONFIG=
+CFG_PSQL_CONFIG=
CFG_DEBUG_RELEASE=no
CFG_FORCEDEBUGINFO=no
CFG_SHARED=yes
@@ -913,6 +914,7 @@ while [ "$#" -gt 0 ]; do
-arch| \
-host-arch| \
-mysql_config| \
+ -psql_config| \
-qpa| \
-qconfig| \
-qreal| \
@@ -1105,6 +1107,9 @@ while [ "$#" -gt 0 ]; do
mysql_config)
CFG_MYSQL_CONFIG="$VAL"
;;
+ psql_config)
+ CFG_PSQL_CONFIG="$VAL"
+ ;;
prefix)
QT_INSTALL_PREFIX="$VAL"
;;
@@ -3404,7 +3409,7 @@ fi
# auto-detect -fuse-ld=gold support
if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
- if linkerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
+ if compilerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
CFG_USE_GOLD_LINKER=yes
else
if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then
@@ -4615,10 +4620,11 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do
;;
psql)
if [ "$CFG_SQL_psql" != "no" ]; then
+ [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
# Be careful not to use native pg_config when cross building.
- if [ "$XPLATFORM_MINGW" != "yes" ] && "$WHICH" pg_config >/dev/null 2>&1; then
- QT_CFLAGS_PSQL=`pg_config --includedir 2>/dev/null | filterIncludePath`
- QT_LFLAGS_PSQL=`pg_config --libdir 2>/dev/null | filterLibraryPath`
+ if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
+ QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
+ QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
fi
[ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
[ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
diff --git a/dist/README b/dist/README
index 6332d12c34..f0d2034001 100644
--- a/dist/README
+++ b/dist/README
@@ -13,7 +13,7 @@ http://qt-project.org
Be sure to check out the release notes, which will list any known
problems or limitations of this version:
-http://qt-project.org/wiki/Category:Release
+https://wiki.qt.io/?title=Category:Release
Overview
@@ -101,7 +101,7 @@ Building Qt 5 from Source
-------------------------
See <install_dir>/<version>/src/README and
-http://qt-project.org/wiki/Building-Qt-5-from-Git
+http://wiki.qt.io/?title=Building_Qt_5_from_Git
for instructions on building Qt from source.
diff --git a/doc/README b/doc/README
index 355f61d353..a00256d195 100644
--- a/doc/README
+++ b/doc/README
@@ -106,4 +106,4 @@ More Information
================
For more information about Qt 5's documentation, refer to the Qt Project wiki:
-http://qt-project.org/wiki/Qt5DocumentationProject
+http://wiki.qt.io/?title=Qt5DocumentationProject
diff --git a/doc/global/externalsites/qt-webpages.qdoc b/doc/global/externalsites/qt-webpages.qdoc
index 888f1d6fe7..695a4ff7f4 100644
--- a/doc/global/externalsites/qt-webpages.qdoc
+++ b/doc/global/externalsites/qt-webpages.qdoc
@@ -58,7 +58,7 @@
*/
/*!
- \externalpage http://qt-project.org/wiki/Qt_Coding_Style
+ \externalpage http://wiki.qt.io/?title=Qt_Coding_Style
\title Qt Coding Style
*/
/*!
@@ -78,16 +78,16 @@
\title Pimp my video
*/
/*!
- \externalpage http://qt-project.org/wiki/QtMediaHub
+ \externalpage http://wiki.qt.io/?title=QtMediaHub
\title QtMediaHub
*/
/*!
- \externalpage http://qt-project.org/wiki/Qt-RaspberryPi
+ \externalpage http://wiki.qt.io/?title=Qt_RaspberryPi
\title QtonPi
*/
/*!
- \externalpage http://qt-project.org/wiki/jom
+ \externalpage http://wiki.qt.io/?title=jom
\title jom
*/
@@ -102,11 +102,11 @@
*/
/*!
- \externalpage http://qt-project.org/wiki/Qt-Localization
+ \externalpage http://wiki.qt.io/?title=Qt_Localization
\title external: Translating Qt Into Other Languages
*/
/*!
- \externalpage http://qt-project.org/wiki/BlackBerry
+ \externalpage http://wiki.qt.io/?title=BlackBerry
\title Qt for BlackBerry
*/
diff --git a/doc/global/html-footer-online.qdocconf b/doc/global/html-footer-online.qdocconf
index 8487ee187c..6b3ea82968 100644
--- a/doc/global/html-footer-online.qdocconf
+++ b/doc/global/html-footer-online.qdocconf
@@ -36,9 +36,9 @@ HTML.footer += \
" <li id=\"menu-item-1365\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1365\"><a href=\"http://doc.qt.io/\">Documentation</a></li>\n" \
" <li id=\"menu-item-1364\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1364\"><a href=\"http://doc.qt.io/qt-5/qtexamplesandtutorials.html\">Examples &amp; Tutorials</a></li>\n" \
" <li id=\"menu-item-1363\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1363\"><a href=\"http://doc.qt.io/qt-5/topics-app-development.html\">Tools</a></li>\n" \
- " <li id=\"menu-item-1361\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1361\"><a href=\"http://qt-project.org/wiki\">Wiki</a></li>\n" \
+ " <li id=\"menu-item-1361\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1361\"><a href=\"http://wiki.qt.io/\">Wiki</a></li>\n" \
" <li id=\"menu-item-1360\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1360\"><a href=\"http://qt-project.org/forums\">Forums</a></li>\n" \
- " <li id=\"menu-item-1362\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1362\"><a href=\"http://qt-project.org/wiki/Qt-Contribution-Guidelines\">Contribute to Qt</a></li>\n" \
+ " <li id=\"menu-item-1362\" class=\"menu-item menu-item-type-custom menu-item-object-custom menu-item-1362\"><a href=\"http://wiki.qt.io/?title=Qt_Contribution_Guidelines\">Contribute to Qt</a></li>\n" \
"</ul>\n" \
"</li>\n" \
"<li id=\"menu-item-1347\" class=\"menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-has-children menu-item-1347\"><a href=\"http://qt.io/services/\">Services</a>\n" \
diff --git a/doc/global/html-footer.qdocconf b/doc/global/html-footer.qdocconf
index 0a35e14ead..e41f6dc5c5 100644
--- a/doc/global/html-footer.qdocconf
+++ b/doc/global/html-footer.qdocconf
@@ -8,13 +8,13 @@ HTML.footer = \
"</div>\n" \
"<div class=\"footer\">\n" \
" <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2015 The Qt Company Ltd\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2015 The Qt Company Ltd.\n" \
" Documentation contributions included herein are the copyrights of\n" \
" their respective owners.<br>" \
" The documentation provided herein is licensed under the terms of the" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation" \
" License version 1.3</a> as published by the Free Software Foundation.<br>" \
- " The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd " \
+ " Qt and respective logos are trademarks of The Qt Company Ltd. " \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. </p>\n" \
"</div>\n" \
diff --git a/doc/global/html-header-online.qdocconf b/doc/global/html-header-online.qdocconf
index b33defccfe..b7fa9e1a65 100644
--- a/doc/global/html-header-online.qdocconf
+++ b/doc/global/html-header-online.qdocconf
@@ -114,7 +114,7 @@ HTML.postheader = \
"<div class=\"main-rounded\">\n" \
"<div class=\"navigationbar\">\n" \
" <ul class=\"sub-navigation\">\n" \
- " <li><a href=\"http://qt-project.org/wiki\">Wiki</a></li>\n" \
+ " <li><a href=\"http://wiki.qt.io/\">Wiki</a></li>\n" \
" <li><a href=\"http://doc.qt.io/\" class=\"active\">Documentation</a></li>\n" \
" <li><a href=\"http://qt-project.org/forums\">Forum</a></li>\n" \
" <li><a href=\"https://bugreports.qt.io/\">Bug Reports</a></li>\n" \
diff --git a/doc/global/qt-html-templates-online.qdocconf b/doc/global/qt-html-templates-online.qdocconf
index 78d0d497c8..69c399d05a 100644
--- a/doc/global/qt-html-templates-online.qdocconf
+++ b/doc/global/qt-html-templates-online.qdocconf
@@ -1,5 +1,6 @@
#include standard set of HTML header and footer.
-include(html-config.qdocconf)
+HTML.nonavigationbar = "false"
+HTML.tocdepth = 2
include(html-header-online.qdocconf)
include(html-footer-online.qdocconf)
diff --git a/doc/global/qt-module-defaults-online-commercial.qdocconf b/doc/global/qt-module-defaults-online-commercial.qdocconf
index 23b0998ccb..c5bce13609 100644
--- a/doc/global/qt-module-defaults-online-commercial.qdocconf
+++ b/doc/global/qt-module-defaults-online-commercial.qdocconf
@@ -25,5 +25,3 @@ HTML.nosubdirs = "false"
# Set navigation homepage
navigation.homepage = "Qt Documentation"
-
-sourcedirs += includes-online
diff --git a/doc/global/qt-module-defaults-online.qdocconf b/doc/global/qt-module-defaults-online.qdocconf
index 4cbd736097..3085b493fe 100644
--- a/doc/global/qt-module-defaults-online.qdocconf
+++ b/doc/global/qt-module-defaults-online.qdocconf
@@ -11,7 +11,7 @@ HTML.footer = \
" The documentation provided herein is licensed under the terms of the" \
" <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation" \
" License version 1.3</a> as published by the Free Software Foundation. " \
- " The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd " \
+ " Qt and respective logos are trademarks of The Qt Company Ltd. " \
" in Finland and/or other countries worldwide. All other trademarks are property\n" \
" of their respective owners. </p>\n"
diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css
index 3e722128f8..7fefe811d7 100644
--- a/doc/global/template/style/online.css
+++ b/doc/global/template/style/online.css
@@ -860,7 +860,7 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb
body {
font-family:“Open Sans”, Arial, Helvetica, sans-serif;
line-height:1.5;
- font-weight:300
+ font-weight:400
}
h1,h2,h3,h4,h5,h6 {
font-weight:300
@@ -959,7 +959,7 @@ a:hover {
color:#46a2da
}
.main,.navbar-header,#footerbar>div {
- max-width:1500px;
+ max-width:1280px;
width:95%;
margin:0 auto
}
@@ -1083,9 +1083,15 @@ dd {
margin-bottom:1.56em
}
.mainContent li {
- margin-bottom:0.8em;
+ margin-top:0.8em;
line-height:1.25em
}
+.mainContent li.level2 {
+ margin-left:10px;
+ margin-top:0.4em;
+ font-size:0.9375em;
+ line-height:1.15em;
+}
.mainContent p {
line-height:1.56em;
margin-bottom:1.5em;
@@ -1093,7 +1099,7 @@ dd {
max-width:85%
}
.mainContent b {
- font-weight:400
+ font-weight:600
}
.context ul {
margin-bottom:1.5em
@@ -1180,9 +1186,15 @@ li a.active {
padding:0px;
min-height:2em
}
-.context h4,.context h3,.context h2 {
+.context h2 {
font-size:2.1875em
}
+.context h3 {
+ font-size:1.75em
+}
+.context h4 {
+ font-size:1.375em
+}
.context p img {
margin-top:0.75em;
max-width:100%
@@ -1207,7 +1219,7 @@ table td,table th {
table.alignedsummary,table.propsummary {
width:initial
}
-div.main_index .row:first-child {
+div.main_index .row {
border-bottom:1px solid #eee
}
div.main_index .row {
@@ -1556,6 +1568,11 @@ input.gsc-search-button:hover {
cursor: pointer;
}
+input.gsc-search-button:focus {
+ outline: none;
+ box-shadow: none;
+}
+
.gsc-search-box-tools .gsc-clear-button {
display: none !important;
visibility: none !important;
@@ -1570,6 +1587,7 @@ input.gsc-input {
border: 1px solid #d6d6d6 !important;
border-radius: 5px !important;
box-sizing: border-box !important;
+ -moz-box-sizing: border-box !important;
color: #868482 !important;
outline: 0 none !important;
padding: 9px 10px 10px !important;
diff --git a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf
index 011fc6fe28..a546a3ae18 100644
--- a/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf
+++ b/mkspecs/devices/linux-arm-trident-pnx8473-g++/qmake.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for building with arm-linux-uclibcgnueabi-g++
#
-# http://wiki.qt-project.org/Devices/Shiner
+# http://wiki.qt.io/?title=Shiner
#
MAKEFILE_GENERATOR = UNIX
diff --git a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf
index 6537d457ab..38e4b36cdd 100644
--- a/mkspecs/devices/linux-rasp-pi-g++/qmake.conf
+++ b/mkspecs/devices/linux-rasp-pi-g++/qmake.conf
@@ -1,6 +1,6 @@
#
# qmake configuration for Broadcom's Raspberry PI
-# http://wiki.qt-project.org/Devices/RaspberryPi
+# http://wiki.qt.io/?title=RaspberryPi
include(../common/linux_device_pre.conf)
diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf
index 932b4d7fa7..dc2b28a180 100644
--- a/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf
+++ b/mkspecs/devices/linux-sh4-stmicro-ST7108-g++/qmake.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for linux-g++ using the sh4-linux-g++ crosscompiler
#
-# http://wiki.qt-project.org/Devices/ST7108
+# http://wiki.qt.io/?title=ST7108
#
MAKEFILE_GENERATOR = UNIX
diff --git a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf
index 8bf2f63b04..9c28dd52c9 100644
--- a/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf
+++ b/mkspecs/devices/linux-sh4-stmicro-ST7540-g++/qmake.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for linux-g++ using the sh4-linux-g++ crosscompiler
#
-# http://wiki.qt-project.org/Devices/ST7540
+# http://wiki.qt.io/?title=ST7540
#
MAKEFILE_GENERATOR = UNIX
diff --git a/mkspecs/devices/linux-snowball-g++/qmake.conf b/mkspecs/devices/linux-snowball-g++/qmake.conf
index ebad2bfd27..99b9dc07f5 100644
--- a/mkspecs/devices/linux-snowball-g++/qmake.conf
+++ b/mkspecs/devices/linux-snowball-g++/qmake.conf
@@ -1,6 +1,6 @@
#
# qmake configuration for ST Ericsson's Snowball
-# http://qt-project.org/wiki/Snowball
+# http://wiki.qt.io/?title=Snowball
MAKEFILE_GENERATOR = UNIX
CONFIG += incremental
diff --git a/mkspecs/features/qt_headersclean.prf b/mkspecs/features/qt_headersclean.prf
index 0650adfe5e..aae8d7c707 100644
--- a/mkspecs/features/qt_headersclean.prf
+++ b/mkspecs/features/qt_headersclean.prf
@@ -7,7 +7,7 @@
*-g++*: QMAKE_CXXFLAGS += -W -Wall -Wextra -Werror
-# The flags here come from http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
+# The flags here come from http://wiki.qt.io/?title=Coding_Conventions#Conventions_for_public_header_files
# -Wold-style-cast cannot be used, /usr/include/bits/byteswap.h defines the macro bswap_16 using C style casts :(
# -Wfloat-equal cannot be used, qrect.h and qvector2d.h do exact comparisons in isNull and operator==. Would need #pragmas.
*-g++*: QMAKE_CXXFLAGS += -Woverloaded-virtual -Wshadow -Wundef
diff --git a/mkspecs/modules/README b/mkspecs/modules/README
index 198bd868e0..9ce22005d3 100644
--- a/mkspecs/modules/README
+++ b/mkspecs/modules/README
@@ -1,3 +1,3 @@
Qt modules need to drop a qmake file here to become part of the current
Qt configuration. The file format is documented in
-http://wiki.qt-project.org/Creating_a_new_module_or_tool_for_Qt#The_qt_.3Cmodule.3E.pri_files
+http://wiki.qt.io/?title=Creating_a_new_module_or_tool_for_Qt#The_qt_.3Cmodule.3E.pri_files
diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp
index c0c1d6d906..9defa3d015 100644
--- a/src/corelib/codecs/qsimplecodec.cpp
+++ b/src/corelib/codecs/qsimplecodec.cpp
@@ -507,7 +507,7 @@ static const struct {
0x0111, 0x00F1, 0x0323, 0x00F3, 0x00F4, 0x01A1, 0x00F6, 0x00F7,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x01B0, 0x20AB, 0x00FF} },
- { "macintosh", { "Apple Roman", "MacRoman", 0 }, -168,
+ { "macintosh", { "Apple Roman", "MacRoman", 0 }, 2027,
{ 0x00C4, 0x00C5, 0x00C7, 0x00C9, 0x00D1, 0x00D6, 0x00DC, 0x00E1,
0x00E0, 0x00E2, 0x00E4, 0x00E3, 0x00E5, 0x00E7, 0x00E9, 0x00E8,
0x00EA, 0x00EB, 0x00ED, 0x00EC, 0x00EE, 0x00EF, 0x00F1, 0x00F3,
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
index d9cda29e66..322fc2f651 100644
--- a/src/corelib/global/qlibraryinfo.cpp
+++ b/src/corelib/global/qlibraryinfo.cpp
@@ -457,8 +457,10 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
defaultValue = QLatin1String(qtConfEntries[loc].value);
}
#ifndef Q_OS_WIN // On Windows we use the registry
- else if (loc == SettingsPath)
+ else if (loc == SettingsPath) {
key = QLatin1String("Settings");
+ defaultValue = QLatin1String(".");
+ }
#endif
if(!key.isNull()) {
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index a1a00016fd..5b18a85dd4 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -544,7 +544,7 @@ bool QFSFileEngine::renameOverwrite(const QString &newName)
bool ret = ::DeleteAndRenameFile((wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16(),
(wchar_t*)d->fileEntry.nativeFilePath().utf16()) != 0;
if (!ret) {
- ret = ::DeleteFile((wchar_t*)d->fileEntry.nativeFilePath().utf16()) != 0;
+ ret = ::DeleteFile((wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16()) != 0;
if (ret)
ret = ::MoveFile((wchar_t*)d->fileEntry.nativeFilePath().utf16(),
(wchar_t*)QFileSystemEntry(newName).nativeFilePath().utf16()) != 0;
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index e6f86fceaa..e33ab24243 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4596,7 +4596,7 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla
return true;
// No in-place conversion if we have to detach
- if (ref.load() > 1)
+ if (ref.load() > 1 || ro_data)
return false;
const InPlace_Image_Converter *const converterPtr = &qimage_inplace_converter_map[format][newFormat];
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index a00dac61fb..3a86a454ac 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -1115,6 +1115,13 @@ void QTextDocumentLayoutPrivate::drawTableCell(const QRectF &cellRect, QPainter
const QFixed leftPadding = td->leftPadding(fmt);
const QFixed topPadding = td->topPadding(fmt);
+ qreal topMargin = (td->effectiveTopMargin + td->cellSpacing + td->border).toReal();
+ qreal bottomMargin = (td->effectiveBottomMargin + td->cellSpacing + td->border).toReal();
+
+ const int headerRowCount = qMin(table->format().headerRowCount(), table->rows() - 1);
+ if (r >= headerRowCount)
+ topMargin += td->headerHeight.toReal();
+
if (td->border != 0) {
const QBrush oldBrush = painter->brush();
const QPen oldPen = painter->pen();
@@ -1142,13 +1149,6 @@ void QTextDocumentLayoutPrivate::drawTableCell(const QRectF &cellRect, QPainter
break;
}
- qreal topMargin = (td->effectiveTopMargin + td->cellSpacing + td->border).toReal();
- qreal bottomMargin = (td->effectiveBottomMargin + td->cellSpacing + td->border).toReal();
-
- const int headerRowCount = qMin(table->format().headerRowCount(), table->rows() - 1);
- if (r >= headerRowCount)
- topMargin += td->headerHeight.toReal();
-
drawBorder(painter, borderRect, topMargin, bottomMargin,
border, table->format().borderBrush(), cellBorder);
@@ -1159,7 +1159,30 @@ void QTextDocumentLayoutPrivate::drawTableCell(const QRectF &cellRect, QPainter
const QBrush bg = cell.format().background();
const QPointF brushOrigin = painter->brushOrigin();
if (bg.style() != Qt::NoBrush) {
- fillBackground(painter, cellRect, bg, cellRect.topLeft());
+ const qreal pageHeight = document->pageSize().height();
+ const int topPage = pageHeight > 0 ? static_cast<int>(cellRect.top() / pageHeight) : 0;
+ const int bottomPage = pageHeight > 0 ? static_cast<int>((cellRect.bottom()) / pageHeight) : 0;
+
+ if (topPage == bottomPage)
+ fillBackground(painter, cellRect, bg, cellRect.topLeft());
+ else {
+ for (int i = topPage; i <= bottomPage; ++i) {
+ QRectF clipped = cellRect.toRect();
+
+ if (topPage != bottomPage) {
+ const qreal top = qMax(i * pageHeight + topMargin, cell_context.clip.top());
+ const qreal bottom = qMin((i + 1) * pageHeight - bottomMargin, cell_context.clip.bottom());
+
+ clipped.setTop(qMax(clipped.top(), top));
+ clipped.setBottom(qMin(clipped.bottom(), bottom));
+
+ if (clipped.bottom() <= clipped.top())
+ continue;
+
+ fillBackground(painter, clipped, bg, cellRect.topLeft());
+ }
+ }
+ }
if (bg.style() > Qt::SolidPattern)
painter->setBrushOrigin(cellRect.topLeft());
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
index 56adae8ffb..287ee4c46e 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp
@@ -836,7 +836,8 @@ error:
static bool addFontToDatabase(const QString &familyName, uchar charSet,
const TEXTMETRIC *textmetric,
const FONTSIGNATURE *signature,
- int type)
+ int type,
+ bool registerAlias)
{
// the "@family" fonts are just the same as "family". Ignore them.
if (familyName.isEmpty() || familyName.at(0) == QLatin1Char('@') || familyName.startsWith(QLatin1String("WST_")))
@@ -873,7 +874,7 @@ static bool addFontToDatabase(const QString &familyName, uchar charSet,
#endif
QString englishName;
- if (ttf && localizedName(familyName))
+ if (registerAlias && ttf && localizedName(familyName))
englishName = getEnglishName(familyName);
QSupportedWritingSystems writingSystems;
@@ -942,7 +943,7 @@ static int QT_WIN_CALLBACK storeFont(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *textmetr
// NEWTEXTMETRICEX is a NEWTEXTMETRIC, which according to the documentation is
// identical to a TEXTMETRIC except for the last four members, which we don't use
// anyway
- addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type);
+ addFontToDatabase(familyName, charSet, (TEXTMETRIC *)textmetric, &signature, type, false);
// keep on enumerating
return 1;
@@ -977,7 +978,7 @@ struct PopulateFamiliesContext
};
} // namespace
-static int QT_WIN_CALLBACK populateFontFamilies(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *, int, LPARAM lparam)
+static int QT_WIN_CALLBACK populateFontFamilies(ENUMLOGFONTEX* f, NEWTEXTMETRICEX *tm, int, LPARAM lparam)
{
// the "@family" fonts are just the same as "family". Ignore them.
const wchar_t *faceNameW = f->elfLogFont.lfFaceName;
@@ -987,6 +988,19 @@ static int QT_WIN_CALLBACK populateFontFamilies(ENUMLOGFONTEX* f, NEWTEXTMETRICE
PopulateFamiliesContext *context = reinterpret_cast<PopulateFamiliesContext *>(lparam);
if (!context->seenSystemDefaultFont && faceName == context->systemDefaultFont)
context->seenSystemDefaultFont = true;
+
+ // Register current font's english name as alias
+ const bool ttf = (tm->ntmTm.tmPitchAndFamily & TMPF_TRUETYPE);
+ if (ttf && localizedName(faceName)) {
+ const QString englishName = getEnglishName(faceName);
+ if (!englishName.isEmpty()) {
+ QPlatformFontDatabase::registerAliasToFontFamily(faceName, englishName);
+ // Check whether the system default font name is an alias of the current font family name,
+ // as on Chinese Windows, where the system font "SimSun" is an alias to a font registered under a local name
+ if (!context->seenSystemDefaultFont && englishName == context->systemDefaultFont)
+ context->seenSystemDefaultFont = true;
+ }
+ }
}
return 1; // continue
}
@@ -1344,7 +1358,7 @@ QStringList QWindowsFontDatabase::addApplicationFont(const QByteArray &fontData,
GetTextMetrics(hdc, &textMetrics);
addFontToDatabase(familyName, lf.lfCharSet, &textMetrics, &signatures.at(j),
- TRUETYPE_FONTTYPE);
+ TRUETYPE_FONTTYPE, true);
SelectObject(hdc, oldobj);
DeleteObject(hfont);
diff --git a/src/widgets/doc/src/modelview.qdoc b/src/widgets/doc/src/modelview.qdoc
index 153b94bbdd..e3a569e8ac 100644
--- a/src/widgets/doc/src/modelview.qdoc
+++ b/src/widgets/doc/src/modelview.qdoc
@@ -576,7 +576,7 @@
problem.
Qt Labs provides software called
- \l{http://qt-project.org/wiki/Model_Test}{ModelTest},
+ \l{http://wiki.qt.io/?title=Model_Test}{ModelTest},
which checks models while your programming is running. Every time the model
is changed, ModelTest scans the model and reports errors with an assert.
This is especially important for tree models, since their hierarchical
diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
index e7a022bdec..e969724117 100644
--- a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
+++ b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp
@@ -109,14 +109,11 @@ void tst_QMimeDatabase::initTestCase()
if (m_testSuite.isEmpty())
qWarning("%s", qPrintable(testSuiteWarning()));
+ const QString errorMessage = QString::fromLatin1("Cannot find '%1'");
m_yastMimeTypes = QLatin1String(RESOURCE_PREFIX) + yastFileName;
- QVERIFY2(!m_yastMimeTypes.isEmpty(),
- qPrintable(QString::fromLatin1("Cannot find '%1' starting from '%2'").
- arg(yastFileName, QDir::currentPath())));
+ QVERIFY2(QFile::exists(m_yastMimeTypes), qPrintable(errorMessage.arg(yastFileName)));
m_qmlAgainFileName = QLatin1String(RESOURCE_PREFIX) + qmlAgainFileName;
- QVERIFY2(!m_qmlAgainFileName.isEmpty(),
- qPrintable(QString::fromLatin1("Cannot find '%1' starting from '%2'").
- arg(qmlAgainFileName, QDir::currentPath())));
+ QVERIFY2(QFile::exists(m_qmlAgainFileName), qPrintable(errorMessage.arg(qmlAgainFileName)));
init();
}
diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp
index 0ab483222d..7d2d009213 100644
--- a/tests/auto/gui/image/qimage/tst_qimage.cpp
+++ b/tests/auto/gui/image/qimage/tst_qimage.cpp
@@ -2507,6 +2507,19 @@ void tst_QImage::inplaceConversion()
}
if (image.depth() == imageConverted.depth())
QCOMPARE(imageConverted.constScanLine(0), originalPtr);
+
+ {
+ // Test attempted inplace conversion of images created on existing, readonly buffer
+ static const quint32 readOnlyData[] = { 0x00010203U, 0x04050607U, 0x08091011U, 0x12131415U };
+
+ QImage roImage((const uchar *)readOnlyData, 2, 2, format);
+ QImage inplaceConverted = std::move(roImage).convertToFormat(dest_format);
+
+ QImage roImage2((const uchar *)readOnlyData, 2, 2, format);
+ QImage normalConverted = roImage2.convertToFormat(dest_format);
+
+ QCOMPARE(normalConverted, inplaceConverted);
+ }
#endif
}
diff --git a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
index 0ee066be63..c8d3122e6d 100644
--- a/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
+++ b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp
@@ -44,6 +44,11 @@
#ifndef QT_NO_WIDGETS
#include <qtextedit.h>
#endif
+#ifndef QT_NO_PRINTER
+#include <QPagedPaintDevice>
+#include <QPainter>
+#include <QPaintEngine>
+#endif
typedef QList<int> IntList;
@@ -96,6 +101,9 @@ private slots:
void QTBUG11282_insertBeforeMergedEnding();
#endif
void QTBUG22011_insertBeforeRowSpan();
+#ifndef QT_NO_PRINTER
+ void QTBUG31330_renderBackground();
+#endif
private:
QTextTable *create2x2Table();
@@ -1024,5 +1032,112 @@ void tst_QTextTable::QTBUG22011_insertBeforeRowSpan()
QCOMPARE(table->columns(), 6);
}
+#ifndef QT_NO_PRINTER
+namespace {
+class QTBUG31330_PaintDevice : public QPagedPaintDevice
+{
+public:
+ class PaintEngine : public QPaintEngine
+ {
+ public:
+ QList<QRectF> rects;
+
+ PaintEngine()
+ : QPaintEngine(0)
+ {}
+ virtual Type type() const
+ {
+ return User;
+ }
+ virtual bool begin(QPaintDevice *)
+ {
+ return true;
+ }
+ virtual bool end()
+ {
+ return true;
+ }
+ virtual void updateState(const QPaintEngineState &)
+ {}
+ virtual void drawRects(const QRect *, int)
+ {}
+ virtual void drawRects(const QRectF *r, int)
+ {
+ if (painter()->brush() == QBrush(Qt::green))
+ {
+ rects.append(*r);
+ }
+ }
+ virtual void drawPixmap(const QRectF &, const QPixmap &, const QRectF &)
+ {}
+ };
+
+ int pages;
+ QPaintEngine* engine;
+
+ QTBUG31330_PaintDevice(QPaintEngine* engine)
+ : pages(1), engine(engine)
+ {
+ QPageLayout layout = pageLayout();
+ layout.setUnits(QPageLayout::Point);
+ setPageLayout(layout);
+ }
+ virtual int metric(PaintDeviceMetric metric) const
+ {
+ if (PdmDevicePixelRatio == metric)
+ return 1;
+ if (PdmDpiY == metric)
+ return 96;
+ if (PdmDpiX == metric)
+ return 96;
+ if (PdmHeight == metric)
+ return 1000;
+ if (PdmWidth == metric)
+ return 700;
+ return 900;
+ }
+ virtual QPaintEngine *paintEngine() const
+ {
+ return engine;
+ }
+ bool newPage()
+ {
+ ++pages;
+ return true;
+ }
+};
+}
+
+void tst_QTextTable::QTBUG31330_renderBackground()
+{
+ QTextDocument doc;
+ QTextCursor cursor(&doc);
+ QTextTable* table = cursor.insertTable(4, 2);
+
+ QTextTableCell cell = table->cellAt(3, 0);
+
+ QTextCharFormat cellFormat = cell.format();
+ cellFormat.setBackground(QBrush(Qt::green));
+ cell.setFormat(cellFormat);
+
+ QTextCursor tc = cell.firstCursorPosition();
+ for (int i = 0; i < 60; ++i) {
+ tc.insertBlock();
+ }
+ QTBUG31330_PaintDevice::PaintEngine engine;
+ QTBUG31330_PaintDevice paintDevice(&engine);
+ paintDevice.setPageSize(QPagedPaintDevice::A4);
+ doc.print(&paintDevice);
+
+ QVERIFY(paintDevice.pages >= 2);
+ QCOMPARE(engine.rects.count(), paintDevice.pages);
+ for (int i = 0; i < engine.rects.count(); ++i) {
+ QRectF rect = engine.rects[i];
+ QVERIFY(rect.top() > 0);
+ QVERIFY(rect.bottom() < 1000);
+ }
+}
+#endif
+
QTEST_MAIN(tst_QTextTable)
#include "tst_qtexttable.moc"
diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp
index ee7138f001..e13c80c719 100644
--- a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp
+++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp
@@ -67,8 +67,8 @@ private slots:
void tst_QDnsLookup::initTestCase()
{
QTest::addColumn<QString>("tld");
- QTest::newRow("normal") << ".test.qt-project.org";
- QTest::newRow("idn") << ".alqualond\xc3\xab.test.qt-project.org";
+ QTest::newRow("normal") << ".test.macieira.org";
+ QTest::newRow("idn") << ".alqualond\xc3\xab.test.macieira.org";
}
QString tst_QDnsLookup::domainName(const QString &input)
@@ -145,8 +145,8 @@ void tst_QDnsLookup::lookup_data()
QTest::newRow("ns-empty") << int(QDnsLookup::NS) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << "";
QTest::newRow("ns-notfound") << int(QDnsLookup::NS) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << "";
- QTest::newRow("ns-single") << int(QDnsLookup::NS) << "ns-single" << int(QDnsLookup::NoError) << "" << "" << "" << "ns-foo.linpro.net." << "" << "" << "";
- QTest::newRow("ns-multi") << int(QDnsLookup::NS) << "ns-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "ns-bar.linpro.net.;ns-foo.linpro.net." << "" << "" << "";
+ QTest::newRow("ns-single") << int(QDnsLookup::NS) << "ns-single" << int(QDnsLookup::NoError) << "" << "" << "" << "ns3.macieira.info." << "" << "" << "";
+ QTest::newRow("ns-multi") << int(QDnsLookup::NS) << "ns-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "gondolin.macieira.info.;ns3.macieira.info." << "" << "" << "";
QTest::newRow("ptr-empty") << int(QDnsLookup::PTR) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << "";
QTest::newRow("ptr-notfound") << int(QDnsLookup::PTR) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << "";
diff --git a/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp b/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp
index 2ca6e7b6f3..8b9a13023c 100644
--- a/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp
+++ b/tests/auto/network/kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp
@@ -48,7 +48,7 @@ private slots:
void tst_QDnsLookup_Appless::noApplication()
{
QTest::ignoreMessage(QtWarningMsg, "QDnsLookup requires a QCoreApplication");
- QDnsLookup dns(QDnsLookup::A, "a-single.test.qt-project.org");
+ QDnsLookup dns(QDnsLookup::A, "a-single.test.macieira.org");
dns.lookup();
}
@@ -58,7 +58,7 @@ void tst_QDnsLookup_Appless::recreateApplication()
char **argv = 0;
for (int i = 0; i < 10; ++i) {
QCoreApplication app(argc, argv);
- QDnsLookup dns(QDnsLookup::A, "a-single.test.qt-project.org");
+ QDnsLookup dns(QDnsLookup::A, "a-single.test.macieira.org");
dns.lookup();
if (!dns.isFinished()) {
QObject::connect(&dns, SIGNAL(finished()),
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index c63a8336fb..9762e8244c 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -85,7 +85,7 @@
#include "../../../network-settings.h"
-#define TEST_DOMAIN ".test.qt-project.org"
+#define TEST_DOMAIN ".test.macieira.org"
class tst_QHostInfo : public QObject