From f5f00e69a0ae1287efd7c02abcabdfcaec5b0dcb Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 17 Feb 2014 09:45:24 +0100 Subject: [PATCH 1/9] tst_qfont: Fix small typo Change-Id: I7e007202b0cc80a1808831ebcf46ae7ec0866828 Reviewed-by: Jerome Pasion --- tests/auto/gui/text/qfont/tst_qfont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp index aa5fa10a338..a23579e6a55 100644 --- a/tests/auto/gui/text/qfont/tst_qfont.cpp +++ b/tests/auto/gui/text/qfont/tst_qfont.cpp @@ -646,7 +646,7 @@ QString getPlatformGenericFont(const char* genericName) static inline QByteArray msgNotAcceptableFont(const QString &defaultFamily, const QStringList &acceptableFamilies) { - QString res = QString::fromLatin1("Font family '%1' is not one of the following accaptable results: ").arg(defaultFamily); + QString res = QString::fromLatin1("Font family '%1' is not one of the following acceptable results: ").arg(defaultFamily); Q_FOREACH (const QString &family, acceptableFamilies) res += QString::fromLatin1("\n %1").arg(family); return res.toLocal8Bit(); From 8958611fa77b6ac5a78021ebc0c7bba38125945f Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 12 Feb 2014 20:08:56 +0100 Subject: [PATCH 2/9] doc: fix grammar Change-Id: Ic2e5fd40e3d3bd7b42d5fd6492286770ffe244f3 Reviewed-by: Jerome Pasion --- src/corelib/tools/qstring.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 2c505ef033b..d22d808a126 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3402,7 +3402,7 @@ bool QString::contains(const QRegularExpression &re) const If the match is successful and \a match is not a null pointer, it also writes the results of the match into the QRegularExpressionMatch object - pointed by \a match. + pointed to by \a match. \sa QRegularExpression::match() */ From ba56beaea41620647c15a9f6b79cd7756c46698a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 10 Feb 2014 10:01:43 +0100 Subject: [PATCH 3/9] Docs: properly tag QtAlgorithms functions as deprecated Turns out that \obsolete means "Qt3Support", while the correct tag is \deprecated. Change-Id: Id9896893f3078a0d516bd8751bce0b2df441509d Reviewed-by: Jerome Pasion --- src/corelib/tools/qalgorithms.qdoc | 54 +++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 8feb180248c..2551233aec2 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -230,7 +230,7 @@ /*! \fn OutputIterator qCopy(InputIterator begin1, InputIterator end1, OutputIterator begin2) \relates - \obsolete + \deprecated Use std::copy instead. @@ -249,7 +249,7 @@ /*! \fn BiIterator2 qCopyBackward(BiIterator1 begin1, BiIterator1 end1, BiIterator2 end2) \relates - \obsolete + \deprecated Use std::copy_backward instead. @@ -268,7 +268,7 @@ /*! \fn bool qEqual(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2) \relates - \obsolete + \deprecated Use std::equal instead. @@ -287,7 +287,7 @@ /*! \fn void qFill(ForwardIterator begin, ForwardIterator end, const T &value) \relates - \obsolete + \deprecated Use std::fill instead. @@ -301,7 +301,7 @@ /*! \fn void qFill(Container &container, const T &value) \relates - \obsolete + \deprecated \overload Use std::fill instead. @@ -311,7 +311,7 @@ /*! \fn InputIterator qFind(InputIterator begin, InputIterator end, const T &value) \relates - \obsolete + \deprecated Use std::find instead. @@ -334,7 +334,7 @@ /*! \fn void qFind(const Container &container, const T &value) \relates - \obsolete + \deprecated \overload Use std::find instead. @@ -344,7 +344,7 @@ /*! \fn void qCount(InputIterator begin, InputIterator end, const T &value, Size &n) \relates - \obsolete + \deprecated Use std::count instead. @@ -364,7 +364,7 @@ /*! \fn void qCount(const Container &container, const T &value, Size &n) \relates - \obsolete + \deprecated \overload Use std::count instead. @@ -376,7 +376,7 @@ /*! \fn void qSwap(T &var1, T &var2) \relates - \obsolete + \deprecated Use std::swap instead. @@ -388,7 +388,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end) \relates - \obsolete + \deprecated Use std::sort instead. @@ -413,7 +413,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates - \obsolete + \deprecated \overload Use std::sort instead. @@ -449,7 +449,7 @@ /*! \fn void qSort(Container &container) \relates - \obsolete + \deprecated \overload Use std::sort instead. @@ -460,7 +460,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end) \relates - \obsolete + \deprecated Use std::stable_sort instead. @@ -487,7 +487,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -519,7 +519,7 @@ /*! \fn void qStableSort(Container &container) \relates - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -529,7 +529,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates - \obsolete + \deprecated Use std::lower_bound instead. @@ -558,7 +558,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -573,7 +573,7 @@ /*! \fn void qLowerBound(const Container &container, const T &value) \relates - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -586,7 +586,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates - \obsolete + \deprecated Use std::upper_bound instead. @@ -615,7 +615,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -630,7 +630,7 @@ /*! \fn void qUpperBound(const Container &container, const T &value) \relates - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -641,7 +641,7 @@ /*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates - \obsolete + \deprecated Use std::binary_search or std::lower_bound instead. @@ -667,7 +667,7 @@ /*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates - \obsolete + \deprecated \overload Use std::binary_search or std::lower_bound instead. @@ -682,7 +682,7 @@ /*! \fn void qBinaryFind(const Container &container, const T &value) \relates - \obsolete + \deprecated \overload Use std::binary_search or std::lower_bound instead. @@ -725,7 +725,7 @@ /*! \fn LessThan qLess() \relates - \obsolete + \deprecated Use std::less instead. @@ -741,7 +741,7 @@ /*! \fn LessThan qGreater() \relates - \obsolete + \deprecated Use std::greater instead. From 83b1eaad44862828b3248840c33f16e0b73df479 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Jan 2014 14:49:32 -0800 Subject: [PATCH 4/9] Make a URL with absent authority be different from one with an empty one This partially reverts 5764f5e6eaf149116a818658883cf4fae9830f30 and fixes the problem differently. After this commit, "file:///foo" is still equal to "file:/foo", but "foo:///foo" becomes different from "foo:/foo", as it should be. Task-number: QTBUG-36151 Change-Id: Ia38638b0f30a7dcf110aa89aa427254c007fc107 Reviewed-by: David Faure --- src/corelib/io/qurl.cpp | 20 +++++++--- tests/auto/corelib/io/qurl/tst_qurl.cpp | 52 ++++++++++++++++++++----- 2 files changed, 56 insertions(+), 16 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index f17215964f7..7018b333f2d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3542,9 +3542,13 @@ bool QUrl::operator ==(const QUrl &url) const if (!url.d) return d->isEmpty(); - // Compare which sections are present, but ignore Host - // which is set by parsing but not by construction, when empty. - const int mask = QUrlPrivate::FullUrl & ~QUrlPrivate::Host; + // First, compare which sections are present, since it speeds up the + // processing considerably. We just have to ignore the host-is-present flag + // for local files (the "file" protocol), due to the requirements of the + // XDG file URI specification. + int mask = QUrlPrivate::FullUrl; + if (isLocalFile()) + mask &= ~QUrlPrivate::Host; return (d->sectionIsPresent & mask) == (url.d->sectionIsPresent & mask) && d->scheme == url.d->scheme && d->userName == url.d->userName && @@ -3575,9 +3579,13 @@ bool QUrl::matches(const QUrl &url, FormattingOptions options) const if (!url.d) return d->isEmpty(); - // Compare which sections are present, but ignore Host - // which is set by parsing but not by construction, when empty. - int mask = QUrlPrivate::FullUrl & ~QUrlPrivate::Host; + // First, compare which sections are present, since it speeds up the + // processing considerably. We just have to ignore the host-is-present flag + // for local files (the "file" protocol), due to the requirements of the + // XDG file URI specification. + int mask = QUrlPrivate::FullUrl; + if (isLocalFile()) + mask &= ~QUrlPrivate::Host; if (options & QUrl::RemoveScheme) mask &= ~QUrlPrivate::Scheme; diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index 12b9159bf23..92dbb968170 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -169,6 +169,7 @@ private slots: void fileName(); void isEmptyForEncodedUrl(); void toEncodedNotUsingUninitializedPath(); + void emptyAuthorityRemovesExistingAuthority_data(); void emptyAuthorityRemovesExistingAuthority(); void acceptEmptyAuthoritySegments(); void lowercasesScheme(); @@ -3033,31 +3034,56 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const << QUrl::fromEncoded("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged"); } +void tst_QUrl::emptyAuthorityRemovesExistingAuthority_data() +{ + QTest::addColumn("input"); + QTest::addColumn("expected"); + QTest::newRow("regular") << "foo://example.com/something" << "foo:/something"; + QTest::newRow("empty") << "foo:///something" << "foo:/something"; +} + void tst_QUrl::emptyAuthorityRemovesExistingAuthority() { - QUrl url("http://example.com/something"); + QFETCH(QString, input); + QFETCH(QString, expected); + QUrl url(input); + QUrl orig = url; + url.setAuthority(QString()); QCOMPARE(url.authority(), QString()); + QVERIFY(url != orig); + QCOMPARE(url.toString(), expected); + QCOMPARE(url, QUrl(expected)); } void tst_QUrl::acceptEmptyAuthoritySegments() { QCOMPARE(QUrl("remote://").toString(), QString::fromLatin1("remote://")); - // Verify that foo:///bar is not mangled to foo:/bar + // Verify that foo:///bar is not mangled to foo:/bar nor vice-versa QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar"); - QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString()); - QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar).toEncoded())); + QVERIFY(QUrl(foo_triple_bar) != QUrl(foo_uni_bar)); - QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString()); - QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar).toEncoded())); + QCOMPARE(QUrl(foo_triple_bar).toString(), foo_triple_bar); + QCOMPARE(QUrl(foo_triple_bar).toEncoded(), foo_triple_bar.toLatin1()); - QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString()); - QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded())); + QCOMPARE(QUrl(foo_uni_bar).toString(), foo_uni_bar); + QCOMPARE(QUrl(foo_uni_bar).toEncoded(), foo_uni_bar.toLatin1()); - QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString()); - QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded())); + QCOMPARE(QUrl(foo_triple_bar, QUrl::StrictMode).toString(), foo_triple_bar); + QCOMPARE(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded(), foo_triple_bar.toLatin1()); + + QCOMPARE(QUrl(foo_uni_bar, QUrl::StrictMode).toString(), foo_uni_bar); + QCOMPARE(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded(), foo_uni_bar.toLatin1()); + + // However, file:/bar is the same as file:///bar + QString file_triple_bar("file:///bar"), file_uni_bar("file:/bar"); + + QVERIFY(QUrl(file_triple_bar) == QUrl(file_uni_bar)); + + QCOMPARE(QUrl(file_uni_bar).toString(), file_triple_bar); + QCOMPARE(QUrl(file_uni_bar, QUrl::StrictMode).toString(), file_triple_bar); } void tst_QUrl::effectiveTLDs_data() @@ -3434,6 +3460,12 @@ void tst_QUrl::setComponents_data() QTest::newRow("host-empty") << QUrl("foo://example.com/path") << int(Host) << "" << Tolerant << true << PrettyDecoded << QString() << "foo:///path"; + QTest::newRow("authority-null") << QUrl("foo://example.com/path") + << int(Authority) << QString() << Tolerant << true + << PrettyDecoded << QString() << "foo:/path"; + QTest::newRow("authority-empty") << QUrl("foo://example.com/path") + << int(Authority) << "" << Tolerant << true + << PrettyDecoded << QString() << "foo:///path"; QTest::newRow("query-null") << QUrl("http://example.com/?q=foo") << int(Query) << QString() << Tolerant << true << PrettyDecoded << QString() << "http://example.com/"; From ce46593e25d023b756128d53f5c7b4a7ee52f488 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 6 Feb 2014 14:10:57 +0100 Subject: [PATCH 5/9] Android: Build fix for "-no-widgets" This fixes compilation of Qt for Android when configured with "-no-widgets". One good use-case for that configure switch is that QtSvg loses the dependency to QtWidgets. Change-Id: I8a645d9fee6ce0467ff0b5d1d62531b7c6272aab Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Daniel Teske --- src/plugins/platforms/android/src/androidjnimain.cpp | 1 - .../platforms/android/src/qandroidplatformdialoghelpers.cpp | 2 -- src/plugins/platforms/android/src/qandroidplatformintegration.h | 1 - src/plugins/platforms/android/src/qandroidplatformtheme.h | 2 ++ 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/android/src/androidjnimain.cpp b/src/plugins/platforms/android/src/androidjnimain.cpp index 6461fa47331..40f3cc714e0 100644 --- a/src/plugins/platforms/android/src/androidjnimain.cpp +++ b/src/plugins/platforms/android/src/androidjnimain.cpp @@ -62,7 +62,6 @@ #include "androidjnimenu.h" #include "qandroidplatformdialoghelpers.h" #include "qandroidplatformintegration.h" -#include #include diff --git a/src/plugins/platforms/android/src/qandroidplatformdialoghelpers.cpp b/src/plugins/platforms/android/src/qandroidplatformdialoghelpers.cpp index 4c91e76e0f6..6a93fbb76ef 100644 --- a/src/plugins/platforms/android/src/qandroidplatformdialoghelpers.cpp +++ b/src/plugins/platforms/android/src/qandroidplatformdialoghelpers.cpp @@ -39,8 +39,6 @@ ** ****************************************************************************/ -#include -#include #include "qandroidplatformdialoghelpers.h" #include "androidjnimain.h" diff --git a/src/plugins/platforms/android/src/qandroidplatformintegration.h b/src/plugins/platforms/android/src/qandroidplatformintegration.h index c5476128a58..caf26244a75 100644 --- a/src/plugins/platforms/android/src/qandroidplatformintegration.h +++ b/src/plugins/platforms/android/src/qandroidplatformintegration.h @@ -45,7 +45,6 @@ #include #include #include -#include #include #include "qandroidinputcontext.h" diff --git a/src/plugins/platforms/android/src/qandroidplatformtheme.h b/src/plugins/platforms/android/src/qandroidplatformtheme.h index ec259a9b0a5..9614e51f801 100644 --- a/src/plugins/platforms/android/src/qandroidplatformtheme.h +++ b/src/plugins/platforms/android/src/qandroidplatformtheme.h @@ -43,6 +43,8 @@ #define QANDROIDPLATFORMTHEME_H #include +#include + class QAndroidPlatformNativeInterface; class QAndroidPlatformTheme: public QPlatformTheme { From 817c4be91fc9bfa35112fbae689747d42d121036 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Mon, 17 Feb 2014 16:56:37 +0100 Subject: [PATCH 6/9] Remove qSort usages from network tests QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: I31a701d8e17673edcb9bb7c32e6e6a87812a7fbc Reviewed-by: Peter Hartmann Reviewed-by: Richard J. Moore --- .../tst_qabstractnetworkcache.cpp | 10 ++++++---- .../access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index 53b367c8724..da86a2d14dd 100644 --- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -50,6 +50,8 @@ #include #endif +#include + #define TESTFILE QString("http://%1/qtest/cgi-bin/").arg(QtNetworkSettings::serverName()) class tst_QAbstractNetworkCache : public QObject @@ -334,8 +336,8 @@ void tst_QAbstractNetworkCache::runTest() if (fetchFromCache) { QList rawHeaderList = reply->rawHeaderList(); QList rawHeaderList2 = reply2->rawHeaderList(); - qSort(rawHeaderList); - qSort(rawHeaderList2); + std::sort(rawHeaderList.begin(), rawHeaderList.end()); + std::sort(rawHeaderList2.begin(), rawHeaderList2.end()); } QCOMPARE(diskCache->gotData, fetchFromCache); } @@ -388,8 +390,8 @@ void tst_QAbstractNetworkCache::checkSynchronous() if (fetchFromCache) { QList rawHeaderList = reply->rawHeaderList(); QList rawHeaderList2 = reply2->rawHeaderList(); - qSort(rawHeaderList); - qSort(rawHeaderList2); + std::sort(rawHeaderList.begin(), rawHeaderList.end()); + std::sort(rawHeaderList2.begin(), rawHeaderList2.end()); } QCOMPARE(diskCache->gotData, fetchFromCache); } diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp index 54b560cc1b2..44edcc66c0a 100644 --- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp +++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp @@ -43,6 +43,9 @@ #include #include #include + +#include + #define EXAMPLE_URL "http://user:pass@www.example.com/#foo" //cached objects are organized into these many subdirs #define NUM_SUBDIRECTORIES 16 @@ -464,7 +467,7 @@ void tst_QNetworkDiskCache::expire() cacheList.append(metaData.url().toString()); } } - qSort(cacheList); + std::sort(cacheList.begin(), cacheList.end()); for (int i = 0; i < cacheList.count(); ++i) { QString fileName = cacheList[i]; QCOMPARE(fileName, QString("http://www.foo.com/%1").arg(i + 6)); From d5b0f1763f47987bc69348ab31b164ca6bbb7d12 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 17 Feb 2014 11:01:39 +0100 Subject: [PATCH 7/9] Doc: add CLI options for QGuiApplication Task-number: QTBUG-36579 Change-Id: Ib9376ecfe98f8d5e26c4f9be783a022faa9d3046 Reviewed-by: Friedemann Kleint --- src/gui/kernel/qguiapplication.cpp | 88 +++++++++++++++++++++++++++--- 1 file changed, 80 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 10f099a5caa..c935a450851 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -461,18 +461,63 @@ static QWindowGeometrySpecification windowGeometrySpecification; \note \a argc and \a argv might be changed as Qt removes command line arguments that it recognizes. + \section1 Supported Command Line Options + All Qt programs automatically support the following command line options: \list - \li -reverse, sets the application's layout direction to - Qt::RightToLeft - \li -qmljsdebugger=, activates the QML/JS debugger with a specified port. - The value must be of format port:1234[,block], where block is optional + + \li \c{-platform} \e {platformName[:options]}, specifies the + \l{Qt Platform Abstraction} (QPA) plugin. + + Overridden by the \c QT_QPA_PLATFORM environment variable. + \li \c{-platformpluginpath} \e path, specifies the path to platform + plugins. + + Overridden by the \c QT_QPA_PLATFORM_PLUGIN_PATH environment + variable. + + \li \c{-platformtheme} \e platformTheme, specifies the platform theme. + + Overridden by the \c QT_QPA_PLATFORMTHEME environment variable. + \li \c{-qmljsdebugger=}, activates the QML/JS debugger with a specified port. + The value must be of format \c{port:1234}\e{[,block]}, where + \e block is optional and will make the application wait until a debugger connects to it. - \li -session \e session, restores the application from an earlier + \li \c {-qwindowgeometry} \e geometry, specifies window geometry for + the main window using the X11-syntax. For example: + \c {-qwindowgeometry 100x100+50+50} + \li \c{-reverse}, sets the application's layout direction to + Qt::RightToLeft + \li \c{-session} \e session, restores the application from an earlier \l{Session Management}{session}. \endlist - \sa arguments() + The following standard command line options are available for X11: + + \list + \li \c {-display} \e {hostname:screen_number}, switches displays on X11. + \li \c {-geometry} \e geometry, same as \c {-qwindowgeometry}. + \endlist + + \section1 Platform-Specific Arguments + + You can specify platform-specific arguments for the \c{-platform} option. + Place them after the platform plugin name following a colon as a + comma-separated list. For example, + \c{-platform windows:dialogs=xp,fontengine=freetype}. + + The following parameters are available for \c {-platform windows}: + + \list + \li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and + \c none disables them. + \li \c {fontengine=freetype}, uses the FreeType font engine. + \endlist + + For more information about the platform-specific arguments available for + embedded Linux platforms, see \l{Qt for Embedded Linux}. + + \sa arguments() QGuiApplication::platformName */ #ifdef Q_QDOC QGuiApplication::QGuiApplication(int &argc, char **argv) @@ -878,8 +923,35 @@ QWindow *QGuiApplication::topLevelAt(const QPoint &pos) \property QGuiApplication::platformName \brief The name of the underlying platform plugin. - Examples: "xcb" (for X11), "Cocoa" (for Mac OS X), "windows", "qnx", - "directfb", "kms", "MinimalEgl", "LinuxFb", "EglFS", "OpenWFD"... + The QPA platform plugins are located in \c {qtbase\src\plugins\platforms}. + At the time of writing, the following platform plugin names are supported: + + \list + \li \c android + \li \c cocoa is a platform plugin for Mac OS X. + \li \c directfb + \li \c eglfs is a platform plugin for running Qt5 applications on top of + EGL and OpenGL ES 2.0 without an actual windowing system (like X11 + or Wayland). For more information, see \l{EGLFS}. + \li \c ios + \li \c kms is an experimental platform plugin using kernel modesetting + and \l{http://dri.freedesktop.org/wiki/DRM}{DRM} (Direct Rendering + Manager). + \li \c linuxfb writes directly to the framebuffer. For more information, + see \l{LinuxFB}. + \li \c minimal is provided as an examples for developers who want to + write their own platform plugins. However, you can use the plugin to + run GUI applications in environments without a GUI, such as servers. + \li \c minimalegl is an example plugin. + \li \c offscreen + \li \c openwfd + \li \c qnx + \li \c windows + \li \c xcb is the X11 plugin used on regular desktop Linux platforms. + \endlist + + For more information about the platform plugins for embedded Linux devices, + see \l{Qt for Embedded Linux}. */ QString QGuiApplication::platformName() From 13040043b2f2274de74c296ede7dd3e6ffb67dcb Mon Sep 17 00:00:00 2001 From: Sarunas Valaskevicius Date: Sun, 9 Feb 2014 18:44:25 +0000 Subject: [PATCH 8/9] Emit updateBlock signal in QTextDocumentLayout updateBlock is part of the interface of QAbstractTextDocumentLayout however QTextDocumentLayout implementation is not invoking it. This commit adds similar behavior to QTextDocumentLayout as the QPlainTextDocumentLayout (QtWidgets) has by implementing the missing functionality. [ChangeLog][QtGui][QTextDocumentLayout] Emit updateBlock signal in QTextDocumentLayout. Task-number: QTBUG-36743 Change-Id: I7f812d4d5d7c2148393ee672fb0db6c0b2e73783 Reviewed-by: Lars Knoll Reviewed-by: Konstantin Ritt --- src/gui/text/qtextdocumentlayout.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 313700429c6..b2c82b8654d 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2883,11 +2883,11 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length) { Q_D(QTextDocumentLayout); - QTextBlock blockIt = document()->findBlock(from); + QTextBlock startIt = document()->findBlock(from); QTextBlock endIt = document()->findBlock(qMax(0, from + length - 1)); if (endIt.isValid()) endIt = endIt.next(); - for (; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next()) + for (QTextBlock blockIt = startIt; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next()) blockIt.clearLayout(); if (d->docPrivate->pageSize.isNull()) @@ -2929,6 +2929,9 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length) d->insideDocumentChange = false; + for (QTextBlock blockIt = startIt; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next()) + emit updateBlock(blockIt); + if (d->showLayoutProgress) { const QSizeF newSize = dynamicDocumentSize(); if (newSize != d->lastReportedSize) { From 21fbca97a8ee284ff6ffaff64c180700cc5537ab Mon Sep 17 00:00:00 2001 From: hjk Date: Sat, 15 Feb 2014 16:17:14 +0100 Subject: [PATCH 9/9] Fix typo in model/view docs. Task-number: QTWEBSITE-560 Change-Id: I2b7a6f28ac41bacbfd2603feb8b786c31d3769e3 Reviewed-by: Tero Kojo Reviewed-by: Leena Miettinen --- src/widgets/doc/src/model-view-programming.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc index 3d3b6da8193..3a8fd54bcf8 100644 --- a/src/widgets/doc/src/model-view-programming.qdoc +++ b/src/widgets/doc/src/model-view-programming.qdoc @@ -217,7 +217,7 @@ \section1 Using models and views The following sections explain how to use the model/view pattern - in Qt. Each section includes an an example and is followed by a + in Qt. Each section includes an example and is followed by a section showing how to create new components. \section2 Two models included in Qt