diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-18 14:19:36 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-18 14:19:36 +0100 |
commit | 6aa09bbce59828d028f6d1e81d2bfc6ba537aae1 (patch) | |
tree | 9ba857247c0862fa6636766fad9cdab146c9c19b /src | |
parent | f4044e853cdb66a7f7f7e61df78434243b85b03d (diff) | |
parent | 21fbca97a8ee284ff6ffaff64c180700cc5537ab (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/plugins/platforms/android/qandroidplatformtheme.h
Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qurl.cpp | 20 | ||||
-rw-r--r-- | src/corelib/tools/qalgorithms.qdoc | 54 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 88 | ||||
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 7 | ||||
-rw-r--r-- | src/plugins/platforms/android/androidjnimain.cpp | 1 | ||||
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformintegration.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformtheme.h | 2 | ||||
-rw-r--r-- | src/widgets/doc/src/model-view-programming.qdoc | 2 |
10 files changed, 129 insertions, 50 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index f17215964f..7018b333f2 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/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 8feb180248..2551233aec 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 <QtAlgorithms> - \obsolete + \deprecated Use std::copy instead. @@ -249,7 +249,7 @@ /*! \fn BiIterator2 qCopyBackward(BiIterator1 begin1, BiIterator1 end1, BiIterator2 end2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::copy_backward instead. @@ -268,7 +268,7 @@ /*! \fn bool qEqual(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::equal instead. @@ -287,7 +287,7 @@ /*! \fn void qFill(ForwardIterator begin, ForwardIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::fill instead. @@ -301,7 +301,7 @@ /*! \fn void qFill(Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::fill instead. @@ -311,7 +311,7 @@ /*! \fn InputIterator qFind(InputIterator begin, InputIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::find instead. @@ -334,7 +334,7 @@ /*! \fn void qFind(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::find instead. @@ -344,7 +344,7 @@ /*! \fn void qCount(InputIterator begin, InputIterator end, const T &value, Size &n) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::count instead. @@ -364,7 +364,7 @@ /*! \fn void qCount(const Container &container, const T &value, Size &n) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::count instead. @@ -376,7 +376,7 @@ /*! \fn void qSwap(T &var1, T &var2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::swap instead. @@ -388,7 +388,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::sort instead. @@ -413,7 +413,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::sort instead. @@ -449,7 +449,7 @@ /*! \fn void qSort(Container &container) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::sort instead. @@ -460,7 +460,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::stable_sort instead. @@ -487,7 +487,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -519,7 +519,7 @@ /*! \fn void qStableSort(Container &container) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -529,7 +529,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::lower_bound instead. @@ -558,7 +558,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -573,7 +573,7 @@ /*! \fn void qLowerBound(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -586,7 +586,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::upper_bound instead. @@ -615,7 +615,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -630,7 +630,7 @@ /*! \fn void qUpperBound(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -641,7 +641,7 @@ /*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \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 <QtAlgorithms> - \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 <QtAlgorithms> - \obsolete + \deprecated \overload Use std::binary_search or std::lower_bound instead. @@ -725,7 +725,7 @@ /*! \fn LessThan qLess() \relates <QtAlgorithms> - \obsolete + \deprecated Use std::less instead. @@ -741,7 +741,7 @@ /*! \fn LessThan qGreater() \relates <QtAlgorithms> - \obsolete + \deprecated Use std::greater instead. diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 673363c66f..50f616a010 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3696,7 +3696,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() */ diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 3953437372..c587e51299 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -464,20 +464,65 @@ 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}. \li -qwindowgeometry, sets the geometry of the first window \li -qwindowtitle, sets the title of the first window \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) @@ -885,8 +930,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() diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index 313700429c..b2c82b8654 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) { diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp index c904ddb3ac..28a5da4b5d 100644 --- a/src/plugins/platforms/android/androidjnimain.cpp +++ b/src/plugins/platforms/android/androidjnimain.cpp @@ -63,7 +63,6 @@ #include "androidjnimenu.h" #include "qandroidplatformdialoghelpers.h" #include "qandroidplatformintegration.h" -#include <QtWidgets/QApplication> #include <qabstracteventdispatcher.h> diff --git a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp index fa123827e7..e76eedbfd9 100644 --- a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp +++ b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp @@ -39,8 +39,6 @@ ** ****************************************************************************/ -#include <QtWidgets/QApplication> -#include <QtWidgets/QStyle> #include "qandroidplatformdialoghelpers.h" #include "androidjnimain.h" #include <private/qguiapplication_p.h> diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h index 0dc2415337..2d685bc567 100644 --- a/src/plugins/platforms/android/qandroidplatformintegration.h +++ b/src/plugins/platforms/android/qandroidplatformintegration.h @@ -45,7 +45,6 @@ #include <qpa/qplatformintegration.h> #include <qpa/qplatformmenu.h> #include <qpa/qplatformnativeinterface.h> -#include <QtWidgets/QAction> #include <EGL/egl.h> #include <jni.h> diff --git a/src/plugins/platforms/android/qandroidplatformtheme.h b/src/plugins/platforms/android/qandroidplatformtheme.h index 9df445ef17..fecd7ca8e9 100644 --- a/src/plugins/platforms/android/qandroidplatformtheme.h +++ b/src/plugins/platforms/android/qandroidplatformtheme.h @@ -43,7 +43,7 @@ #define QANDROIDPLATFORMTHEME_H #include <qpa/qplatformtheme.h> -#include <QPalette> +#include <QtGui/qpalette.h> class QAndroidPlatformNativeInterface; class QAndroidPlatformTheme: public QPlatformTheme diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc index 3d3b6da819..3a8fd54bcf 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 |