Compare commits
202 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
70363d0880 | ||
|
d8f1d7a524 | ||
|
d727853314 | ||
|
6f111ade59 | ||
|
8d3281a25b | ||
|
c5ba3dc43e | ||
|
6cce1b1233 | ||
|
99a7b7e10d | ||
|
87d970c5d5 | ||
|
a5e651007c | ||
|
0424a8b5b0 | ||
|
048d2137d8 | ||
|
52cb5cfa20 | ||
|
fbe60f8d39 | ||
|
2dd29366d0 | ||
|
7cf1b36f2b | ||
|
dabefd25d8 | ||
|
3548249d39 | ||
|
159799f24f | ||
|
9c762bfb43 | ||
|
abb914b769 | ||
|
72b5ae0fbb | ||
|
8a09cd6061 | ||
|
dc07d438ad | ||
|
cc25be2271 | ||
|
c505c71283 | ||
|
7000161d93 | ||
|
9fe549303e | ||
|
afc1c75b83 | ||
|
92b82f31aa | ||
|
ae2a637c47 | ||
|
d3250a64e0 | ||
|
3e7f6f93e7 | ||
|
1a5c543723 | ||
|
a8ff550c93 | ||
|
f1bc0ab482 | ||
|
2b351acc1e | ||
|
0aaf400b7f | ||
|
d8c2c5870f | ||
|
f5dd303609 | ||
|
4cd8fce414 | ||
|
34c3c2ba7b | ||
|
4c3347e3d3 | ||
|
bce0c006e8 | ||
|
fe33bd0e36 | ||
|
a094a8d104 | ||
|
e56d897d9c | ||
|
4a376dc703 | ||
|
d20cffe9a3 | ||
|
8ed6ce04af | ||
|
98f737ba5a | ||
|
d48e9598d2 | ||
|
ff52a3eeb3 | ||
|
4ac28c2742 | ||
|
23d23a8648 | ||
|
eda8c137f0 | ||
|
87e0482736 | ||
|
5459b14733 | ||
|
18c4c30a44 | ||
|
6c00985827 | ||
|
17e492aa0e | ||
|
664255d3bd | ||
|
356f136cff | ||
|
5e08e4a080 | ||
|
f9210a726e | ||
|
035db48089 | ||
|
cd3afda23c | ||
|
6c76df9407 | ||
|
bfcd08470b | ||
|
31fe414dbc | ||
|
6468f9c079 | ||
|
aca5082db0 | ||
|
44dd86e85a | ||
|
e87d2cacce | ||
|
0fa4bb6e6d | ||
|
20a292f534 | ||
|
a258953f71 | ||
|
be940afb36 | ||
|
5cbfe51f81 | ||
|
507fe0eddd | ||
|
a2f4fa4db9 | ||
|
6120e659d6 | ||
|
923ba9b0e0 | ||
|
8cedb395cf | ||
|
4c963be10c | ||
|
ea12f0e1fa | ||
|
9c6d6cc34e | ||
|
44ae06a0f8 | ||
|
de67c0519d | ||
|
02252c5c62 | ||
|
16ef8031d1 | ||
|
e724321967 | ||
|
d1a6da43d9 | ||
|
6b4f3818b1 | ||
|
ae07984e4d | ||
|
bea0c40370 | ||
|
3a12929e93 | ||
|
3b3961f8ca | ||
|
9fc4b6e74c | ||
|
343ee6e998 | ||
|
bf5d04680b | ||
|
4f76b8e9ca | ||
|
82a0d13a63 | ||
|
192033814a | ||
|
6a8a1e7326 | ||
|
5811291b71 | ||
|
c34c751a6a | ||
|
e894279872 | ||
|
f46a671628 | ||
|
7db91a4ff0 | ||
|
6c50b4e107 | ||
|
69c9a202b6 | ||
|
30a91e380c | ||
|
ab9062576c | ||
|
831050302c | ||
|
46844ac115 | ||
|
a97a8f9163 | ||
|
921d3a65ee | ||
|
4c4bc81e4d | ||
|
241e6ae46d | ||
|
6162fbda3f | ||
|
b71fc696b2 | ||
|
8e24008f23 | ||
|
8b64b2c932 | ||
|
b632435fcc | ||
|
0fdcd4c059 | ||
|
a0cfc469aa | ||
|
58ddb0cb59 | ||
|
a74a9fa59b | ||
|
dfe5703894 | ||
|
a894d2cd44 | ||
|
7a9bc1bbea | ||
|
7b9849ffcd | ||
|
4e688c90a5 | ||
|
22adfb20d7 | ||
|
265a0921d9 | ||
|
f75707f390 | ||
|
4b715ffd1c | ||
|
8ea90037a5 | ||
|
e245437f7e | ||
|
8090378c80 | ||
|
d95935f332 | ||
|
6e2865a3af | ||
|
0844cd226c | ||
|
32769146b7 | ||
|
9ceb7d9081 | ||
|
efb85b9bff | ||
|
eaaaf190ea | ||
|
8c7fe210fe | ||
|
9e2e7ad9bd | ||
|
1a5fd22f91 | ||
|
fafeab55a2 | ||
|
cc493ddebb | ||
|
aeca857561 | ||
|
a5f6318646 | ||
|
e948ea4c6c | ||
|
5b7e8cc795 | ||
|
cf267c4766 | ||
|
bb48598d85 | ||
|
a98a18bb3d | ||
|
196284c991 | ||
|
18def91a7d | ||
|
c427cee2d7 | ||
|
7e2153e89a | ||
|
81d6fcc4ca | ||
|
91176c3fee | ||
|
bcf4f2e66c | ||
|
b1ba042d57 | ||
|
9cda374bc8 | ||
|
bd0ce1f91c | ||
|
4a3b9c7b60 | ||
|
f8d05dbeff | ||
|
28a55141fc | ||
|
a1a082e2ab | ||
|
55cdca6d74 | ||
|
15b5003df8 | ||
|
16b653ffe1 | ||
|
276e67ad3a | ||
|
0fba51827d | ||
|
399cc84ed6 | ||
|
8f0534f5ad | ||
|
06f985eaf7 | ||
|
3c0b29765a | ||
|
ca7cfd8532 | ||
|
e467920f91 | ||
|
ca2c23b106 | ||
|
0434621809 | ||
|
a0fe3d1ded | ||
|
f9b532b958 | ||
|
cdec2369b2 | ||
|
cf7a4e4e0b | ||
|
f8cf489ba4 | ||
|
8ddb897df6 | ||
|
8e2e39d5e1 | ||
|
614302efd8 | ||
|
abaad189b8 | ||
|
5a70834711 | ||
|
2485bf8e8a | ||
|
faab8215d7 | ||
|
643cc5becf | ||
|
1fcfee38a9 | ||
|
4d72c83364 |
12
.gitignore
vendored
12
.gitignore
vendored
@ -1,6 +1,6 @@
|
||||
/qtbase-opensource-src-5.5.1.tar.xz
|
||||
/qtbase-opensource-src-5.6.0-beta.tar.gz
|
||||
/qtbase-opensource-src-5.6.0-rc.tar.xz
|
||||
/sources
|
||||
/qtbase-opensource-src-5.6.0.tar.xz
|
||||
/qtbase-opensource-src-5.6.1.tar.xz
|
||||
/qtbase-everywhere-src-5.12.1.tar.xz
|
||||
/qtbase-everywhere-src-5.12.3.tar.xz
|
||||
/qtbase-everywhere-src-5.12.4.tar.xz
|
||||
/qtbase-everywhere-src-5.12.5.tar.xz
|
||||
/qtbase-everywhere-src-5.13.2.tar.xz
|
||||
/qtbase-everywhere-src-5.14.2.tar.xz
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 46f1c4c86bbfe7b6917907700bec998626ad4a8b Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Volkov <a.volkov@rusbitech.ru>
|
||||
Date: Wed, 11 May 2016 18:42:24 +0300
|
||||
Subject: [PATCH 001/178] xcb: Properly interpret data.l[0] field of XdndStatus
|
||||
message
|
||||
|
||||
The standard https://freedesktop.org/wiki/Specifications/XDND/
|
||||
states: "In order for the proxy window to behave correctly, the
|
||||
appropriate field of the client messages, window or data.l[0],
|
||||
must contain the ID of the window in which the mouse is located,
|
||||
not the proxy window that is receiving the messages."
|
||||
|
||||
So compare it with the current target window instead of the
|
||||
current proxy window.
|
||||
|
||||
Change-Id: Ie31fd3aeadebcf5a9be7b9a9194f35a4ec7bdebb
|
||||
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbdrag.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
index 6fa5dfa..f93e420 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||
@@ -829,7 +829,7 @@ void QXcbDrag::handle_xdnd_status(const xcb_client_message_event_t *event)
|
||||
DEBUG("xdndHandleStatus");
|
||||
waiting_for_status = false;
|
||||
// ignore late status messages
|
||||
- if (event->data.data32[0] && event->data.data32[0] != current_proxy_target)
|
||||
+ if (event->data.data32[0] && event->data.data32[0] != current_target)
|
||||
return;
|
||||
|
||||
const bool dropPossible = event->data.data32[1];
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 2852a8b87e3a8ed95b72d26b0e180b7fd4491cf3 Mon Sep 17 00:00:00 2001
|
||||
From: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
|
||||
Date: Fri, 26 Feb 2016 11:53:01 -0800
|
||||
Subject: [PATCH 011/178] XCB: Auto-detect xcb-glx also with xcb-qt
|
||||
|
||||
Task-number: QTBUG-43784
|
||||
Change-Id: Iaa0388e34900f6241db8cd864caed4fb6fc32819
|
||||
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
||||
---
|
||||
configure | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index ce5b9c2..a481981 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5555,6 +5555,11 @@ if [ "$CFG_XCB" != "no" ]; then
|
||||
|
||||
if [ "$CFG_XCB" = "qt" ]; then
|
||||
QT_CONFIG="$QT_CONFIG xcb-qt"
|
||||
+
|
||||
+ if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
|
||||
+ CFG_XCB_GLX=yes
|
||||
+ QT_CONFIG="$QT_CONFIG xcb-glx"
|
||||
+ fi
|
||||
else
|
||||
CFG_XCB="system"
|
||||
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,78 +0,0 @@
|
||||
From 1108291e1a2e7de23440c2b36b2fd31010ae3f51 Mon Sep 17 00:00:00 2001
|
||||
From: Urs Fleisch <ufleisch@users.sourceforge.net>
|
||||
Date: Tue, 3 May 2016 20:01:01 +0200
|
||||
Subject: [PATCH 032/178] xcb: Fix drop of text/uri-list and text/html.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
When dropping URLs from Firefox or Chrome, the contents are encoded as
|
||||
UTF16, but not correctly decoded. Moreover, the special handling of
|
||||
"text/x-moz-url" drops does not work because this format is converted to
|
||||
"text/uri-list" before. This fixes the handling for URL list and also
|
||||
for UTF16 "text/html".
|
||||
|
||||
Task-number: QTBUG-47981
|
||||
Change-Id: I1153f21ede07b2bfe4d104e0fe8bc8487ec5c165
|
||||
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbmime.cpp | 42 +++++++++++++++++++++++++---------
|
||||
1 file changed, 31 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
index eeac561..cef2210 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
@@ -182,17 +182,37 @@ QVariant QXcbMime::mimeConvertToFormat(QXcbConnection *connection, xcb_atom_t a,
|
||||
a == connection->atom(QXcbAtom::TEXT))
|
||||
return QString::fromLatin1(data);
|
||||
}
|
||||
-
|
||||
- // special case for uri types
|
||||
- if (format == QLatin1String("text/uri-list")) {
|
||||
- if (atomName == QLatin1String("text/x-moz-url")) {
|
||||
- // we expect this as utf16 <url><space><title>
|
||||
- // the first part is a url that should only contain ascci char
|
||||
- // so it should be safe to check that the second char is 0
|
||||
- // to verify that it is utf16
|
||||
- if (data.size() > 1 && data.at(1) == 0)
|
||||
- return QString::fromRawData((const QChar *)data.constData(),
|
||||
- data.size() / 2).split(QLatin1Char('\n')).first().toLatin1();
|
||||
+ // If data contains UTF16 text, convert it to a string.
|
||||
+ // Firefox uses UTF16 without BOM for text/x-moz-url, "text/html",
|
||||
+ // Google Chrome uses UTF16 without BOM for "text/x-moz-url",
|
||||
+ // UTF16 with BOM for "text/html".
|
||||
+ if ((format == QLatin1String("text/html") || format == QLatin1String("text/uri-list"))
|
||||
+ && data.size() > 1) {
|
||||
+ const quint8 byte0 = data.at(0);
|
||||
+ const quint8 byte1 = data.at(1);
|
||||
+ if ((byte0 == 0xff && byte1 == 0xfe) || (byte0 == 0xfe && byte1 == 0xff)
|
||||
+ || (byte0 != 0 && byte1 == 0) || (byte0 == 0 && byte1 != 0)) {
|
||||
+ const QString str = QString::fromUtf16(
|
||||
+ reinterpret_cast<const ushort *>(data.constData()), data.size() / 2);
|
||||
+ if (!str.isNull()) {
|
||||
+ if (format == QLatin1String("text/uri-list")) {
|
||||
+ const QStringList urls = str.split(QLatin1Char('\n'));
|
||||
+ QList<QVariant> list;
|
||||
+ foreach (const QString &s, urls) {
|
||||
+ const QUrl url(s.trimmed());
|
||||
+ if (url.isValid())
|
||||
+ list.append(url);
|
||||
+ }
|
||||
+ // We expect "text/x-moz-url" as <url><space><title>.
|
||||
+ // The atomName variable is not used because mimeAtomToString()
|
||||
+ // converts "text/x-moz-url" to "text/uri-list".
|
||||
+ if (!list.isEmpty() && connection->atomName(a) == "text/x-moz-url")
|
||||
+ return list.first();
|
||||
+ return list;
|
||||
+ } else {
|
||||
+ return str;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,58 +0,0 @@
|
||||
From f162e29acca99aaab173fb323d112aad9ec6c2b5 Mon Sep 17 00:00:00 2001
|
||||
From: Urs Fleisch <ufleisch@users.sourceforge.net>
|
||||
Date: Wed, 4 May 2016 19:47:16 +0200
|
||||
Subject: [PATCH 033/178] xcb: Fix dropping URL on Firefox window.
|
||||
|
||||
When a URL is dropped on a Firefox window, the "text/x-moz-url" data
|
||||
takes precedence over the "text/uri-list". The "text/x-moz-url" is
|
||||
interpreted as UTF16, however, the data from Qt 5 applications is not
|
||||
in the correct format. The code to create correct UTF16 data exists,
|
||||
but it is not called for two reasons: The atomName will never be
|
||||
"text/x-moz-url" because it is changed to "text/uri-list" by
|
||||
mimeAtomToString() and the InternalMimeData::hasFormatHelper() case is
|
||||
already handled above and the else part will never be considered.
|
||||
This patch fixes the check and brings it into the right order.
|
||||
|
||||
Task-number: QTBUG-49947
|
||||
Change-Id: I5ebd31914cc6c1417c513c1ff09e0e858a16915d
|
||||
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbmime.cpp | 19 ++++++++++---------
|
||||
1 file changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbmime.cpp b/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
index cef2210..7fea068 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbmime.cpp
|
||||
@@ -111,17 +111,18 @@ bool QXcbMime::mimeDataForAtom(QXcbConnection *connection, xcb_atom_t a, QMimeDa
|
||||
QString atomName = mimeAtomToString(connection, a);
|
||||
if (QInternalMimeData::hasFormatHelper(atomName, mimeData)) {
|
||||
*data = QInternalMimeData::renderDataHelper(atomName, mimeData);
|
||||
- if (atomName == QLatin1String("application/x-color"))
|
||||
+ // mimeAtomToString() converts "text/x-moz-url" to "text/uri-list",
|
||||
+ // so QXcbConnection::atomName() has to be used.
|
||||
+ if (atomName == QLatin1String("text/uri-list")
|
||||
+ && connection->atomName(a) == "text/x-moz-url") {
|
||||
+ const QByteArray uri = data->split('\n').first();
|
||||
+ QString mozUri = QString::fromLatin1(uri, uri.size());
|
||||
+ mozUri += QLatin1Char('\n');
|
||||
+ *data = QByteArray(reinterpret_cast<const char *>(mozUri.utf16()),
|
||||
+ mozUri.length() * 2);
|
||||
+ } else if (atomName == QLatin1String("application/x-color"))
|
||||
*dataFormat = 16;
|
||||
ret = true;
|
||||
- } else if (atomName == QLatin1String("text/x-moz-url") &&
|
||||
- QInternalMimeData::hasFormatHelper(QLatin1String("text/uri-list"), mimeData)) {
|
||||
- QByteArray uri = QInternalMimeData::renderDataHelper(
|
||||
- QLatin1String("text/uri-list"), mimeData).split('\n').first();
|
||||
- QString mozUri = QString::fromLatin1(uri, uri.size());
|
||||
- mozUri += QLatin1Char('\n');
|
||||
- *data = QByteArray(reinterpret_cast<const char *>(mozUri.utf16()), mozUri.length() * 2);
|
||||
- ret = true;
|
||||
} else if ((a == XCB_ATOM_PIXMAP || a == XCB_ATOM_BITMAP) && mimeData->hasImage()) {
|
||||
ret = true;
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
|
109
0044-QLibrary-fix-deadlock-caused-by-fix-to-QTBUG-39642.patch
Normal file
109
0044-QLibrary-fix-deadlock-caused-by-fix-to-QTBUG-39642.patch
Normal file
@ -0,0 +1,109 @@
|
||||
From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Thu, 2 Apr 2020 12:08:41 -0300
|
||||
Subject: [PATCH 44/49] QLibrary: fix deadlock caused by fix to QTBUG-39642
|
||||
|
||||
Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around
|
||||
the entire load_sys(). We had reasoed that deadlocks would only occur if
|
||||
the object creation in instance() recursed into its own instance(),
|
||||
which was already a bug. But we had forgotten that dlopen()/
|
||||
LoadLibrary() executes initialization code from the module being loaded,
|
||||
which could cause a recursion back into the same QPluginLoader or
|
||||
QLibrary object. This recursion is benign because the module *is* loaded
|
||||
and dlopen()/LoadLibrary() returns the same handle.
|
||||
|
||||
[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that
|
||||
would happen if the plugin or library being loaded has load-time
|
||||
initialization code (C++ global variables) that recursed back into the
|
||||
same QLibrary or QPluginLoader object.
|
||||
|
||||
PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex
|
||||
lock, so pluginState should be made an atomic variable. Once that is
|
||||
done, we'll only need locking the mutex to update errorString (no
|
||||
locking before loading).
|
||||
|
||||
Fixes: QTBUG-83207
|
||||
Task-number: QTBUG-39642
|
||||
Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||
---
|
||||
src/corelib/plugin/qlibrary.cpp | 2 --
|
||||
src/corelib/plugin/qlibrary_unix.cpp | 4 ++++
|
||||
src/corelib/plugin/qlibrary_win.cpp | 3 +++
|
||||
3 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
|
||||
index ddb053c26f..be9d92b204 100644
|
||||
--- a/src/corelib/plugin/qlibrary.cpp
|
||||
+++ b/src/corelib/plugin/qlibrary.cpp
|
||||
@@ -576,9 +576,7 @@ bool QLibraryPrivate::load()
|
||||
|
||||
Q_TRACE(QLibraryPrivate_load_entry, fileName);
|
||||
|
||||
- mutex.lock();
|
||||
bool ret = load_sys();
|
||||
- mutex.unlock();
|
||||
if (qt_debug_component()) {
|
||||
if (ret) {
|
||||
qDebug() << "loaded library" << fileName;
|
||||
diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp
|
||||
index 017aa97b66..a5c72f81d9 100644
|
||||
--- a/src/corelib/plugin/qlibrary_unix.cpp
|
||||
+++ b/src/corelib/plugin/qlibrary_unix.cpp
|
||||
@@ -123,6 +123,7 @@ QStringList QLibraryPrivate::prefixes_sys()
|
||||
|
||||
bool QLibraryPrivate::load_sys()
|
||||
{
|
||||
+ QMutexLocker locker(&mutex);
|
||||
QString attempt;
|
||||
QFileSystemEntry fsEntry(fileName);
|
||||
|
||||
@@ -213,6 +214,7 @@ bool QLibraryPrivate::load_sys()
|
||||
}
|
||||
#endif
|
||||
|
||||
+ locker.unlock();
|
||||
bool retry = true;
|
||||
Handle hnd = nullptr;
|
||||
for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) {
|
||||
@@ -273,6 +275,8 @@ bool QLibraryPrivate::load_sys()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ locker.relock();
|
||||
if (!hnd) {
|
||||
errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror());
|
||||
}
|
||||
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
|
||||
index 000bf76276..ef58724be8 100644
|
||||
--- a/src/corelib/plugin/qlibrary_win.cpp
|
||||
+++ b/src/corelib/plugin/qlibrary_win.cpp
|
||||
@@ -78,6 +78,7 @@ bool QLibraryPrivate::load_sys()
|
||||
// fileName
|
||||
//
|
||||
// NB If it's a plugin we do not ever try the ".dll" extension
|
||||
+ QMutexLocker locker(&mutex);
|
||||
QStringList attempts;
|
||||
|
||||
if (pluginState != IsAPlugin)
|
||||
@@ -95,6 +96,7 @@ bool QLibraryPrivate::load_sys()
|
||||
attempts.prepend(QDir::rootPath() + fileName);
|
||||
#endif
|
||||
|
||||
+ locker.unlock();
|
||||
Handle hnd = nullptr;
|
||||
for (const QString &attempt : qAsConst(attempts)) {
|
||||
#ifndef Q_OS_WINRT
|
||||
@@ -115,6 +117,7 @@ bool QLibraryPrivate::load_sys()
|
||||
#ifndef Q_OS_WINRT
|
||||
SetErrorMode(oldmode);
|
||||
#endif
|
||||
+ locker.relock();
|
||||
if (!hnd) {
|
||||
errorString = QLibrary::tr("Cannot load library %1: %2").arg(
|
||||
QDir::toNativeSeparators(fileName), qt_error_string());
|
||||
--
|
||||
2.25.2
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 76810e1495b65a09e9abd6164639e0caf34d61b8 Mon Sep 17 00:00:00 2001
|
||||
From: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
||||
Date: Fri, 20 May 2016 14:52:18 +0200
|
||||
Subject: [PATCH 148/178] xcb: Disable GLX pbuffers with Chromium in VMs
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Change-Id: I474e4a4ce424a92b46381eb26aeda811ed059819
|
||||
Task-number: QTCREATORBUG-16252
|
||||
Task-number: QTCREATORBUG-14937
|
||||
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
|
||||
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
|
||||
---
|
||||
.../platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
|
||||
index a3a8aa2..55d0ff3 100644
|
||||
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
|
||||
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.cpp
|
||||
@@ -201,8 +201,10 @@ QPlatformOffscreenSurface *QXcbGlxIntegration::createPlatformOffscreenSurface(QO
|
||||
display = static_cast<Display *>(m_connection->xlib_display());
|
||||
#endif
|
||||
const char *glxvendor = glXGetClientString(display, GLX_VENDOR);
|
||||
- if (glxvendor && !strcmp(glxvendor, "ATI"))
|
||||
- glxPbufferUsable = false;
|
||||
+ if (glxvendor) {
|
||||
+ if (!strcmp(glxvendor, "ATI") || !strcmp(glxvendor, "Chromium"))
|
||||
+ glxPbufferUsable = false;
|
||||
+ }
|
||||
}
|
||||
if (glxPbufferUsable)
|
||||
return new QGLXPbuffer(surface);
|
||||
--
|
||||
2.7.4
|
||||
|
@ -1,64 +0,0 @@
|
||||
From 4762fabce16c611f12542a48b0dd31b3cec8e530 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl>
|
||||
Date: Thu, 14 Apr 2016 13:20:23 +0200
|
||||
Subject: [PATCH 155/178] xcb: Fix transient parent and "Qt::Window" flag
|
||||
|
||||
Don't set transient parent property when Qt::Window flag is set.
|
||||
Delete transient parent property if a window doesn't have a transient parent.
|
||||
Force setting standard window flags for Qt::Window only if there are no other
|
||||
flags.
|
||||
|
||||
Amends 98c10a02c5b77e023471ad6993dc66b013889cfb
|
||||
|
||||
Task-number: QTBUG-52550
|
||||
Change-Id: I68ee715b632487e9dd0e7ffbbfc0c2cdd0f0e151
|
||||
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbwindow.cpp | 16 ++++++++++------
|
||||
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
index 429ba8d..0c2f0d7 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
@@ -821,9 +821,9 @@ void QXcbWindow::show()
|
||||
propagateSizeHints();
|
||||
|
||||
// update WM_TRANSIENT_FOR
|
||||
- const QWindow *tp = window()->transientParent();
|
||||
- if (isTransient(window()) || tp != 0) {
|
||||
- xcb_window_t transientXcbParent = 0;
|
||||
+ xcb_window_t transientXcbParent = 0;
|
||||
+ if (isTransient(window())) {
|
||||
+ const QWindow *tp = window()->transientParent();
|
||||
if (tp && tp->handle())
|
||||
transientXcbParent = static_cast<const QXcbWindow *>(tp->handle())->winId();
|
||||
// Default to client leader if there is no transient parent, else modal dialogs can
|
||||
@@ -836,6 +836,8 @@ void QXcbWindow::show()
|
||||
1, &transientXcbParent));
|
||||
}
|
||||
}
|
||||
+ if (!transientXcbParent)
|
||||
+ Q_XCB_CALL(xcb_delete_property(xcb_connection(), m_window, XCB_ATOM_WM_TRANSIENT_FOR));
|
||||
|
||||
// update _MOTIF_WM_HINTS
|
||||
updateMotifWmHintsBeforeMap();
|
||||
@@ -1195,9 +1197,11 @@ void QXcbWindow::setMotifWindowFlags(Qt::WindowFlags flags)
|
||||
mwmhints.flags |= MWM_HINTS_DECORATIONS;
|
||||
|
||||
bool customize = flags & Qt::CustomizeWindowHint;
|
||||
- if (type == Qt::Window && !customize)
|
||||
- flags |= Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
|
||||
-
|
||||
+ if (type == Qt::Window && !customize) {
|
||||
+ const Qt::WindowFlags defaultFlags = Qt::WindowSystemMenuHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
|
||||
+ if (!(flags & defaultFlags))
|
||||
+ flags |= defaultFlags;
|
||||
+ }
|
||||
if (!(flags & Qt::FramelessWindowHint) && !(customize && !(flags & Qt::WindowTitleHint))) {
|
||||
mwmhints.decorations |= MWM_DECOR_BORDER;
|
||||
mwmhints.decorations |= MWM_DECOR_RESIZEH;
|
||||
--
|
||||
2.7.4
|
||||
|
35
macros.qt5
35
macros.qt5
@ -1,35 +0,0 @@
|
||||
%_qt5 @@NAME@@
|
||||
%_qt5_epoch @@EPOCH@@
|
||||
%_qt5_version @@VERSION@@
|
||||
%_qt5_evr @@EVR@@
|
||||
%_qt5_prefix %{_libdir}/qt5
|
||||
%_qt5_archdatadir %{_qt5_prefix}
|
||||
%_qt5_bindir %{_qt5_prefix}/bin
|
||||
%_qt5_datadir %{_datadir}/qt5
|
||||
%_qt5_docdir %{_docdir}/qt5
|
||||
%_qt5_examplesdir %{_qt5_prefix}/examples
|
||||
%_qt5_headerdir %{_includedir}/qt5
|
||||
%_qt5_importdir %{_qt5_archdatadir}/imports
|
||||
%_qt5_libdir %{_libdir}
|
||||
%_qt5_libexecdir %{_qt5_archdatadir}/libexec
|
||||
%_qt5_plugindir %{_qt5_archdatadir}/plugins
|
||||
%_qt5_qmake %{_qt5_bindir}/qmake
|
||||
%_qt5_settingsdir %{_sysconfdir}/xdg
|
||||
%_qt5_sysconfdir %{_qt5_settingsdir}
|
||||
%_qt5_translationdir %{_datadir}/qt5/translations
|
||||
|
||||
%_qt5_cflags %{nil}@@QT5_CFLAGS@@
|
||||
%_qt5_cxxflags %{nil}@@QT5_CXXFLAGS@@
|
||||
%_qt5_ldflags %{nil}%{?__global_ldflags} @@QT5_RPM_LD_FLAGS@@
|
||||
%_qt5_optflags %{optflags} @@QT5_RPM_OPT_FLAGS@@
|
||||
|
||||
%_qt5_qmake_flags \\\
|
||||
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%{_qt5_optflags} %{?_qt5_cflags}}" \\\
|
||||
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%{_qt5_optflags} %{?_qt5_cflags}}" \\\
|
||||
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%{_qt5_optflags} %{?_qt5_cxxflags}}" \\\
|
||||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%{_qt5_optflags} %{?_qt5_cxxflags}}" \\\
|
||||
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{_qt5_ldflags}}" \\\
|
||||
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{_qt5_ldflags}}" \\\
|
||||
QMAKE_STRIP=
|
||||
|
||||
%qmake_qt5 %{_qt5_qmake} %{?_qt5_qmake_flags}
|
4
macros.qt5-qtbase
Normal file
4
macros.qt5-qtbase
Normal file
@ -0,0 +1,4 @@
|
||||
%_qt5 @@NAME@@
|
||||
%_qt5_epoch @@EPOCH@@
|
||||
%_qt5_version @@VERSION@@
|
||||
%_qt5_evr @@EVR@@
|
@ -1,368 +0,0 @@
|
||||
From fa0d02eedcacc22db1026b902801b29176755362 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Macieira <thiago.macieira@intel.com>
|
||||
Date: Fri, 21 Aug 2015 17:08:19 -0700
|
||||
Subject: [PATCH] moc: get the system #defines from the compiler itself
|
||||
|
||||
In order for moc to properly parse #ifdefs and family, we've had
|
||||
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
|
||||
compiler. That list is woefully incomplete.
|
||||
|
||||
Instead, let's simply ask the compiler for the list. With GCC and
|
||||
family, we use the -dM flag while preprocessing. With ICC on Windows,
|
||||
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
|
||||
requires using some undocumented switches and parsing environment
|
||||
variables (I've tested MSVC 2012, 2013 and 2015).
|
||||
|
||||
The new moc option is called --include to be similar to GCC's -include
|
||||
option. It does more than just parse a list of pre-defined macros and
|
||||
can be used to insert any sort of code that moc needs to parse prior to
|
||||
the main file.
|
||||
|
||||
Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
|
||||
---
|
||||
mkspecs/features/moc.prf | 31 +++++++++++++--
|
||||
qmake/main.cpp | 38 +++++++++++++++++++
|
||||
src/tools/moc/main.cpp | 16 +++++++-
|
||||
src/tools/moc/preprocessor.cpp | 60 +++++++++++++++++-------------
|
||||
src/tools/moc/preprocessor.h | 1 +
|
||||
tests/auto/tools/moc/subdir/extradefines.h | 1 +
|
||||
tests/auto/tools/moc/tst_moc.cpp | 42 +++++++++++++++++++++
|
||||
7 files changed, 158 insertions(+), 31 deletions(-)
|
||||
create mode 100644 tests/auto/tools/moc/subdir/extradefines.h
|
||||
|
||||
diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf
|
||||
index c0b5682..af885c3 100644
|
||||
--- a/mkspecs/features/moc.prf
|
||||
+++ b/mkspecs/features/moc.prf
|
||||
@@ -24,8 +24,25 @@ win32:count(MOC_INCLUDEPATH, 40, >) {
|
||||
write_file($$absolute_path($$WIN_INCLUDETEMP, $$OUT_PWD), WIN_INCLUDETEMP_CONT)|error("Aborting.")
|
||||
}
|
||||
|
||||
+# QNX's compiler sets "gcc" config, but does not support the -dM option;
|
||||
+# iOS builds are multi-arch, so this feature cannot possibly work.
|
||||
+if(gcc|intel_icl|msvc):!rim_qcc:!ios {
|
||||
+ moc_predefs.CONFIG = no_link
|
||||
+ gcc: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -dM -E -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
+ else:intel_icl: moc_predefs.commands = $$QMAKE_CXX $$QMAKE_CXXFLAGS -QdM -P -Fi${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
|
||||
+ else:msvc {
|
||||
+ # make sure that our bin dir is first in path, so qmake is found
|
||||
+ moc_predefs.commands = PATH $$shell_path($$[QT_INSTALL_BINS/src]);%PATH%&
|
||||
+ moc_predefs.commands += $$QMAKE_CXX -Bxqmake $$QMAKE_CXXFLAGS -E ${QMAKE_FILE_IN} 2>NUL >${QMAKE_FILE_OUT}
|
||||
+ } else: error("Oops, I messed up")
|
||||
+ moc_predefs.output = $$MOC_DIR/moc_predefs.h
|
||||
+ moc_predefs.input = MOC_PREDEF_FILE
|
||||
+ silent: moc_predefs.commands = @echo generating $$moc_predefs.output$$escape_expand(\n\t)@$$moc_predefs.commands
|
||||
+ QMAKE_EXTRA_COMPILERS += moc_predefs
|
||||
+ MOC_PREDEF_FILE = $$[QT_HOST_DATA/src]/mkspecs/features/data/dummy.cpp
|
||||
+}
|
||||
+
|
||||
defineReplace(mocCmdBase) {
|
||||
- RET =
|
||||
!isEmpty(WIN_INCLUDETEMP) {
|
||||
incvar = @$$WIN_INCLUDETEMP
|
||||
} else {
|
||||
@@ -34,7 +51,13 @@ defineReplace(mocCmdBase) {
|
||||
incvar += -I$$shell_quote($$inc)
|
||||
incvar += $$QMAKE_FRAMEWORKPATH_FLAGS
|
||||
}
|
||||
- RET += $$QMAKE_MOC $(DEFINES) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$incvar $$QMAKE_MOC_OPTIONS
|
||||
+
|
||||
+ RET = $$QMAKE_MOC $(DEFINES)
|
||||
+
|
||||
+ isEmpty(MOC_PREDEF_FILE): RET += $$join(QMAKE_COMPILER_DEFINES, " -D", -D)
|
||||
+ else: RET += --include $$moc_predefs.output
|
||||
+
|
||||
+ RET += $$incvar $$QMAKE_MOC_OPTIONS
|
||||
return($$RET)
|
||||
}
|
||||
|
||||
@@ -46,7 +69,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK
|
||||
moc_header.input = HEADERS
|
||||
moc_header.variable_out = SOURCES
|
||||
moc_header.name = MOC ${QMAKE_FILE_IN}
|
||||
-moc_header.depends += $$WIN_INCLUDETEMP
|
||||
+moc_header.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
|
||||
silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands
|
||||
QMAKE_EXTRA_COMPILERS += moc_header
|
||||
INCREDIBUILD_XGE += moc_header
|
||||
@@ -58,7 +81,7 @@ moc_source.commands = ${QMAKE_FUNC_mocCmdBase} ${QMAKE_FILE_IN} -o ${QMAKE_FILE_
|
||||
moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC}
|
||||
moc_source.input = SOURCES OBJECTIVE_SOURCES
|
||||
moc_source.name = MOC ${QMAKE_FILE_IN}
|
||||
-moc_source.depends += $$WIN_INCLUDETEMP
|
||||
+moc_source.depends += $$WIN_INCLUDETEMP $$moc_predefs.output
|
||||
silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands
|
||||
QMAKE_EXTRA_COMPILERS += moc_source
|
||||
INCREDIBUILD_XGE += moc_source
|
||||
diff --git a/qmake/main.cpp b/qmake/main.cpp
|
||||
index bde537d..e9b8bde 100644
|
||||
--- a/qmake/main.cpp
|
||||
+++ b/qmake/main.cpp
|
||||
@@ -1,6 +1,7 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2015 The Qt Company Ltd.
|
||||
+** Copyright (C) 2015 Intel Corporation.
|
||||
** Contact: http://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the qmake application of the Qt Toolkit.
|
||||
@@ -47,6 +48,10 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
+#ifdef Q_OS_WIN
|
||||
+# include <qt_windows.h>
|
||||
+#endif
|
||||
+
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
@@ -246,6 +251,30 @@ static int doInstall(int argc, char **argv)
|
||||
return 3;
|
||||
}
|
||||
|
||||
+static int dumpMacros(const wchar_t *cmdline)
|
||||
+{
|
||||
+ // from http://stackoverflow.com/questions/3665537/how-to-find-out-cl-exes-built-in-macros
|
||||
+ int argc;
|
||||
+ wchar_t **argv = CommandLineToArgvW(cmdline, &argc);
|
||||
+ if (!argv)
|
||||
+ return 2;
|
||||
+ for (int i = 0; i < argc; ++i) {
|
||||
+ if (argv[i][0] != L'-' || argv[i][1] != 'D')
|
||||
+ continue;
|
||||
+
|
||||
+ wchar_t *value = wcschr(argv[i], L'=');
|
||||
+ if (value) {
|
||||
+ *value = 0;
|
||||
+ ++value;
|
||||
+ } else {
|
||||
+ // point to the NUL at the end, so we don't print anything
|
||||
+ value = argv[i] + wcslen(argv[i]);
|
||||
+ }
|
||||
+ wprintf(L"#define %Ls %Ls\n", argv[i] + 2, value);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
/* This is to work around lame implementation on Darwin. It has been noted that the getpwd(3) function
|
||||
@@ -280,6 +309,15 @@ int runQMake(int argc, char **argv)
|
||||
// Workaround for inferior/missing command line tools on Windows: make our own!
|
||||
if (argc >= 2 && !strcmp(argv[1], "-install"))
|
||||
return doInstall(argc - 2, argv + 2);
|
||||
+
|
||||
+ {
|
||||
+ // Support running as Visual C++'s compiler
|
||||
+ const wchar_t *cmdline = _wgetenv(L"MSC_CMD_FLAGS");
|
||||
+ if (!cmdline || !*cmdline)
|
||||
+ cmdline = _wgetenv(L"MSC_IDE_FLAGS");
|
||||
+ if (cmdline && *cmdline)
|
||||
+ return dumpMacros(cmdline);
|
||||
+ }
|
||||
#endif
|
||||
|
||||
QMakeVfs vfs;
|
||||
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp
|
||||
index a5cbad7..d06335d 100644
|
||||
--- a/src/tools/moc/main.cpp
|
||||
+++ b/src/tools/moc/main.cpp
|
||||
@@ -259,6 +259,11 @@ int runMoc(int argc, char **argv)
|
||||
prependIncludeOption.setValueName(QStringLiteral("file"));
|
||||
parser.addOption(prependIncludeOption);
|
||||
|
||||
+ QCommandLineOption includeOption(QStringLiteral("include"));
|
||||
+ includeOption.setDescription(QStringLiteral("Parse <file> as an #include before the main source(s)."));
|
||||
+ includeOption.setValueName(QStringLiteral("file"));
|
||||
+ parser.addOption(includeOption);
|
||||
+
|
||||
QCommandLineOption noNotesWarningsCompatOption(QStringLiteral("n"));
|
||||
noNotesWarningsCompatOption.setDescription(QStringLiteral("Do not display notes (-nn) or warnings (-nw). Compatibility option."));
|
||||
noNotesWarningsCompatOption.setValueName(QStringLiteral("which"));
|
||||
@@ -406,7 +411,16 @@ int runMoc(int argc, char **argv)
|
||||
moc.includes = pp.includes;
|
||||
|
||||
// 1. preprocess
|
||||
- moc.symbols = pp.preprocessed(moc.filename, &in);
|
||||
+ foreach (const QString &includeName, parser.values(includeOption)) {
|
||||
+ QByteArray rawName = pp.resolveInclude(QFile::encodeName(includeName), moc.filename);
|
||||
+ QFile f(QFile::decodeName(rawName));
|
||||
+ if (f.open(QIODevice::ReadOnly)) {
|
||||
+ moc.symbols += Symbol(0, MOC_INCLUDE_BEGIN, rawName);
|
||||
+ moc.symbols += pp.preprocessed(rawName, &f);
|
||||
+ moc.symbols += Symbol(0, MOC_INCLUDE_END, rawName);
|
||||
+ }
|
||||
+ }
|
||||
+ moc.symbols += pp.preprocessed(moc.filename, &in);
|
||||
|
||||
if (!pp.preprocessOnly) {
|
||||
// 2. parse
|
||||
diff --git a/src/tools/moc/preprocessor.cpp b/src/tools/moc/preprocessor.cpp
|
||||
index d036c40..70cf14a 100644
|
||||
--- a/src/tools/moc/preprocessor.cpp
|
||||
+++ b/src/tools/moc/preprocessor.cpp
|
||||
@@ -1001,6 +1001,37 @@ static void mergeStringLiterals(Symbols *_symbols)
|
||||
}
|
||||
}
|
||||
|
||||
+QByteArray Preprocessor::resolveInclude(const QByteArray &include, const QByteArray &relativeTo)
|
||||
+{
|
||||
+ // #### stringery
|
||||
+ QFileInfo fi;
|
||||
+ if (!relativeTo.isEmpty())
|
||||
+ fi.setFile(QFileInfo(QString::fromLocal8Bit(relativeTo.constData())).dir(), QString::fromLocal8Bit(include.constData()));
|
||||
+ for (int j = 0; j < Preprocessor::includes.size() && !fi.exists(); ++j) {
|
||||
+ const IncludePath &p = Preprocessor::includes.at(j);
|
||||
+ if (p.isFrameworkPath) {
|
||||
+ const int slashPos = include.indexOf('/');
|
||||
+ if (slashPos == -1)
|
||||
+ continue;
|
||||
+ QByteArray frameworkCandidate = include.left(slashPos);
|
||||
+ frameworkCandidate.append(".framework/Headers/");
|
||||
+ fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate).constData()), QString::fromLocal8Bit(include.mid(slashPos + 1).constData()));
|
||||
+ } else {
|
||||
+ fi.setFile(QString::fromLocal8Bit(p.path.constData()), QString::fromLocal8Bit(include.constData()));
|
||||
+ }
|
||||
+ // try again, maybe there's a file later in the include paths with the same name
|
||||
+ // (186067)
|
||||
+ if (fi.isDir()) {
|
||||
+ fi = QFileInfo();
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!fi.exists() || fi.isDir())
|
||||
+ return QByteArray();
|
||||
+ return fi.canonicalFilePath().toLocal8Bit();
|
||||
+}
|
||||
+
|
||||
void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
|
||||
{
|
||||
currentFilenames.push(filename);
|
||||
@@ -1021,33 +1052,9 @@ void Preprocessor::preprocess(const QByteArray &filename, Symbols &preprocessed)
|
||||
continue;
|
||||
until(PP_NEWLINE);
|
||||
|
||||
- // #### stringery
|
||||
- QFileInfo fi;
|
||||
- if (local)
|
||||
- fi.setFile(QFileInfo(QString::fromLocal8Bit(filename.constData())).dir(), QString::fromLocal8Bit(include.constData()));
|
||||
- for (int j = 0; j < Preprocessor::includes.size() && !fi.exists(); ++j) {
|
||||
- const IncludePath &p = Preprocessor::includes.at(j);
|
||||
- if (p.isFrameworkPath) {
|
||||
- const int slashPos = include.indexOf('/');
|
||||
- if (slashPos == -1)
|
||||
- continue;
|
||||
- QByteArray frameworkCandidate = include.left(slashPos);
|
||||
- frameworkCandidate.append(".framework/Headers/");
|
||||
- fi.setFile(QString::fromLocal8Bit(QByteArray(p.path + '/' + frameworkCandidate).constData()), QString::fromLocal8Bit(include.mid(slashPos + 1).constData()));
|
||||
- } else {
|
||||
- fi.setFile(QString::fromLocal8Bit(p.path.constData()), QString::fromLocal8Bit(include.constData()));
|
||||
- }
|
||||
- // try again, maybe there's a file later in the include paths with the same name
|
||||
- // (186067)
|
||||
- if (fi.isDir()) {
|
||||
- fi = QFileInfo();
|
||||
- continue;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (!fi.exists() || fi.isDir())
|
||||
+ include = resolveInclude(include, local ? filename : QByteArray());
|
||||
+ if (include.isNull())
|
||||
continue;
|
||||
- include = fi.canonicalFilePath().toLocal8Bit();
|
||||
|
||||
if (Preprocessor::preprocessedIncludes.contains(include))
|
||||
continue;
|
||||
@@ -1202,6 +1209,7 @@ Symbols Preprocessor::preprocessed(const QByteArray &filename, QFile *file)
|
||||
input = cleaned(input);
|
||||
|
||||
// phase 2: tokenize for the preprocessor
|
||||
+ index = 0;
|
||||
symbols = tokenize(input);
|
||||
|
||||
#if 0
|
||||
diff --git a/src/tools/moc/preprocessor.h b/src/tools/moc/preprocessor.h
|
||||
index 9c81f86..d876caf 100644
|
||||
--- a/src/tools/moc/preprocessor.h
|
||||
+++ b/src/tools/moc/preprocessor.h
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
QList<QByteArray> frameworks;
|
||||
QSet<QByteArray> preprocessedIncludes;
|
||||
Macros macros;
|
||||
+ QByteArray resolveInclude(const QByteArray &filename, const QByteArray &relativeTo);
|
||||
Symbols preprocessed(const QByteArray &filename, QFile *device);
|
||||
|
||||
void parseDefineArguments(Macro *m);
|
||||
diff --git a/tests/auto/tools/moc/subdir/extradefines.h b/tests/auto/tools/moc/subdir/extradefines.h
|
||||
new file mode 100644
|
||||
index 0000000..e7888ce
|
||||
--- /dev/null
|
||||
+++ b/tests/auto/tools/moc/subdir/extradefines.h
|
||||
@@ -0,0 +1 @@
|
||||
+#define FOO 1
|
||||
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
|
||||
index fa1b68b..1d6a911 100644
|
||||
--- a/tests/auto/tools/moc/tst_moc.cpp
|
||||
+++ b/tests/auto/tools/moc/tst_moc.cpp
|
||||
@@ -552,6 +552,8 @@ private slots:
|
||||
void frameworkSearchPath();
|
||||
void cstyleEnums();
|
||||
void defineMacroViaCmdline();
|
||||
+ void defineMacroViaForcedInclude();
|
||||
+ void defineMacroViaForcedIncludeRelative();
|
||||
void specifyMetaTagsFromCmdline();
|
||||
void invokable();
|
||||
void singleFunctionKeywordSignalAndSlot();
|
||||
@@ -1219,6 +1221,46 @@ void tst_Moc::defineMacroViaCmdline()
|
||||
#endif
|
||||
}
|
||||
|
||||
+void tst_Moc::defineMacroViaForcedInclude()
|
||||
+{
|
||||
+#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
|
||||
+ QProcess proc;
|
||||
+
|
||||
+ QStringList args;
|
||||
+ args << "--include" << m_sourceDirectory + QLatin1String("/subdir/extradefines.h");
|
||||
+ args << m_sourceDirectory + QStringLiteral("/macro-on-cmdline.h");
|
||||
+
|
||||
+ proc.start(m_moc, args);
|
||||
+ QVERIFY(proc.waitForFinished());
|
||||
+ QCOMPARE(proc.exitCode(), 0);
|
||||
+ QCOMPARE(proc.readAllStandardError(), QByteArray());
|
||||
+ QByteArray mocOut = proc.readAllStandardOutput();
|
||||
+ QVERIFY(!mocOut.isEmpty());
|
||||
+#else
|
||||
+ QSKIP("Only tested on linux/gcc");
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+void tst_Moc::defineMacroViaForcedIncludeRelative()
|
||||
+{
|
||||
+#if defined(Q_OS_LINUX) && defined(Q_CC_GNU) && !defined(QT_NO_PROCESS)
|
||||
+ QProcess proc;
|
||||
+
|
||||
+ QStringList args;
|
||||
+ args << "--include" << QStringLiteral("extradefines.h") << "-I" + m_sourceDirectory + "/subdir";
|
||||
+ args << m_sourceDirectory + QStringLiteral("/macro-on-cmdline.h");
|
||||
+
|
||||
+ proc.start(m_moc, args);
|
||||
+ QVERIFY(proc.waitForFinished());
|
||||
+ QCOMPARE(proc.exitCode(), 0);
|
||||
+ QCOMPARE(proc.readAllStandardError(), QByteArray());
|
||||
+ QByteArray mocOut = proc.readAllStandardOutput();
|
||||
+ QVERIFY(!mocOut.isEmpty());
|
||||
+#else
|
||||
+ QSKIP("Only tested on linux/gcc");
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
// tst_Moc::specifyMetaTagsFromCmdline()
|
||||
// plugin_metadata.h contains a plugin which we register here. Since we're not building this
|
||||
// application as a plugin, we need top copy some of the initializer code found in qplugin.h:
|
||||
--
|
||||
1.9.3
|
||||
|
29
qt5-qtbase-5.12.1-firebird.patch
Normal file
29
qt5-qtbase-5.12.1-firebird.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/configure.json 2019-02-03 13:41:27.392305128 -0600
|
||||
@@ -49,10 +49,11 @@
|
||||
"ibase": {
|
||||
"label": "InterBase",
|
||||
"test": {},
|
||||
- "headers": "ibase.h",
|
||||
+ "headers": "firebird/ibase.h",
|
||||
"sources": [
|
||||
{ "libs": "-lgds32_ms", "condition": "config.win32" },
|
||||
- { "libs": "-lgds", "condition": "!config.win32" }
|
||||
+ { "libs": "-lgds", "condition": "!config.win32" },
|
||||
+ { "libs": "-lfbclient", "condition": "!config.win32" }
|
||||
]
|
||||
},
|
||||
"mysql": {
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h.firebird 2019-01-28 11:11:52.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/sqldrivers/ibase/qsql_ibase_p.h 2019-02-03 13:27:30.683142996 -0600
|
||||
@@ -52,7 +52,7 @@
|
||||
//
|
||||
|
||||
#include <QtSql/qsqldriver.h>
|
||||
-#include <ibase.h>
|
||||
+#include <firebird/ibase.h>
|
||||
|
||||
#ifdef QT_PLUGIN
|
||||
#define Q_EXPORT_SQLDRIVER_IBASE
|
146
qt5-qtbase-CVE-2015-9541.patch
Normal file
146
qt5-qtbase-CVE-2015-9541.patch
Normal file
@ -0,0 +1,146 @@
|
||||
From f432c08882ffebe5074ea28de871559a98a4d094 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Knoll <lars.knoll@qt.io>
|
||||
Date: Wed, 26 Feb 2020 10:42:10 +0100
|
||||
Subject: Add an expansion limit for entities
|
||||
|
||||
Recursively defined entities can easily exhaust all available
|
||||
memory. Limit entity expansion to a default of 4096 characters to
|
||||
avoid DoS attacks when a user loads untrusted content.
|
||||
|
||||
[ChangeLog][QtCore][QXmlStream] QXmlStreamReader does now
|
||||
limit the expansion of entities to 4096 characters. Documents where
|
||||
a single entity expands to more characters than the limit are not
|
||||
considered well formed. The limit is there to avoid DoS attacks through
|
||||
recursively expanding entities when loading untrusted content. Qt 5.15
|
||||
will add methods that allow changing that limit.
|
||||
|
||||
Fixes: QTBUG-47417
|
||||
Change-Id: I94387815d74fcf34783e136387ee57fac5ded0c9
|
||||
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
|
||||
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
||||
(cherry picked from commit fd4be84d23a0db4186cb42e736a9de3af722c7f7)
|
||||
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
||||
---
|
||||
src/corelib/serialization/qxmlstream.g | 14 ++++++++++++-
|
||||
src/corelib/serialization/qxmlstream_p.h | 14 ++++++++++++-
|
||||
.../serialization/qxmlstream/tst_qxmlstream.cpp | 23 ++++++++++++++++++++--
|
||||
3 files changed, 47 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/serialization/qxmlstream.g b/src/corelib/serialization/qxmlstream.g
|
||||
index 10bfcd491c..5726bafb26 100644
|
||||
--- a/src/corelib/serialization/qxmlstream.g
|
||||
+++ b/src/corelib/serialization/qxmlstream.g
|
||||
@@ -277,9 +277,19 @@ public:
|
||||
QHash<QStringView, Entity> entityHash;
|
||||
QHash<QStringView, Entity> parameterEntityHash;
|
||||
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
|
||||
+ int entityExpansionLimit = 4096;
|
||||
+ int entityLength = 0;
|
||||
inline bool referenceEntity(Entity &entity) {
|
||||
if (entity.isCurrentlyReferenced) {
|
||||
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
|
||||
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
|
||||
+ return false;
|
||||
+ }
|
||||
+ // entityLength represents the amount of additional characters the
|
||||
+ // entity expands into (can be negative for e.g. &). It's used to
|
||||
+ // avoid DoS attacks through recursive entity expansions
|
||||
+ entityLength += entity.value.size() - entity.name.size() - 2;
|
||||
+ if (entityLength > entityExpansionLimit) {
|
||||
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
|
||||
return false;
|
||||
}
|
||||
entity.isCurrentlyReferenced = true;
|
||||
@@ -830,6 +840,8 @@ entity_done ::= ENTITY_DONE;
|
||||
/.
|
||||
case $rule_number:
|
||||
entityReferenceStack.pop()->isCurrentlyReferenced = false;
|
||||
+ if (entityReferenceStack.isEmpty())
|
||||
+ entityLength = 0;
|
||||
clearSym();
|
||||
break;
|
||||
./
|
||||
diff --git a/src/corelib/serialization/qxmlstream_p.h b/src/corelib/serialization/qxmlstream_p.h
|
||||
index 61f501f81b..31053f8e0b 100644
|
||||
--- a/src/corelib/serialization/qxmlstream_p.h
|
||||
+++ b/src/corelib/serialization/qxmlstream_p.h
|
||||
@@ -774,9 +774,19 @@ public:
|
||||
QHash<QStringView, Entity> entityHash;
|
||||
QHash<QStringView, Entity> parameterEntityHash;
|
||||
QXmlStreamSimpleStack<Entity *>entityReferenceStack;
|
||||
+ int entityExpansionLimit = 4096;
|
||||
+ int entityLength = 0;
|
||||
inline bool referenceEntity(Entity &entity) {
|
||||
if (entity.isCurrentlyReferenced) {
|
||||
- raiseWellFormedError(QXmlStream::tr("Recursive entity detected."));
|
||||
+ raiseWellFormedError(QXmlStream::tr("Self-referencing entity detected."));
|
||||
+ return false;
|
||||
+ }
|
||||
+ // entityLength represents the amount of additional characters the
|
||||
+ // entity expands into (can be negative for e.g. &). It's used to
|
||||
+ // avoid DoS attacks through recursive entity expansions
|
||||
+ entityLength += entity.value.size() - entity.name.size() - 2;
|
||||
+ if (entityLength > entityExpansionLimit) {
|
||||
+ raiseWellFormedError(QXmlStream::tr("Entity expands to more characters than the entity expansion limit."));
|
||||
return false;
|
||||
}
|
||||
entity.isCurrentlyReferenced = true;
|
||||
@@ -1308,6 +1318,8 @@ bool QXmlStreamReaderPrivate::parse()
|
||||
|
||||
case 10:
|
||||
entityReferenceStack.pop()->isCurrentlyReferenced = false;
|
||||
+ if (entityReferenceStack.isEmpty())
|
||||
+ entityLength = 0;
|
||||
clearSym();
|
||||
break;
|
||||
|
||||
diff --git a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
|
||||
index 8fdf91b090..1f9a0d575d 100644
|
||||
--- a/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
|
||||
+++ b/tests/auto/corelib/serialization/qxmlstream/tst_qxmlstream.cpp
|
||||
@@ -393,8 +393,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
- QXmlStreamReader reader(&inputFile);
|
||||
-
|
||||
/* See testcases.dtd which reads: 'Nonvalidating parsers
|
||||
* must also accept "invalid" testcases, but validating ones must reject them.' */
|
||||
if(type == QLatin1String("invalid") || type == QLatin1String("valid"))
|
||||
@@ -580,6 +578,8 @@ private slots:
|
||||
void roundTrip() const;
|
||||
void roundTrip_data() const;
|
||||
|
||||
+ void entityExpansionLimit() const;
|
||||
+
|
||||
private:
|
||||
static QByteArray readFile(const QString &filename);
|
||||
|
||||
@@ -1756,6 +1756,25 @@ void tst_QXmlStream::roundTrip_data() const
|
||||
"</root>\n";
|
||||
}
|
||||
|
||||
+void tst_QXmlStream::entityExpansionLimit() const
|
||||
+{
|
||||
+ QString xml = QStringLiteral("<?xml version=\"1.0\"?>"
|
||||
+ "<!DOCTYPE foo ["
|
||||
+ "<!ENTITY a \"0123456789\" >"
|
||||
+ "<!ENTITY b \"&a;&a;&a;&a;&a;&a;&a;&a;&a;&a;\" >"
|
||||
+ "<!ENTITY c \"&b;&b;&b;&b;&b;&b;&b;&b;&b;&b;\" >"
|
||||
+ "<!ENTITY d \"&c;&c;&c;&c;&c;&c;&c;&c;&c;&c;\" >"
|
||||
+ "]>"
|
||||
+ "<foo>&d;&d;&d;</foo>");
|
||||
+ {
|
||||
+ QXmlStreamReader reader(xml);
|
||||
+ do {
|
||||
+ reader.readNext();
|
||||
+ } while (!reader.atEnd());
|
||||
+ QCOMPARE(reader.error(), QXmlStreamReader::NotWellFormedError);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void tst_QXmlStream::roundTrip() const
|
||||
{
|
||||
QFETCH(QString, in);
|
||||
--
|
||||
cgit v0.2.1
|
@ -1,12 +1,13 @@
|
||||
diff -up qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf
|
||||
--- qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf.than 2016-06-02 17:30:07.249027901 +0200
|
||||
+++ qtbase-opensource-src-5.6.0/mkspecs/common/gcc-base.conf 2016-06-02 17:30:14.681748012 +0200
|
||||
diff --git a/mkspecs/common/gcc-base.conf b/mkspecs/common/gcc-base.conf
|
||||
index e7e6ee1..ff2a939 100644
|
||||
--- a/mkspecs/common/gcc-base.conf
|
||||
+++ b/mkspecs/common/gcc-base.conf
|
||||
@@ -32,7 +32,7 @@
|
||||
#
|
||||
|
||||
QMAKE_CFLAGS_OPTIMIZE = -O2
|
||||
-QMAKE_CFLAGS_OPTIMIZE_FULL = -O3
|
||||
+QMAKE_CFLAGS_OPTIMIZE_FULL = -O2
|
||||
QMAKE_CFLAGS_OPTIMIZE_DEBUG = -Og
|
||||
QMAKE_CFLAGS_OPTIMIZE_SIZE = -Os
|
||||
|
||||
QMAKE_CFLAGS += -pipe
|
||||
QMAKE_CFLAGS_DEPS += -M
|
||||
|
957
qt5-qtbase.spec
957
qt5-qtbase.spec
File diff suppressed because it is too large
Load Diff
9
qtbase-everywhere-src-5.11.1-python3.patch
Normal file
9
qtbase-everywhere-src-5.11.1-python3.patch
Normal file
@ -0,0 +1,9 @@
|
||||
diff -up qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py
|
||||
--- qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py.me 2018-06-23 11:29:21.750066271 +0200
|
||||
+++ qtbase-everywhere-src-5.11.1/mkspecs/features/uikit/devices.py 2018-06-23 11:30:07.457292033 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
#############################################################################
|
||||
##
|
@ -0,0 +1,14 @@
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in
|
||||
--- qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in.foo 2019-04-30 15:18:24.886346423 -0500
|
||||
+++ qtbase-everywhere-src-5.12.1/src/gui/Qt5GuiConfigExtras.cmake.in 2019-04-30 15:19:48.303873296 -0500
|
||||
@@ -66,8 +66,10 @@ unset(_GL_INCDIRS)
|
||||
# Don\'t check for existence of the "_qt5gui_OPENGL_INCLUDE_DIR" because it is
|
||||
# optional.
|
||||
|
||||
+if (NOT ${_qt5gui_OPENGL_INCLUDE_DIR} STREQUAL "/usr/include")
|
||||
list(APPEND Qt5Gui_INCLUDE_DIRS ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||
set_property(TARGET Qt5::Gui APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5gui_OPENGL_INCLUDE_DIR})
|
||||
+endif()
|
||||
|
||||
unset(_qt5gui_OPENGL_INCLUDE_DIR CACHE)
|
||||
|
16
qtbase-everywhere-src-5.14.2-no_relocatable.patch
Normal file
16
qtbase-everywhere-src-5.14.2-no_relocatable.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -up qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp
|
||||
--- qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp.no_relocatable 2020-03-27 04:49:31.000000000 -0500
|
||||
+++ qtbase-everywhere-src-5.14.2/src/corelib/global/qlibraryinfo.cpp 2020-04-13 15:13:44.075705226 -0500
|
||||
@@ -671,8 +671,11 @@ static QString getPrefix(
|
||||
# if QT_CONFIGURE_CROSSBUILD
|
||||
if (group == QLibraryInfo::DevicePaths)
|
||||
return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
|
||||
-# endif
|
||||
+# elif 0 //QT_CONFIG(relocatable)
|
||||
return getExtPrefixFromHostBinDir();
|
||||
+# else
|
||||
+ return QString::fromLocal8Bit(QT_CONFIGURE_PREFIX_PATH);
|
||||
+# endif
|
||||
#elif QT_CONFIG(relocatable)
|
||||
return getRelocatablePrefix();
|
||||
#else
|
12
qtbase-hidpi_scale_at_192.patch
Normal file
12
qtbase-hidpi_scale_at_192.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
--- qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp.hidpi_scale_at_192 2019-02-03 13:21:27.866906481 -0600
|
||||
+++ qtbase-everywhere-src-5.12.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2019-02-03 13:23:47.554767565 -0600
|
||||
@@ -744,7 +744,7 @@ void QXcbScreen::updateGeometry(const QR
|
||||
// Use 128 as a reference DPI on small screens. This favors "small UI" over "large UI".
|
||||
qreal referenceDpi = physicalSize().width() <= 320 ? 128 : 96;
|
||||
|
||||
- m_pixelDensity = qMax(1, qRound(dpi/referenceDpi));
|
||||
+ m_pixelDensity = qMax(1, (int) (dpi/referenceDpi)); //instead of rounding at 1.5, round at 2.0 (same as GNOME)
|
||||
m_geometry = geometry;
|
||||
m_availableGeometry = geometry & m_virtualDesktop->workArea();
|
||||
QWindowSystemInterface::handleScreenGeometryChange(QPlatformScreen::screen(), m_geometry, m_availableGeometry);
|
@ -1,12 +0,0 @@
|
||||
diff -up qtbase-opensource-src-5.2.0/src/gui/text/qfontengine_ft.cpp.lcdfilter qtbase-opensource-src-5.2.0/src/gui/text/qfontengine_ft.cpp
|
||||
--- qtbase-opensource-src-5.2.0/src/gui/text/qfontengine_ft.cpp.lcdfilter 2013-12-08 11:09:51.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.2.0/src/gui/text/qfontengine_ft.cpp 2014-01-27 13:09:28.426065603 -0600
|
||||
@@ -69,7 +69,7 @@
|
||||
#include FT_CONFIG_OPTIONS_H
|
||||
#endif
|
||||
|
||||
-#if defined(FT_LCD_FILTER_H) && defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING)
|
||||
+#if defined(FT_LCD_FILTER_H)
|
||||
#define QT_USE_FREETYPE_LCDFILTER
|
||||
#endif
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -up qtbase-opensource-src-5.3.2/src/xml/sax/qxml.cpp.QTBUG-35459 qtbase-opensource-src-5.3.2/src/xml/sax/qxml.cpp
|
||||
diff -up qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h.QTBUG-35459 qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h
|
||||
--- qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h.QTBUG-35459 2014-09-11 05:48:05.000000000 -0500
|
||||
+++ qtbase-opensource-src-5.3.2/src/xml/sax/qxml_p.h 2014-09-16 09:35:01.189255615 -0500
|
||||
@@ -223,7 +223,7 @@ private:
|
||||
// for the DTD currently being parsed.
|
||||
static const int dtdRecursionLimit = 2;
|
||||
// The maximum amount of characters an entity value may contain, after expansion.
|
||||
- static const int entityCharacterLimit = 1024;
|
||||
+ static const int entityCharacterLimit = 65536;
|
||||
|
||||
const QString &string();
|
||||
void stringClear();
|
@ -1,13 +0,0 @@
|
||||
diff -up qtbase-opensource-src-5.6.0-beta/configure.than qtbase-opensource-src-5.6.0-beta/configure
|
||||
--- qtbase-opensource-src-5.6.0-beta/configure.than 2016-02-12 13:56:20.057741037 +0100
|
||||
+++ qtbase-opensource-src-5.6.0-beta/configure 2016-02-12 14:10:10.267768256 +0100
|
||||
@@ -4346,6 +4346,9 @@ if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; th
|
||||
else
|
||||
# not cross compiling, host == target
|
||||
CFG_HOST_ARCH="$CFG_ARCH"
|
||||
+ if [ "$CFG_ARCH" = "arm" ] ; then
|
||||
+ CFG_CPUFEATURES="neon"
|
||||
+ fi
|
||||
CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
|
||||
fi
|
||||
unset OUTFILE
|
@ -1,14 +0,0 @@
|
||||
diff -up qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp
|
||||
--- qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp.moc_WORDSIZE 2015-12-04 18:05:24.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.6.0-beta/src/tools/moc/main.cpp 2015-12-15 20:57:55.554485416 -0600
|
||||
@@ -184,6 +184,10 @@ int runMoc(int argc, char **argv)
|
||||
Moc moc;
|
||||
pp.macros["Q_MOC_RUN"];
|
||||
pp.macros["__cplusplus"];
|
||||
+ Macro macro;
|
||||
+ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
|
||||
+ macro.symbols.removeLast(); // remove the EOF symbol
|
||||
+ pp.macros.insert("__WORDSIZE", macro);
|
||||
|
||||
// Don't stumble over GCC extensions
|
||||
Macro dummyVariadicFunctionMacro;
|
15
qtbase-opensource-src-5.7.1-moc_macros.patch
Normal file
15
qtbase-opensource-src-5.7.1-moc_macros.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp
|
||||
--- qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp.moc_WORDSIZE 2016-12-01 02:17:04.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.7.1/src/tools/moc/main.cpp 2016-12-08 12:37:28.931589338 -0600
|
||||
@@ -179,6 +179,11 @@ int runMoc(int argc, char **argv)
|
||||
Moc moc;
|
||||
pp.macros["Q_MOC_RUN"];
|
||||
pp.macros["__cplusplus"];
|
||||
+ pp.macros["_SYS_SYSMACROS_H_OUTER"];
|
||||
+ Macro macro;
|
||||
+ macro.symbols = Preprocessor::tokenize(QByteArray::number(Q_PROCESSOR_WORDSIZE*8), 1, Preprocessor::TokenizeDefine);
|
||||
+ macro.symbols.removeLast(); // remove the EOF symbol
|
||||
+ pp.macros.insert("__WORDSIZE", macro);
|
||||
|
||||
// Don't stumble over GCC extensions
|
||||
Macro dummyVariadicFunctionMacro;
|
11
qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch
Normal file
11
qtbase-opensource-src-5.8.0-QT_VERSION_CHECK.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- qtbase-opensource-src-5.8.0/src/corelib/global/qglobal.h.orig 2017-01-26 10:45:40.905010896 +0100
|
||||
+++ qtbase-opensource-src-5.8.0/src/corelib/global/qglobal.h 2017-01-26 10:46:50.299858887 +0100
|
||||
@@ -55,7 +55,7 @@
|
||||
/*
|
||||
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
|
||||
*/
|
||||
-#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
|
||||
+#define QT_VERSION_CHECK(qt_version_check_major, qt_version_check_minor, qt_version_check_patch) ((qt_version_check_major<<16)|(qt_version_check_minor<<8)|(qt_version_check_patch))
|
||||
|
||||
#ifdef QT_BOOTSTRAPPED
|
||||
#include <QtCore/qconfig-bootstrapped.h>
|
12
qtbase-opensource-src-5.9.0-mysql.patch
Normal file
12
qtbase-opensource-src-5.9.0-mysql.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
|
||||
diff -up qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h
|
||||
--- qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.than 2017-07-14 13:43:50.831203768 +0200
|
||||
+++ qtbase-opensource-src-5.9.0/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-07-14 13:44:24.364948006 +0200
|
||||
@@ -58,6 +58,7 @@
|
||||
#endif
|
||||
|
||||
#include <mysql.h>
|
||||
+#include <mysql_version.h>
|
||||
|
||||
#ifdef QT_PLUGIN
|
||||
#define Q_EXPORT_SQLDRIVER_MYSQL
|
12
qtbase-qmake_LFLAGS.patch
Normal file
12
qtbase-qmake_LFLAGS.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up qtbase-everywhere-src-5.10.1/qmake/Makefile.unix.qmake_LFLAGS qtbase-everywhere-src-5.10.1/qmake/Makefile.unix
|
||||
--- qtbase-everywhere-src-5.10.1/qmake/Makefile.unix.qmake_LFLAGS 2018-02-08 12:24:48.000000000 -0600
|
||||
+++ qtbase-everywhere-src-5.10.1/qmake/Makefile.unix 2018-02-15 10:25:07.077763061 -0600
|
||||
@@ -142,7 +142,7 @@ CPPFLAGS = -g $(EXTRA_CPPFLAGS) \
|
||||
-DQT_NO_FOREACH
|
||||
|
||||
CXXFLAGS = $(EXTRA_CXXFLAGS) $(CONFIG_CXXFLAGS) $(CPPFLAGS)
|
||||
-LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS)
|
||||
+LFLAGS = $(EXTRA_LFLAGS) $(CONFIG_LFLAGS) $(QMAKE_LFLAGS_RELEASE)
|
||||
|
||||
first all: $(BUILD_PATH)/bin/qmake$(EXEEXT)
|
||||
qmake: $(BUILD_PATH)/bin/qmake$(EXEEXT)
|
20
qtbase-use-wayland-on-gnome.patch
Normal file
20
qtbase-use-wayland-on-gnome.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
|
||||
index b8bfad4f16..676fdfad5e 100644
|
||||
--- a/src/gui/kernel/qguiapplication.cpp
|
||||
+++ b/src/gui/kernel/qguiapplication.cpp
|
||||
@@ -1376,14 +1376,7 @@ void QGuiApplicationPrivate::createPlatformIntegration()
|
||||
if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) {
|
||||
platformName = QByteArrayLiteral("xcb");
|
||||
} else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) {
|
||||
- QByteArray currentDesktop = qgetenv("XDG_CURRENT_DESKTOP").toLower();
|
||||
- QByteArray sessionDesktop = qgetenv("XDG_SESSION_DESKTOP").toLower();
|
||||
- if (currentDesktop.contains("gnome") || sessionDesktop.contains("gnome")) {
|
||||
- qInfo() << "Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome."
|
||||
- << "Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.";
|
||||
- } else {
|
||||
- platformName = QByteArrayLiteral("wayland");
|
||||
- }
|
||||
+ platformName = QByteArrayLiteral("wayland");
|
||||
}
|
||||
}
|
||||
#ifdef QT_QPA_DEFAULT_PLATFORM_NAME
|
@ -1,2 +1,3 @@
|
||||
[Rules]
|
||||
*.debug=false
|
||||
qt.qpa.xcb.xcberror.warning=false
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
b23232190a3df61fe1ba81636987b036 qtbase-opensource-src-5.6.1.tar.xz
|
||||
SHA512 (qtbase-everywhere-src-5.14.2.tar.xz) = 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
|
||||
|
1
sources.basename
Normal file
1
sources.basename
Normal file
@ -0,0 +1 @@
|
||||
qtbase-everywhere-src
|
16
tell-the-truth-about-private-api.patch
Normal file
16
tell-the-truth-about-private-api.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
|
||||
index e6a0d97..cf93041 100644
|
||||
--- a/mkspecs/features/qt_module.prf
|
||||
+++ b/mkspecs/features/qt_module.prf
|
||||
@@ -216,9 +216,9 @@ android: CONFIG += qt_android_deps no_linker_version_script
|
||||
QMAKE_LFLAGS += $${QMAKE_LFLAGS_VERSION_SCRIPT}$$verscript
|
||||
|
||||
internal_module {
|
||||
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API { *; };"
|
||||
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API { *; };"
|
||||
} else {
|
||||
- verscript_content = "Qt_$${QT_MAJOR_VERSION}_PRIVATE_API {" \
|
||||
+ verscript_content = "Qt_$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}_PRIVATE_API {" \
|
||||
" qt_private_api_tag*;"
|
||||
|
||||
private_api_headers = $$SYNCQT.PRIVATE_HEADER_FILES $$SYNCQT.QPA_HEADER_FILES
|
Loading…
Reference in New Issue
Block a user