From 85712bae5b4ef8f43c697883130f189f20c8b8ea Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 6 Feb 2015 11:51:57 +0100 Subject: [PATCH 01/13] Autotest: fix existence check after c8c68ec. The files were moved to a qrc resource, so the string is never empty, we need to use QFile::exists to make sure they exist. And the error message was wrong, pointing to current dir. Change-Id: I532bda9f6221fb5c69b779b8b48baac9ede90eba Reviewed-by: Rainer Keller --- .../mimetypes/qmimedatabase/tst_qmimedatabase.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp b/tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp index 686e25c800..1513a75148 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(); } From 53e2db74dba8135bd88bad48fbf9f2fc81ed4f8b Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sun, 15 Feb 2015 22:58:07 +0100 Subject: [PATCH 02/13] configure: fix gold linker support detection While the -fuse-ld=gold flag is related to linking, it is an argument to the compiler driver to tell it what linker to execute, NOT an option to tell the linker to behave differently. So it shouldn't get prefixed with -Wl when passed though the compiler driver. Change-Id: I2b50cb6d2bd8911aa9b305cd8e755d4dfe923041 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 043d9fc0d6..987d7f0f55 100755 --- a/configure +++ b/configure @@ -3263,7 +3263,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 From a59028d6e98bcf5a13c9103753e5e83c362c63bc Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Thu, 19 Feb 2015 22:41:02 +0100 Subject: [PATCH 03/13] configure: add '-psql_config' option Allow setting of pg_config path for cross compilation where pg_config is not in the command search path (do the same as for mysql_config). This is e.g. used for buildroot (see [1] for details). [1] http://lists.busybox.net/pipermail/buildroot/2015-February/119714.html Change-Id: I11d084496ffbb6f8bc350dbcf2971a5be8e3b346 Reviewed-by: Oswald Buddenhagen --- configure | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 987d7f0f55..6ce6753e3f 100755 --- a/configure +++ b/configure @@ -578,6 +578,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 @@ -885,6 +886,7 @@ while [ "$#" -gt 0 ]; do -arch| \ -host-arch| \ -mysql_config| \ + -psql_config| \ -qpa| \ -qconfig| \ -qreal| \ @@ -1066,6 +1068,9 @@ while [ "$#" -gt 0 ]; do mysql_config) CFG_MYSQL_CONFIG="$VAL" ;; + psql_config) + CFG_PSQL_CONFIG="$VAL" + ;; prefix) QT_INSTALL_PREFIX="$VAL" ;; @@ -4386,10 +4391,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" From a659b4e56be9721389d28e212b4f4bcd393e6410 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 25 Feb 2015 12:14:52 +0100 Subject: [PATCH 04/13] fix default of SettingsPath when qt.conf is present it's documented to fall back to Prefix if qt.conf is present but Settings is not specified. Task-number: QTBUG-44644 Change-Id: I8ef6659cbdad51b2fb3c1075ea6f0af4997117ed Reviewed-by: Thiago Macieira --- src/corelib/global/qlibraryinfo.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index d592032c1f..d66007b2b6 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -441,8 +441,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()) { From 68762151dbf45fbb44e140ac2ad13dbe8d357352 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Wed, 25 Feb 2015 15:39:41 +0100 Subject: [PATCH 05/13] Fix crash when converting format of QImage created from buffer When doing format conversion, the optimized inplace codepath did not check if the image data was readonly, i.e. if the QImage had been created by the constructor taking an existing external buffer. Task-number: QTBUG-44610 Change-Id: I085ff8da427bc4ee392f548dffd2418b63148965 Reviewed-by: Allan Sandfeld Jensen --- src/gui/image/qimage.cpp | 2 +- tests/auto/gui/image/qimage/tst_qimage.cpp | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 887a7c29eb..6699e516a0 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4565,7 +4565,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/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index ed1d915670..e8da3263ae 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -2492,6 +2492,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 } From 04e313d7084e3704649e81fc89436f79d09a810e Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 14 Jan 2015 10:04:53 +0100 Subject: [PATCH 06/13] Doc: Update Copyright information in template/footer This change updates the copyright information as it appears in the footer for both offline and online documentation templates. - Update copyright year to 2015 - Update copyright holder to The Qt Company Ltd Change-Id: I82fef6067dee42ec9db561aef9c3c506beafb3c6 Reviewed-by: Venugopal Shivashankar --- doc/global/html-footer.qdocconf | 6 +++--- doc/global/qt-module-defaults-online.qdocconf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/global/html-footer.qdocconf b/doc/global/html-footer.qdocconf index 217494575f..e41f6dc5c5 100644 --- a/doc/global/html-footer.qdocconf +++ b/doc/global/html-footer.qdocconf @@ -8,13 +8,13 @@ HTML.footer = \ "\n" \ "
\n" \ "

