summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-13 01:00:45 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-01-13 01:00:58 +0100
commit46b433b971999610dcc007a6f57ef4045d159548 (patch)
tree98095aa3343432d4d29dd6d6e9cf94532e8195e0 /src
parenta16c37b78fff5c4b24328d52bf9b2c7f57db0d12 (diff)
parent8d0715f106afb315ad8c2a68ceea09e82decc86f (diff)
Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfilesystemwatcher_win.cpp1
-rw-r--r--src/corelib/kernel/qeventdispatcher_unix_p.h2
-rw-r--r--src/corelib/text/qregularexpression.cpp4
-rw-r--r--src/corelib/text/qstring.cpp44
-rw-r--r--src/gui/kernel/qguiapplication.cpp24
-rw-r--r--src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp3
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.cpp23
-rw-r--r--src/plugins/platforms/wasm/qwasmeventdispatcher.h2
-rw-r--r--src/plugins/platforms/windows/qwindowscombase.h3
9 files changed, 82 insertions, 24 deletions
diff --git a/src/corelib/io/qfilesystemwatcher_win.cpp b/src/corelib/io/qfilesystemwatcher_win.cpp
index 5f91ce5e3d..3b67dd61c7 100644
--- a/src/corelib/io/qfilesystemwatcher_win.cpp
+++ b/src/corelib/io/qfilesystemwatcher_win.cpp
@@ -403,6 +403,7 @@ QStringList QWindowsFileSystemWatcherEngine::addPaths(const QStringList &paths,
const QString absolutePath = isDir ? fileInfo.absoluteFilePath() : fileInfo.absolutePath();
const uint flags = isDir
? (FILE_NOTIFY_CHANGE_DIR_NAME
+ | FILE_NOTIFY_CHANGE_ATTRIBUTES
| FILE_NOTIFY_CHANGE_FILE_NAME)
: (FILE_NOTIFY_CHANGE_DIR_NAME
| FILE_NOTIFY_CHANGE_FILE_NAME
diff --git a/src/corelib/kernel/qeventdispatcher_unix_p.h b/src/corelib/kernel/qeventdispatcher_unix_p.h
index f37edfc967..581df9242c 100644
--- a/src/corelib/kernel/qeventdispatcher_unix_p.h
+++ b/src/corelib/kernel/qeventdispatcher_unix_p.h
@@ -118,7 +118,7 @@ public:
int remainingTime(int timerId) final;
- void wakeUp() final;
+ void wakeUp() override;
void interrupt() final;
void flush() override;
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index fb8f5a5efc..a3a4921690 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -463,10 +463,10 @@ QT_BEGIN_NAMESPACE
\c{\xHHHH} with more than 2 digits. A pattern like \c{\x2022} neeeds to
be ported to \c{\x{2022}}, or it will match a space (\c{0x20}) followed
by the string \c{"22"}. In general, it is highly recommended to always use
- curly braces with the \c{\\x} escape, no matter the amount of digits
+ curly braces with the \c{\x} escape, no matter the amount of digits
specified.
- \li A 0-to-n quantification like \c{{,n}} needs to be ported to c{{0,n}} to
+ \li A 0-to-n quantification like \c{{,n}} needs to be ported to \c{{0,n}} to
preserve semantics. Otherwise, a pattern such as \c{\d{,3}} would
actually match a digit followed by the exact string \c{"{,3}"}.
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 5788f000a1..720c3e98c7 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -5123,21 +5123,25 @@ bool QString::endsWith(QChar c, Qt::CaseSensitivity cs) const
}
/*!
- Returns \c true if the string only contains uppercase letters,
- otherwise returns \c false.
+ Returns \c true if the string is uppercase, that is, it's identical
+ to its toUpper() folding.
+
+ Note that this does \e not mean that the string does not contain
+ lowercase letters (some lowercase letters do not have a uppercase
+ folding; they are left unchanged by toUpper()).
+ For more information, refer to the Unicode standard, section 3.13.
+
\since 5.12
- \sa QChar::isUpper(), isLower()
+ \sa QChar::toUpper(), isLower()
*/
bool QString::isUpper() const
{
- if (isEmpty())
- return false;
+ QStringIterator it(*this);
- const QChar *d = data();
-
- for (int i = 0, max = size(); i < max; ++i) {
- if (!d[i].isUpper())
+ while (it.hasNext()) {
+ uint uc = it.nextUnchecked();
+ if (qGetProp(uc)->cases[QUnicodeTables::UpperCase].diff)
return false;
}
@@ -5145,21 +5149,25 @@ bool QString::isUpper() const
}
/*!
- Returns \c true if the string only contains lowercase letters,
- otherwise returns \c false.
+ Returns \c true if the string is lowercase, that is, it's identical
+ to its toLower() folding.
+
+ Note that this does \e not mean that the string does not contain
+ uppercase letters (some uppercase letters do not have a lowercase
+ folding; they are left unchanged by toLower()).
+ For more information, refer to the Unicode standard, section 3.13.
+
\since 5.12
- \sa QChar::isLower(), isUpper()
+ \sa QChar::toLower(), isUpper()
*/
bool QString::isLower() const
{
- if (isEmpty())
- return false;
+ QStringIterator it(*this);
- const QChar *d = data();
-
- for (int i = 0, max = size(); i < max; ++i) {
- if (!d[i].isLower())
+ while (it.hasNext()) {
+ uint uc = it.nextUnchecked();
+ if (qGetProp(uc)->cases[QUnicodeTables::LowerCase].diff)
return false;
}
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 680c69a978..ffd5b04276 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -605,8 +605,13 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME
The following parameters are available for \c {-platform windows}:
\list
+ \li \c {altgr}, detect the key \c {AltGr} found on some keyboards as
+ Qt::GroupSwitchModifier (since Qt 5.12).
\li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and
\c none disables them.
+
+ \li \c {dpiawareness=[0|1|2} Sets the DPI awareness of the process
+ (see \l{High DPI Displays}, since Qt 5.4).
\li \c {fontengine=freetype}, uses the FreeType font engine.
\li \c {menus=[native|none]}, controls the use of native menus.
@@ -616,10 +621,23 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME
provide hover signals. They are mainly intended for Qt Quick.
By default, they will be used if the application is not an
instance of QApplication or for Qt Quick Controls 2
- applications.
+ applications (since Qt 5.10).
- \li \c {altgr}, detect the key \c {AltGr} found on some keyboards as
- Qt::GroupSwitchModifier.
+ \li \c {nocolorfonts} Turn off DirectWrite Color fonts
+ (since Qt 5.8).
+
+ \li \c {nodirectwrite} Turn off DirectWrite fonts (since Qt 5.8).
+
+ \li \c {nomousefromtouch} Ignores mouse events synthesized
+ from touch events by the operating system.
+
+ \li \c {nowmpointer} Switches from Pointer Input Messages handling
+ to legacy mouse handling (since Qt 5.12).
+ \li \c {reverse} Activates Right-to-left mode (experimental).
+ Windows title bars will be shown accordingly in Right-to-left locales
+ (since Qt 5.13).
+ \li \c {tabletabsoluterange=<value>} Sets a value for mouse mode detection
+ of WinTab tablets (Legacy, since Qt 5.3).
\endlist
The following parameter is available for \c {-platform cocoa} (on macOS):
diff --git a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
index 98246de0a5..5c999f455e 100644
--- a/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
@@ -62,6 +62,9 @@
QT_BEGIN_NAMESPACE
+// Clang does not consider __declspec(nothrow) as nothrow
+QT_WARNING_DISABLE_CLANG("-Wmicrosoft-exception-spec")
+
// Convert from design units to logical pixels
#define DESIGN_TO_LOGICAL(DESIGN_UNIT_VALUE) \
QFixed::fromReal((qreal(DESIGN_UNIT_VALUE) / qreal(m_unitsPerEm)) * fontDef.pixelSize)
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
index 41355d72ae..d89cd78b28 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.cpp
@@ -33,6 +33,14 @@
#include <emscripten.h>
+#if (__EMSCRIPTEN_major__ > 1 || __EMSCRIPTEN_minor__ > 38 || __EMSCRIPTEN_minor__ == 38 && __EMSCRIPTEN_tiny__ >= 22)
+# define EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
+#endif
+
+#ifdef EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
+#include <emscripten/threading.h>
+#endif
+
class QWasmEventDispatcherPrivate : public QEventDispatcherUNIXPrivate
{
@@ -179,3 +187,18 @@ void QWasmEventDispatcher::doMaintainTimers()
emscripten_async_call(callback, this, toWaitDuration);
m_currentTargetTime = newTargetTime;
}
+
+void QWasmEventDispatcher::wakeUp()
+{
+#ifdef EMSCRIPTEN_HAS_ASYNC_RUN_IN_MAIN_RUNTIME_THREAD
+ if (!emscripten_is_main_runtime_thread())
+ emscripten_async_run_in_main_runtime_thread_(EM_FUNC_SIG_VI, (void*)(&QWasmEventDispatcher::mainThreadWakeUp), this);
+#endif
+ QEventDispatcherUNIX::wakeUp();
+}
+
+void QWasmEventDispatcher::mainThreadWakeUp(void *eventDispatcher)
+{
+ emscripten_resume_main_loop(); // Service possible requestUpdate Calls
+ static_cast<QWasmEventDispatcher *>(eventDispatcher)->processEvents(QEventLoop::AllEvents);
+}
diff --git a/src/plugins/platforms/wasm/qwasmeventdispatcher.h b/src/plugins/platforms/wasm/qwasmeventdispatcher.h
index 5300b3de73..f72d92ce07 100644
--- a/src/plugins/platforms/wasm/qwasmeventdispatcher.h
+++ b/src/plugins/platforms/wasm/qwasmeventdispatcher.h
@@ -51,6 +51,8 @@ public:
protected:
bool processEvents(QEventLoop::ProcessEventsFlags flags) override;
void doMaintainTimers();
+ void wakeUp() override;
+ static void mainThreadWakeUp(void *eventDispatcher);
private:
bool m_hasMainLoop = false;
diff --git a/src/plugins/platforms/windows/qwindowscombase.h b/src/plugins/platforms/windows/qwindowscombase.h
index 45cba9c68b..bb4b295395 100644
--- a/src/plugins/platforms/windows/qwindowscombase.h
+++ b/src/plugins/platforms/windows/qwindowscombase.h
@@ -107,6 +107,9 @@ private:
ULONG m_ref;
};
+// Clang does not consider __declspec(nothrow) as nothrow
+QT_WARNING_DISABLE_CLANG("-Wmicrosoft-exception-spec")
+
QT_END_NAMESPACE
#endif // QWINDOWSCOMBASE_H