summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-20 22:51:18 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-01-20 22:51:18 +0000
commit50e8acd06be8ca45cdf82f2a0ac66f0efd919c34 (patch)
tree54d496dd3be0a4002460c64259a8d251e8ef40d6 /src
parent1303327a713d8f88fd9782e4f887b646d4210f68 (diff)
parent739585b2f5684956d9c5b999300b4b7b2cd0daa3 (diff)
Merge "Merge remote-tracking branch 'origin/5.9' into 5.10" into refs/staging/5.10
Diffstat (limited to 'src')
-rw-r--r--src/corelib/doc/snippets/code/src_corelib_concurrent_qthreadpool.cpp2
-rw-r--r--src/corelib/doc/src/qtcore-index.qdoc7
-rw-r--r--src/corelib/io/qprocess_win.cpp3
-rw-r--r--src/corelib/io/qsettings.cpp5
-rw-r--r--src/gui/configure.json21
-rw-r--r--src/gui/doc/src/qtgui.qdoc5
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3theme.cpp17
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3theme.h2
-rw-r--r--src/plugins/styles/mac/qmacstyle_mac.mm8
-rw-r--r--src/sql/doc/src/qtsql.qdoc5
-rw-r--r--src/testlib/doc/src/qttest-index.qdoc5
-rw-r--r--src/widgets/kernel/qwidget.cpp3
12 files changed, 55 insertions, 28 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_concurrent_qthreadpool.cpp b/src/corelib/doc/snippets/code/src_corelib_concurrent_qthreadpool.cpp
index a1372976ae..ba31972aa1 100644
--- a/src/corelib/doc/snippets/code/src_corelib_concurrent_qthreadpool.cpp
+++ b/src/corelib/doc/snippets/code/src_corelib_concurrent_qthreadpool.cpp
@@ -55,7 +55,7 @@ class HelloWorldTask : public QRunnable
{
qDebug() << "Hello world from thread" << QThread::currentThread();
}
-}
+};
HelloWorldTask *hello = new HelloWorldTask();
// QThreadPool takes ownership and deletes 'hello' automatically
diff --git a/src/corelib/doc/src/qtcore-index.qdoc b/src/corelib/doc/src/qtcore-index.qdoc
index 9004c018ed..04af0e9416 100644
--- a/src/corelib/doc/src/qtcore-index.qdoc
+++ b/src/corelib/doc/src/qtcore-index.qdoc
@@ -104,17 +104,18 @@
\section1 Licenses and Attributions
Qt Core is available under commercial licenses from \l{The Qt Company}.
- In addition, it is available under the
+ 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.
Executables on Windows potentially link
against \l{The qtmain Library}. This library is available
- under commercial licenses, and in addition under the
+ under commercial licenses and also under the
\l{BSD 3-clause "New" or "Revised" License}.
- Furthermore Qt Core potentially contains third party
+ Furthermore, Qt Core in Qt \QtVersion may contain third party
modules under following permissive licenses:
\generatelist{groupsbymodule attributions-qtcore}
diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp
index 8da6d6b16e..e19d45841f 100644
--- a/src/corelib/io/qprocess_win.cpp
+++ b/src/corelib/io/qprocess_win.cpp
@@ -101,7 +101,8 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
unsigned int attempts = 1000;
forever {
_snwprintf(pipeName, sizeof(pipeName) / sizeof(pipeName[0]),
- L"\\\\.\\pipe\\qt-%X", QRandomGenerator::global()->generate());
+ L"\\\\.\\pipe\\qt-%lX-%X", long(QCoreApplication::applicationPid()),
+ QRandomGenerator::global()->generate());
DWORD dwOpenMode = FILE_FLAG_OVERLAPPED;
DWORD dwOutputBufferSize = 0;
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index bbc66120b5..4b1b9888d8 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2366,6 +2366,11 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
limitations is to store the settings using the IniFormat
instead of the NativeFormat.
+ \li On Windows, when the Windows system registry is used, QSettings
+ does not preserve the original type of the value. Therefore,
+ the type of the value might change when a new value is set. For
+ example, a value with type \c REG_EXPAND_SZ will change to \c REG_SZ.
+
\li On \macos and iOS, allKeys() will return some extra keys for global
settings that apply to all applications. These keys can be
read using value() but cannot be changed, only shadowed.
diff --git a/src/gui/configure.json b/src/gui/configure.json
index a7f08f2cc0..dab66fafb4 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -166,25 +166,20 @@
"label": "Fontconfig",
"test": {
"head": [
- "#include <ft2build.h>",
- "#include FT_FREETYPE_H",
"#include <fontconfig/fontconfig.h>",
"#ifndef FC_RGBA_UNKNOWN",
"# error This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define",
- "#endif",
- "#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20110)",
- "# error This version of freetype is too old.",
"#endif"
],
"main": [
- "FT_Face face = 0;",
"FcPattern *pattern = 0;"
]
},
"sources": [
- { "type": "pkgConfig", "args": "fontconfig freetype2" },
- { "type": "freetype", "libs": "-lfontconfig -lfreetype" }
- ]
+ { "type": "pkgConfig", "args": "fontconfig" },
+ { "type": "freetype", "libs": "-lfontconfig" }
+ ],
+ "use": "freetype"
},
"gbm": {
"label": "GBM",
@@ -612,7 +607,13 @@
"angle_d3d11_qdtd": {
"label": "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT",
"type": "compile",
- "test": "win/angle_d3d11_qdtd"
+ "test": {
+ "include": "d3d11.h",
+ "main": [
+ "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT qdtd;",
+ "(void) qdtd;"
+ ]
+ }
},
"directwrite2": {
"label": "DirectWrite 2",
diff --git a/src/gui/doc/src/qtgui.qdoc b/src/gui/doc/src/qtgui.qdoc
index da3d419735..010659df8c 100644
--- a/src/gui/doc/src/qtgui.qdoc
+++ b/src/gui/doc/src/qtgui.qdoc
@@ -215,12 +215,13 @@
\section1 Licenses and Attributions
Qt GUI is available under commercial licenses from \l{The Qt Company}.
- In addition, it is available under the
+ 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.
- Furthermore Qt GUI potentially contains third party
+ Furthermore, Qt GUI in Qt \QtVersion may contain third-party
modules under following permissive licenses:
\generatelist{groupsbymodule attributions-qtgui}
diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
index 6447776f25..077955eb4e 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3theme.cpp
@@ -153,7 +153,7 @@ bool QGtk3Theme::usePlatformNativeDialog(DialogType type) const
case ColorDialog:
return true;
case FileDialog:
- return true;
+ return useNativeFileDialog();
case FontDialog:
return true;
default:
@@ -167,6 +167,8 @@ QPlatformDialogHelper *QGtk3Theme::createPlatformDialogHelper(DialogType type) c
case ColorDialog:
return new QGtk3ColorDialogHelper;
case FileDialog:
+ if (!useNativeFileDialog())
+ return nullptr;
return new QGtk3FileDialogHelper;
case FontDialog:
return new QGtk3FontDialogHelper;
@@ -185,4 +187,17 @@ QPlatformMenuItem* QGtk3Theme::createPlatformMenuItem() const
return new QGtk3MenuItem;
}
+bool QGtk3Theme::useNativeFileDialog()
+{
+ /* Require GTK3 >= 3.15.5 to avoid running into this bug:
+ * https://bugzilla.gnome.org/show_bug.cgi?id=725164
+ *
+ * While this bug only occurs when using widget-based file dialogs
+ * (native GTK3 dialogs are fine) we have to disable platform file
+ * dialogs entirely since we can't avoid creation of a platform
+ * dialog helper.
+ */
+ return gtk_check_version(3, 15, 5) == 0;
+}
+
QT_END_NAMESPACE
diff --git a/src/plugins/platformthemes/gtk3/qgtk3theme.h b/src/plugins/platformthemes/gtk3/qgtk3theme.h
index 52036680c6..abc5dbfd17 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3theme.h
+++ b/src/plugins/platformthemes/gtk3/qgtk3theme.h
@@ -59,6 +59,8 @@ public:
QPlatformMenuItem* createPlatformMenuItem() const Q_DECL_OVERRIDE;
static const char *name;
+private:
+ static bool useNativeFileDialog();
};
QT_END_NAMESPACE
diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm
index db02ab1fe9..1e68fbbc7a 100644
--- a/src/plugins/styles/mac/qmacstyle_mac.mm
+++ b/src/plugins/styles/mac/qmacstyle_mac.mm
@@ -3206,13 +3206,12 @@ void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPai
}
break;
case PE_IndicatorMenuCheckMark: {
- if (!(opt->state & State_On))
- break;
QColor pc;
- if (opt->state & State_Selected)
+ if (opt->state & State_On)
pc = opt->palette.highlightedText().color();
else
pc = opt->palette.text().color();
+
QCFType<CGColorRef> checkmarkColor = CGColorCreateGenericRGB(static_cast<CGFloat>(pc.redF()),
static_cast<CGFloat>(pc.greenF()),
static_cast<CGFloat>(pc.blueF()),
@@ -4208,8 +4207,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
const int xp = mi->rect.x() + macItemFrame;
checkmarkOpt.rect = QRect(xp, mi->rect.y() - checkmarkOpt.fontMetrics.descent(), mw, mh);
- checkmarkOpt.state |= State_On; // Always on. Never rendered when off.
- checkmarkOpt.state.setFlag(State_Selected, active);
+ checkmarkOpt.state.setFlag(State_On, active);
checkmarkOpt.state.setFlag(State_Enabled, enabled);
if (widgetSize == QStyleHelper::SizeMini)
checkmarkOpt.state |= State_Mini;
diff --git a/src/sql/doc/src/qtsql.qdoc b/src/sql/doc/src/qtsql.qdoc
index 56d714becf..f0d74739b0 100644
--- a/src/sql/doc/src/qtsql.qdoc
+++ b/src/sql/doc/src/qtsql.qdoc
@@ -54,12 +54,13 @@
\section1 Licenses and Attributions
Qt SQL is available under commercial licenses from \l{The Qt Company}.
- In addition, it is available under the
+ 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.
- Furthermore Qt SQL potentially contains third party
+ Furthermore, Qt SQL in Qt \QtVersion may contain third party
modules under following permissive licenses:
\generatelist{groupsbymodule attributions-qtsql}
diff --git a/src/testlib/doc/src/qttest-index.qdoc b/src/testlib/doc/src/qttest-index.qdoc
index 36ebfee463..f5b077e8e8 100644
--- a/src/testlib/doc/src/qttest-index.qdoc
+++ b/src/testlib/doc/src/qttest-index.qdoc
@@ -53,12 +53,13 @@
\section1 Licenses and Attributions
Qt Test is available under commercial licenses from \l{The Qt Company}.
- In addition, it is available under the
+ 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.
- Furthermore Qt Test potentially contains third party
+ Furthermore, Qt Test in Qt \QtVersion may contain third party
modules under following permissive licenses:
\generatelist{groupsbymodule attributions-qttestlib}
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 680c179bd9..a973bee2cd 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1482,7 +1482,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
if (q->windowType() != Qt::Desktop || q->testAttribute(Qt::WA_NativeWindow)) {
win->create();
// Enable nonclient-area events for QDockWidget and other NonClientArea-mouse event processing.
- win->handle()->setFrameStrutEventsEnabled(true);
+ if (QPlatformWindow *platformWindow = win->handle())
+ platformWindow->setFrameStrutEventsEnabled(true);
}
data.window_flags = win->flags();