\n" \ - " © 2015 Digia Plc and/or its\n" \ - " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ + " © 2015 The Qt Company Ltd.\n" \ + " Documentation contributions included herein are the copyrights of\n" \ " their respective owners.
" \ " The documentation provided herein is licensed under the terms of the" \ " GNU Free Documentation" \ " License version 1.3 as published by the Free Software Foundation.
" \ - " Digia, Qt and their respective logos are trademarks of Digia Plc " \ + " 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.

\n" \ "
\n" \ diff --git a/doc/global/qt-module-defaults-online.qdocconf b/doc/global/qt-module-defaults-online.qdocconf index 6e6854ff82..3085b493fe 100644 --- a/doc/global/qt-module-defaults-online.qdocconf +++ b/doc/global/qt-module-defaults-online.qdocconf @@ -5,13 +5,13 @@ HTML.footer = \ " \n" \ "

\n" \ - " © 2015 Digia Plc and/or its\n" \ - " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ + " © 2015 The Qt Company Ltd.\n" \ + " Documentation contributions included herein are the copyrights of\n" \ " their respective owners. " \ " The documentation provided herein is licensed under the terms of the" \ " GNU Free Documentation" \ " License version 1.3 as published by the Free Software Foundation. " \ - " Digia, Qt and their respective logos are trademarks of Digia Plc " \ + " 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.

