summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-26 10:09:05 +0100
committerLiang Qi <liang.qi@qt.io>2018-01-26 10:09:06 +0100
commit9f065554ffea0e3716b76e4bee4a60f0044193ce (patch)
tree735c2257cc9b50b847646aa1e0e5abb603b6482d
parent6dbf3576093858d981d8321b00f0b19faa7cf217 (diff)
parent342bb5b03a76d1428fafb8e1532d66e172bd1c0b (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
-rw-r--r--qmake/doc/src/qmake-manual.qdoc3
-rw-r--r--src/concurrent/doc/src/qtconcurrent-index.qdoc11
-rw-r--r--src/dbus/doc/src/qtdbus-index.qdoc11
-rw-r--r--src/gui/painting/qmatrix.h4
-rw-r--r--src/gui/painting/qtransform.h6
-rw-r--r--src/gui/text/qtextengine_p.h8
-rw-r--r--src/gui/text/qtextobject.h4
-rw-r--r--src/opengl/doc/src/qtopengl-index.qdoc17
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm37
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm18
-rw-r--r--src/plugins/platforms/windows/qwindowsdialoghelpers.cpp27
-rw-r--r--src/printsupport/doc/src/qtprintsupport-index.qdoc15
-rw-r--r--src/widgets/doc/src/qtwidgets-index.qdoc11
-rw-r--r--src/xml/doc/src/qtxml-index.qdoc11
14 files changed, 141 insertions, 42 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index 16b498d36e..4a20c1dcb4 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -2359,6 +2359,9 @@
Specifies the \l{All Modules}{Qt modules} that are used by your project. For
the value to add for each module, see the module documentation.
+ At the C++ implementation level, using a Qt module makes its headers
+ available for inclusion and causes it to be linked to the binary.
+
By default, \c QT contains \c core and \c gui, ensuring that standard
GUI applications can be built without further configuration.
diff --git a/src/concurrent/doc/src/qtconcurrent-index.qdoc b/src/concurrent/doc/src/qtconcurrent-index.qdoc
index 836cde131c..3e4aa791f1 100644
--- a/src/concurrent/doc/src/qtconcurrent-index.qdoc
+++ b/src/concurrent/doc/src/qtconcurrent-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -133,4 +133,13 @@
copy of the container when called. If you are using STL containers this copy operation
might take some time, in this case we recommend specifying the begin and end iterators
for the container instead.
+
+ \section1 Licenses
+
+ The Qt Concurrent module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
*/
diff --git a/src/dbus/doc/src/qtdbus-index.qdoc b/src/dbus/doc/src/qtdbus-index.qdoc
index 080066cfa8..eed5e42731 100644
--- a/src/dbus/doc/src/qtdbus-index.qdoc
+++ b/src/dbus/doc/src/qtdbus-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -200,6 +200,15 @@
Information about the messages will be written to the console the application
was launched from.
+ \section1 Licenses
+
+ The Qt D-Bus module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
+
\section1 Further Reading
The following documents contain information about Qt's D-Bus integration
diff --git a/src/gui/painting/qmatrix.h b/src/gui/painting/qmatrix.h
index 15e0ab5be1..dafb746bc6 100644
--- a/src/gui/painting/qmatrix.h
+++ b/src/gui/painting/qmatrix.h
@@ -65,10 +65,10 @@ public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// ### Qt 6: remove; the compiler-generated ones are fine!
QMatrix &operator=(QMatrix &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QMatrix)); return *this; }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QMatrix)); return *this; }
QMatrix &operator=(const QMatrix &) Q_DECL_NOTHROW; // = default
QMatrix(QMatrix &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QMatrix)); }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QMatrix)); }
QMatrix(const QMatrix &other) Q_DECL_NOTHROW; // = default
#endif
diff --git a/src/gui/painting/qtransform.h b/src/gui/painting/qtransform.h
index 06ae611861..efb0fd7e83 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -78,14 +78,14 @@ public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// ### Qt 6: remove; the compiler-generated ones are fine!
QTransform &operator=(QTransform &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(QTransform)); return *this; }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QTransform)); return *this; }
QTransform &operator=(const QTransform &) Q_DECL_NOTHROW; // = default
QTransform(QTransform &&other) Q_DECL_NOTHROW // = default
: affine(Qt::Uninitialized)
- { memcpy(this, &other, sizeof(QTransform)); }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(QTransform)); }
QTransform(const QTransform &other) Q_DECL_NOTHROW // = default
: affine(Qt::Uninitialized)
- { memcpy(this, &other, sizeof(QTransform)); }
+ { memcpy(static_cast<void *>(this), static_cast<const void *>(&other), sizeof(QTransform)); }
#endif
bool isAffine() const;
diff --git a/src/gui/text/qtextengine_p.h b/src/gui/text/qtextengine_p.h
index 89f1328241..90c1a12acd 100644
--- a/src/gui/text/qtextengine_p.h
+++ b/src/gui/text/qtextengine_p.h
@@ -236,13 +236,13 @@ struct QGlyphLayout
last = numGlyphs;
if (first == 0 && last == numGlyphs
&& reinterpret_cast<char *>(offsets + numGlyphs) == reinterpret_cast<char *>(glyphs)) {
- memset(offsets, 0, (numGlyphs * SpaceNeeded));
+ memset(static_cast<void *>(offsets), 0, (numGlyphs * SpaceNeeded));
} else {
const int num = last - first;
- memset(offsets + first, 0, num * sizeof(QFixedPoint));
+ memset(static_cast<void *>(offsets + first), 0, num * sizeof(QFixedPoint));
memset(glyphs + first, 0, num * sizeof(glyph_t));
- memset(advances + first, 0, num * sizeof(QFixed));
- memset(justifications + first, 0, num * sizeof(QGlyphJustification));
+ memset(static_cast<void *>(advances + first), 0, num * sizeof(QFixed));
+ memset(static_cast<void *>(justifications + first), 0, num * sizeof(QGlyphJustification));
memset(attributes + first, 0, num * sizeof(QGlyphAttributes));
}
}
diff --git a/src/gui/text/qtextobject.h b/src/gui/text/qtextobject.h
index a5030de112..4cc2535b58 100644
--- a/src/gui/text/qtextobject.h
+++ b/src/gui/text/qtextobject.h
@@ -154,9 +154,9 @@ public:
iterator(const iterator &o) Q_DECL_NOTHROW; // = default
iterator &operator=(const iterator &o) Q_DECL_NOTHROW; // = default
iterator(iterator &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(iterator)); }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(iterator)); }
iterator &operator=(iterator &&other) Q_DECL_NOTHROW // = default
- { memcpy(this, &other, sizeof(iterator)); return *this; }
+ { memcpy(static_cast<void *>(this), static_cast<void *>(&other), sizeof(iterator)); return *this; }
#endif
QTextFrame *parentFrame() const { return f; }
diff --git a/src/opengl/doc/src/qtopengl-index.qdoc b/src/opengl/doc/src/qtopengl-index.qdoc
index 6ab888a14d..30b657f6db 100644
--- a/src/opengl/doc/src/qtopengl-index.qdoc
+++ b/src/opengl/doc/src/qtopengl-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -41,9 +41,6 @@
platform, Microsoft Foundation Classes (MFC) under Windows, or Qt
on both platforms.
- \note OpenGL is a trademark of Silicon Graphics, Inc. in
- the United States and other countries.
-
The Qt OpenGL module makes it easy to use OpenGL in Qt applications.
It provides an OpenGL widget class that can be used just like any
other Qt widget, except that it opens an OpenGL display buffer where
@@ -68,4 +65,16 @@
The \l{Qt OpenGL C++ Classes} page gives an overview over the available classes
in this module.
+
+ \section1 Licenses and Trademarks
+
+ The Qt OpenGL module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
+
+ OpenGL\reg is a trademark of Silicon Graphics, Inc. in
+ the United States and other countries.
*/
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 7397312820..722a53ac20 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -507,6 +507,23 @@ static QString familyNameFromPostScriptName(NSString *psName)
}
#endif
+static void addExtraFallbacks(QStringList *fallbackList)
+{
+#if defined(Q_OS_MACOS)
+ // Since we are only returning a list of default fonts for the current language, we do not
+ // cover all unicode completely. This was especially an issue for some of the common script
+ // symbols such as mathematical symbols, currency or geometric shapes. To minimize the risk
+ // of missing glyphs, we add Arial Unicode MS as a final fail safe, since this covers most
+ // of Unicode 2.1.
+ if (!fallbackList->contains(QStringLiteral("Arial Unicode MS")))
+ fallbackList->append(QStringLiteral("Arial Unicode MS"));
+ // Since some symbols (specifically Braille) are not in Arial Unicode MS, we
+ // add Apple Symbols to cover those too.
+ if (!fallbackList->contains(QStringLiteral("Apple Symbols")))
+ fallbackList->append(QStringLiteral("Apple Symbols"));
+#endif
+}
+
QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) const
{
Q_UNUSED(style);
@@ -534,16 +551,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
fallbackList.append(QString::fromCFString(fallbackFamilyName));
}
-#if defined(Q_OS_OSX)
- // Since we are only returning a list of default fonts for the current language, we do not
- // cover all unicode completely. This was especially an issue for some of the common script
- // symbols such as mathematical symbols, currency or geometric shapes. To minimize the risk
- // of missing glyphs, we add Arial Unicode MS as a final fail safe, since this covers most
- // of Unicode 2.1.
- if (!fallbackList.contains(QStringLiteral("Arial Unicode MS")))
- fallbackList.append(QStringLiteral("Arial Unicode MS"));
-#endif
-
+ addExtraFallbacks(&fallbackList);
extern QStringList qt_sort_families_by_writing_system(QChar::Script, const QStringList &);
fallbackList = qt_sort_families_by_writing_system(script, fallbackList);
@@ -584,14 +592,7 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo
fallbackList.append(QLatin1String("Apple Color Emoji"));
- // Since we are only returning a list of default fonts for the current language, we do not
- // cover all unicode completely. This was especially an issue for some of the common script
- // symbols such as mathematical symbols, currency or geometric shapes. To minimize the risk
- // of missing glyphs, we add Arial Unicode MS as a final fail safe, since this covers most
- // of Unicode 2.1.
- if (!fallbackList.contains(QStringLiteral("Arial Unicode MS")))
- fallbackList.append(QStringLiteral("Arial Unicode MS"));
-
+ addExtraFallbacks(&fallbackList);
fallbackLists[styleLookupKey.arg(fallbackStyleHint)] = fallbackList;
}
#else
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index 5392804d62..38bcb69acf 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -328,6 +328,24 @@ QT_END_NAMESPACE
return NO; // Someday qApp->quitOnLastWindowClosed(); when QApp and NSApp work closer together.
}
+- (void)applicationWillHide:(NSNotification *)notification
+{
+ if (reflectionDelegate
+ && [reflectionDelegate respondsToSelector:@selector(applicationWillHide:)]) {
+ [reflectionDelegate applicationWillHide:notification];
+ }
+
+ // When the application is hidden Qt will hide the popup windows associated with
+ // it when it has lost the activation for the application. However, when it gets
+ // to this point it believes the popup windows to be hidden already due to the
+ // fact that the application itself is hidden, which will cause a problem when
+ // the application is made visible again.
+ const QWindowList topLevelWindows = QGuiApplication::topLevelWindows();
+ for (QWindow *topLevelWindow : qAsConst(topLevelWindows)) {
+ if ((topLevelWindow->type() & Qt::Popup) == Qt::Popup && topLevelWindow->isVisible())
+ topLevelWindow->hide();
+ }
+}
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
diff --git a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
index bc78f5054b..dfa93d18a6 100644
--- a/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+++ b/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
@@ -68,7 +68,6 @@
#include <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#include <QtCore/QUuid>
-#include <QtCore/QRegularExpression>
#include <QtCore/QTemporaryFile>
#include <QtCore/private/qsystemlibrary_p.h>
@@ -1135,12 +1134,32 @@ void QWindowsNativeFileDialogBase::setLabelText(QFileDialogOptions::DialogLabel
}
}
+static bool isHexRange(const QString& s, int start, int end)
+{
+ for (;start < end; ++start) {
+ QChar ch = s.at(start);
+ if (!(ch.isDigit()
+ || (ch >= QLatin1Char('a') && ch <= QLatin1Char('f'))
+ || (ch >= QLatin1Char('A') && ch <= QLatin1Char('F'))))
+ return false;
+ }
+ return true;
+}
+
static inline bool isClsid(const QString &s)
{
// detect "374DE290-123F-4565-9164-39C4925E467B".
- static const QRegularExpression pattern(QLatin1String("\\A[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\\z"));
- Q_ASSERT(pattern.isValid());
- return pattern.match(s).hasMatch();
+ const QChar dash(QLatin1Char('-'));
+ return s.size() == 36
+ && isHexRange(s, 0, 8)
+ && s.at(8) == dash
+ && isHexRange(s, 9, 13)
+ && s.at(13) == dash
+ && isHexRange(s, 14, 18)
+ && s.at(18) == dash
+ && isHexRange(s, 19, 23)
+ && s.at(23) == dash
+ && isHexRange(s, 24, 36);
}
void QWindowsNativeFileDialogBase::selectFile(const QString &fileName) const
diff --git a/src/printsupport/doc/src/qtprintsupport-index.qdoc b/src/printsupport/doc/src/qtprintsupport-index.qdoc
index 7ac448f66f..a8a0f0cb20 100644
--- a/src/printsupport/doc/src/qtprintsupport-index.qdoc
+++ b/src/printsupport/doc/src/qtprintsupport-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -165,6 +165,19 @@
QTextEdit requires a QPrinter rather than a QPainter because it uses information
about the configured page dimensions in order to insert page breaks at the most
appropriate places in printed documents.
+
+ \section1 Licenses and Trademarks
+
+ The Qt Print Support module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
+
+ Please note that Adobe\reg places restrictions on the use of its trademarks
+ (including logos) in conjunction with PDF; e.g. "Adobe PDF". Please refer
+ to \l{http://www.adobe.com}{www.adobe.com} for guidelines.
*/
/*!
diff --git a/src/widgets/doc/src/qtwidgets-index.qdoc b/src/widgets/doc/src/qtwidgets-index.qdoc
index 7cd1c8d735..1a23d172dd 100644
--- a/src/widgets/doc/src/qtwidgets-index.qdoc
+++ b/src/widgets/doc/src/qtwidgets-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -128,6 +128,15 @@ interfaces
\image graphicsview-items.png
+ \section1 Licenses
+
+ The Qt Widgets module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
+
\section1 Related Information
\section2 Tutorials
diff --git a/src/xml/doc/src/qtxml-index.qdoc b/src/xml/doc/src/qtxml-index.qdoc
index eb35903756..91f2515d60 100644
--- a/src/xml/doc/src/qtxml-index.qdoc
+++ b/src/xml/doc/src/qtxml-index.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -45,4 +45,13 @@
The \l{Qt XML C++ Classes} page gives an overview over the available classes
in this module.
+
+ \section1 Licenses
+
+ The Qt XML module is available under commercial licenses from \l{The Qt Company}.
+ In addition, it is available under free software licenses. Since Qt 5.4,
+ these free software licenses are
+ \l{GNU Lesser General Public License, version 3}, or
+ the \l{GNU General Public License, version 2}.
+ See \l{Qt Licensing} for further details.
*/