\n" From ba5f93956bfb218a46ad36d7c4f7660f62a38417 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 14 Jan 2015 10:03:51 +0100 Subject: [PATCH 07/13] Doc: Update online documentation template - Online CSS tweaks: Max-width, font-sizes, font-weights to improve readability, other minor fixes - Remove duplicate include statement and unnecessary definitions for online template Change-Id: I713bddd0e175235668c4d9790d0df58b4131d19f Reviewed-by: Martin Smith --- doc/global/qt-html-templates-online.qdocconf | 3 +- ...module-defaults-online-commercial.qdocconf | 2 -- doc/global/template/style/online.css | 30 +++++++++++++++---- 3 files changed, 26 insertions(+), 9 deletions(-) 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/template/style/online.css b/doc/global/template/style/online.css index d558137e2e..97498f16d7 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; From 4054f8a5ad9388143041fe8c43ee7abaaf7b78fa Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 25 Feb 2015 22:06:07 +0100 Subject: [PATCH 08/13] Specific the correct mibEnum value for the 'macintosh' codec Change-Id: Ib57dd3c98a2ae3994898d7ea40baa0fed482c99a Reviewed-by: Lars Knoll --- src/corelib/codecs/qsimplecodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/codecs/qsimplecodec.cpp b/src/corelib/codecs/qsimplecodec.cpp index aa8ba2802a..8a4ff66731 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, From a782369071db1d89448c0b94248d31fa877bcf8c Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 25 Feb 2015 20:43:12 +0100 Subject: [PATCH 09/13] Delete the file that we will move to not the new file before moving In the case of Windows Embedded Compact we need to delete the destination file before doing the move if DeleteAndRenameFile has failed since MoveFile will fail if the destination file exists. Change-Id: I29d04c147bf8b6b5de850fd7da7bb3dc6a827f1d Reviewed-by: Oswald Buddenhagen --- src/corelib/io/qfsfileengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index a1ab8fc0f8..ea2b1bbc63 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; From e78643dc0a9e276480afa5de98006c4979fb0125 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Thu, 26 Feb 2015 16:42:10 +0100 Subject: [PATCH 10/13] Replace old qt-project.org wiki with wiki.qt.io Change-Id: If6c05a5b1f60e97c64f3d6b64041a84c3af82964 Reviewed-by: Oswald Buddenhagen --- dist/README | 4 ++-- doc/README | 2 +- doc/global/externalsites/qt-webpages.qdoc | 12 ++++++------ doc/global/html-footer-online.qdocconf | 4 ++-- doc/global/html-header-online.qdocconf | 2 +- .../devices/linux-arm-trident-pnx8473-g++/qmake.conf | 2 +- mkspecs/devices/linux-rasp-pi-g++/qmake.conf | 2 +- .../devices/linux-sh4-stmicro-ST7108-g++/qmake.conf | 2 +- .../devices/linux-sh4-stmicro-ST7540-g++/qmake.conf | 2 +- mkspecs/devices/linux-snowball-g++/qmake.conf | 2 +- mkspecs/features/qt_headersclean.prf | 2 +- mkspecs/modules/README | 2 +- src/widgets/doc/src/modelview.qdoc | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) 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 //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 bc8569f7bd..ec704cec62 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 += \ "
  • Documentation
  • \n" \ "
  • Examples & Tutorials
  • \n" \ "
  • Tools
  • \n" \ - "
  • Wiki
  • \n" \ + "
  • Wiki
  • \n" \ "
  • Forums
  • \n" \ - "
  • Contribute to Qt
  • \n" \ + "
  • Contribute to Qt
  • \n" \ "\n" \ "\n" \ "
  • Services\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 = \ "
    \n" \ "
    \n" \ "
      \n" \ - "
    • Wiki
    • \n" \ + "
    • Wiki
    • \n" \ "
    • Documentation
    • \n" \ "
    • Forum
    • \n" \ "
    • Bug Reports
    • \n" \ 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/widgets/doc/src/modelview.qdoc b/src/widgets/doc/src/modelview.qdoc index 3b33e21ec2..31a24204fe 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 From 5f2f38854f20e04dbd8ae25ed0b346b85450e116 Mon Sep 17 00:00:00 2001 From: Liang Jian Date: Wed, 25 Feb 2015 15:47:07 +0800 Subject: [PATCH 11/13] Register font's english name as alias when populating font database Register font's english name as alias in the callback of EnumFontFamiliesEx() at the time QWindowsFontDatabase::populateFontDatabase() is being called. This will help us to resolve english font family name to its corresponding localized alias once windows font database has been populated. It will also fix an assertion in Chinese Windows. Task-number: QTBUG-44647 Change-Id: I265d93c16a1677a7f31ff56d60c24f6e90666419 Reviewed-by: Konstantin Ritt Reviewed-by: Friedemann Kleint Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../windows/qwindowsfontdatabase.cpp | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 9c26a227b8..9d5abf0df1 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -850,7 +850,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_"))) @@ -887,7 +888,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; @@ -956,7 +957,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; @@ -991,7 +992,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; @@ -1001,6 +1002,19 @@ static int QT_WIN_CALLBACK populateFontFamilies(ENUMLOGFONTEX* f, NEWTEXTMETRICE PopulateFamiliesContext *context = reinterpret_cast(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 } @@ -1358,7 +1372,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); From f9c70128bbb45ea4b206920dda7c330afa74916a Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 27 Feb 2015 09:39:01 -0800 Subject: [PATCH 12/13] Revert "Update the DNS and name-resolver tests to the official zone" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 24c52bd44b700725d4feec0d2e05a7e382e59c4e and makes the Qt unit tests requiring DNS zones to use the temporary test zone in macieira.org (Thiago's domain). Change-Id: Ia0aac2f09e9245339951ffff13c6d3752c83b773 Reviewed-by: Jani Heikkinen Reviewed-by: Tony Sarajärvi --- tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp | 8 ++++---- .../kernel/qdnslookup_appless/tst_qdnslookup_appless.cpp | 4 ++-- tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp index e7f30f8940..fd1e8a1267 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("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 011421b7e1..b1e0f69946 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 a1faacfd69..416981d843 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 From fc3733cba4652f2b8930c66665103fcb20874735 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Tue, 18 Nov 2014 14:58:34 +0200 Subject: [PATCH 13/13] Fix drawing of background for multipage QTextTable cells Task-number: QTBUG-31330 Change-Id: I0103919ee2864b7cd8bed41e6d6fe4ac5b84142e Reviewed-by: Lars Knoll --- src/gui/text/qtextdocumentlayout.cpp | 39 ++++-- .../gui/text/qtexttable/tst_qtexttable.cpp | 115 ++++++++++++++++++ 2 files changed, 146 insertions(+), 8 deletions(-) diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 163d51aec2..1ddc9141af 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(cellRect.top() / pageHeight) : 0; + const int bottomPage = pageHeight > 0 ? static_cast((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/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp b/tests/auto/gui/text/qtexttable/tst_qtexttable.cpp index 9cc092d8ab..e542e8f3f7 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 #endif +#ifndef QT_NO_PRINTER +#include +#include +#include +#endif typedef QList 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 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"