Compare commits
312 Commits
Author | SHA1 | Date |
---|---|---|
Rex Dieter | 70363d0880 | |
Rex Dieter | d8f1d7a524 | |
Rex Dieter | d727853314 | |
Rex Dieter | 6f111ade59 | |
Rex Dieter | 8d3281a25b | |
Rex Dieter | c5ba3dc43e | |
Than Ngo | 6cce1b1233 | |
Rex Dieter | 99a7b7e10d | |
Rex Dieter | 87d970c5d5 | |
Rex Dieter | a5e651007c | |
Rex Dieter | 0424a8b5b0 | |
Robert-André Mauchin | 048d2137d8 | |
Fedora Release Engineering | 52cb5cfa20 | |
Than Ngo | fbe60f8d39 | |
Jan Grulich | 2dd29366d0 | |
Pete Walter | 7cf1b36f2b | |
Jan Grulich | dabefd25d8 | |
Rex Dieter | 3548249d39 | |
Fedora Release Engineering | 159799f24f | |
Jan Grulich | 9c762bfb43 | |
Jan Grulich | abb914b769 | |
Rex Dieter | 72b5ae0fbb | |
Rex Dieter | 8a09cd6061 | |
Jan Grulich | dc07d438ad | |
Jan Grulich | cc25be2271 | |
Jan Grulich | c505c71283 | |
Rex Dieter | 7000161d93 | |
Jan Grulich | 9fe549303e | |
Rex Dieter | afc1c75b83 | |
Rex Dieter | 92b82f31aa | |
Rex Dieter | ae2a637c47 | |
Rex Dieter | d3250a64e0 | |
Rex Dieter | 3e7f6f93e7 | |
Rex Dieter | 1a5c543723 | |
Rex Dieter | a8ff550c93 | |
Rex Dieter | f1bc0ab482 | |
Rex Dieter | 2b351acc1e | |
Rex Dieter | 0aaf400b7f | |
Than Ngo | d8c2c5870f | |
Rex Dieter | f5dd303609 | |
Fedora Release Engineering | 4cd8fce414 | |
Rex Dieter | 34c3c2ba7b | |
Rex Dieter | 4c3347e3d3 | |
Rex Dieter | bce0c006e8 | |
Rex Dieter | fe33bd0e36 | |
Than Ngo | a094a8d104 | |
Than Ngo | e56d897d9c | |
Than Ngo | 4a376dc703 | |
Rex Dieter | d20cffe9a3 | |
Rex Dieter | 8ed6ce04af | |
Jan Grulich | 98f737ba5a | |
Jan Grulich | d48e9598d2 | |
Pavel Raiskup | ff52a3eeb3 | |
Than Ngo | 4ac28c2742 | |
Fedora Release Engineering | 23d23a8648 | |
Pete Walter | eda8c137f0 | |
Than Ngo | 87e0482736 | |
Rex Dieter | 5459b14733 | |
Than Ngo | 18c4c30a44 | |
Rex Dieter | 6c00985827 | |
Rex Dieter | 17e492aa0e | |
Rex Dieter | 664255d3bd | |
Rex Dieter | 356f136cff | |
Rex Dieter | 5e08e4a080 | |
Pete Walter | f9210a726e | |
Rex Dieter | 035db48089 | |
Rex Dieter | cd3afda23c | |
Rex Dieter | 6c76df9407 | |
Rex Dieter | bfcd08470b | |
Rex Dieter | 31fe414dbc | |
Rex Dieter | 6468f9c079 | |
Rex Dieter | aca5082db0 | |
Jan Grulich | 44dd86e85a | |
Jan Grulich | e87d2cacce | |
Jan Grulich | 0fa4bb6e6d | |
Rex Dieter | 20a292f534 | |
Rex Dieter | a258953f71 | |
Igor Gnatenko | be940afb36 | |
Rex Dieter | 5cbfe51f81 | |
Rex Dieter | 507fe0eddd | |
Jan Grulich | a2f4fa4db9 | |
Pete Walter | 6120e659d6 | |
Than Ngo | 923ba9b0e0 | |
Jan Grulich | 8cedb395cf | |
Rex Dieter | 4c963be10c | |
Rex Dieter | ea12f0e1fa | |
Rex Dieter | 9c6d6cc34e | |
Rex Dieter | 44ae06a0f8 | |
Rex Dieter | de67c0519d | |
Rex Dieter | 02252c5c62 | |
Rex Dieter | 16ef8031d1 | |
Rex Dieter | e724321967 | |
Jan Grulich | d1a6da43d9 | |
Jan Grulich | 6b4f3818b1 | |
Jan Grulich | ae07984e4d | |
Jan Grulich | bea0c40370 | |
Jan Grulich | 3a12929e93 | |
Jan Grulich | 3b3961f8ca | |
Rex Dieter | 9fc4b6e74c | |
Rex Dieter | 343ee6e998 | |
Rex Dieter | bf5d04680b | |
Rex Dieter | 4f76b8e9ca | |
Rex Dieter | 82a0d13a63 | |
Daniel Vrátil | 192033814a | |
Jan Grulich | 6a8a1e7326 | |
Than Ngo | 5811291b71 | |
Florian Weimer | c34c751a6a | |
Than Ngo | e894279872 | |
Than Ngo | f46a671628 | |
Fedora Release Engineering | 7db91a4ff0 | |
Than Ngo | 6c50b4e107 | |
Rex Dieter | 69c9a202b6 | |
Than Ngo | 30a91e380c | |
Than Ngo | ab9062576c | |
Than Ngo | 831050302c | |
Than Ngo | 46844ac115 | |
Than Ngo | a97a8f9163 | |
Than Ngo | 921d3a65ee | |
Than Ngo | 4c4bc81e4d | |
Than Ngo | 241e6ae46d | |
Rex Dieter | 6162fbda3f | |
Rex Dieter | b71fc696b2 | |
Rex Dieter | 8e24008f23 | |
Rex Dieter | 8b64b2c932 | |
Helio Chissini de Castro | b632435fcc | |
Helio Chissini de Castro | 0fdcd4c059 | |
Helio Chissini de Castro | a0cfc469aa | |
Helio Chissini de Castro | 58ddb0cb59 | |
Helio Chissini de Castro | a74a9fa59b | |
Helio Chissini de Castro | dfe5703894 | |
Helio Chissini de Castro | a894d2cd44 | |
Helio Chissini de Castro | 7a9bc1bbea | |
Helio Chissini de Castro | 7b9849ffcd | |
Helio Chissini de Castro | 4e688c90a5 | |
Rex Dieter | 22adfb20d7 | |
Fedora Release Engineering | 265a0921d9 | |
Fedora Release Engineering | f75707f390 | |
Rex Dieter | 4b715ffd1c | |
Rex Dieter | 8ea90037a5 | |
Helio Chissini de Castro | e245437f7e | |
Rex Dieter | 8090378c80 | |
Rex Dieter | d95935f332 | |
Rex Dieter | 6e2865a3af | |
Rex Dieter | 0844cd226c | |
Rex Dieter | 32769146b7 | |
Rex Dieter | 9ceb7d9081 | |
Kevin Kofler | efb85b9bff | |
Rex Dieter | eaaaf190ea | |
Rex Dieter | 8c7fe210fe | |
Rex Dieter | 9e2e7ad9bd | |
Rex Dieter | 1a5fd22f91 | |
Helio Chissini de Castro | fafeab55a2 | |
Helio Chissini de Castro | cc493ddebb | |
Rex Dieter | aeca857561 | |
Rex Dieter | a5f6318646 | |
Kevin Kofler | e948ea4c6c | |
Rex Dieter | 5b7e8cc795 | |
Rex Dieter | cf267c4766 | |
Rex Dieter | bb48598d85 | |
Rex Dieter | a98a18bb3d | |
Rex Dieter | 196284c991 | |
Rex Dieter | 18def91a7d | |
Rex Dieter | c427cee2d7 | |
Rex Dieter | 7e2153e89a | |
Rex Dieter | 81d6fcc4ca | |
Rex Dieter | 91176c3fee | |
Rex Dieter | bcf4f2e66c | |
Rex Dieter | b1ba042d57 | |
Rex Dieter | 9cda374bc8 | |
Rex Dieter | bd0ce1f91c | |
Rex Dieter | 4a3b9c7b60 | |
Rex Dieter | f8d05dbeff | |
Rex Dieter | 28a55141fc | |
Rex Dieter | a1a082e2ab | |
Rex Dieter | 55cdca6d74 | |
Rex Dieter | 15b5003df8 | |
Rex Dieter | 16b653ffe1 | |
Rex Dieter | 276e67ad3a | |
Rex Dieter | 0fba51827d | |
Rex Dieter | 399cc84ed6 | |
Than Ngo | 8f0534f5ad | |
Than Ngo | 06f985eaf7 | |
Than Ngo | 3c0b29765a | |
Than Ngo | ca7cfd8532 | |
Than Ngo | e467920f91 | |
Than Ngo | ca2c23b106 | |
Than Ngo | 0434621809 | |
Than Ngo | a0fe3d1ded | |
Helio Chissini de Castro | f9b532b958 | |
Helio Chissini de Castro | cdec2369b2 | |
Helio Chissini de Castro | cf7a4e4e0b | |
Rex Dieter | f8cf489ba4 | |
Rex Dieter | 8ddb897df6 | |
Than Ngo | 8e2e39d5e1 | |
Rex Dieter | 614302efd8 | |
Than Ngo | abaad189b8 | |
Than Ngo | 5a70834711 | |
Than Ngo | 2485bf8e8a | |
Rex Dieter | faab8215d7 | |
Rex Dieter | 643cc5becf | |
Rex Dieter | 1fcfee38a9 | |
Helio Chissini de Castro | 4d72c83364 | |
Petr Písař | 6c9f815259 | |
Rex Dieter | 5a213e30a2 | |
Rex Dieter | 1006841ab9 | |
Jan Grulich | 9e956f03e6 | |
Rex Dieter | 14526fb832 | |
Rex Dieter | 1ae2a7cd6c | |
Rex Dieter | ce230a75e6 | |
Rex Dieter | d3a97e0164 | |
Rex Dieter | e29658923b | |
Rex Dieter | 129089515d | |
Than Ngo | 9fa8256445 | |
Than Ngo | 7a1d5d2c64 | |
Than Ngo | c4909f1d93 | |
Jan Grulich | 67e597d645 | |
Rex Dieter | 3ff0c8f6ee | |
Rex Dieter | 580f183d5a | |
Rex Dieter | 4852b13975 | |
Rex Dieter | 4d48dbfb60 | |
Rex Dieter | 050c66cc9d | |
Rex Dieter | 4a85b930ef | |
Rex Dieter | b467b86bbf | |
Rex Dieter | cc36bce4dd | |
Rex Dieter | ebea8f545d | |
Rex Dieter | 3de645af84 | |
Rex Dieter | 5f1f269859 | |
Rex Dieter | 841188b5fc | |
Caolán McNamara | 077039bbca | |
Caolán McNamara | 5a257a143e | |
Rex Dieter | 234f1698e2 | |
David Tardon | c603654bde | |
David Tardon | 1f0da3b1e7 | |
David Tardon | 30057937a1 | |
Rex Dieter | 43276f7c63 | |
Rex Dieter | aad186629e | |
Rex Dieter | f0e6f2d299 | |
Rex Dieter | 90245acf8a | |
Rex Dieter | ba28649c77 | |
Rex Dieter | da57215b5a | |
Rex Dieter | e376999beb | |
Rex Dieter | 679d20fecf | |
Rex Dieter | 0947855825 | |
Rex Dieter | 1b09f2f623 | |
Rex Dieter | 93e45467fb | |
Rex Dieter | ed875c4cde | |
Rex Dieter | 95b0c050bc | |
Rex Dieter | c722cef915 | |
Helio Chissini de Castro | cf904fea3a | |
Rex Dieter | 1686a4e310 | |
Rex Dieter | 90b700be51 | |
Rex Dieter | a35b80142f | |
Rex Dieter | f06686fa09 | |
Rex Dieter | 5523e1423f | |
Rex Dieter | 0030abbcaf | |
Daniel Vrátil | 322f2b4279 | |
Daniel Vrátil | 08876ea371 | |
Daniel Vrátil | 12097a463f | |
Daniel Vrátil | 4e2ea08676 | |
Rex Dieter | 06ce22ee6b | |
Rex Dieter | a09edb40e5 | |
Rex Dieter | 7f9dd5fd56 | |
Rex Dieter | e52638b345 | |
Helio Chissini de Castro | 9977eae8bc | |
Helio Chissini de Castro | e13c11aa73 | |
Helio Chissini de Castro | 49036c6cea | |
Than Ngo | c193d1a95f | |
Than Ngo | f746e0497d | |
Helio Chissini de Castro | 07c53f1b65 | |
Helio Chissini de Castro | da8d87f7f1 | |
Helio Chissini de Castro | dc005de05e | |
Rex Dieter | 8f4e73873a | |
Than Ngo | 1d4447d073 | |
Than Ngo | d7211d621e | |
Than Ngo | 4334573c94 | |
Rex Dieter | d4e18227d7 | |
Rex Dieter | 18dbf0cfc3 | |
Rex Dieter | 05bdff2179 | |
Rex Dieter | 2910dd3a3b | |
Rex Dieter | 83771cef8e | |
Rex Dieter | e13793651a | |
Rex Dieter | 81cc5836ad | |
Than Ngo | 16f06bec96 | |
Rex Dieter | 46be469a36 | |
Rex Dieter | e25222eb99 | |
Rex Dieter | 23c5d626d9 | |
Rex Dieter | 51f2110d6a | |
Rex Dieter | 62968e5566 | |
Rex Dieter | 87950aa1a5 | |
Rex Dieter | 63a3e5d5ec | |
Rex Dieter | cd64dbe445 | |
Rex Dieter | a3aafb4818 | |
Peter Robinson | f3771ee0e5 | |
Than Ngo | 48a2c878aa | |
Than Ngo | d3ea11b311 | |
Helio Chissini de Castro | df97d65ed7 | |
Helio Chissini de Castro | d3f4ecabee | |
Rex Dieter | 72610001f0 | |
Rex Dieter | 7a8506bfbc | |
Rex Dieter | c6386a503c | |
Helio Chissini de Castro | 67c36efdbb | |
Dan Vrátil | 79a83406d2 | |
Rex Dieter | 59c34629a7 | |
Helio Chissini de Castro | 341f22d360 | |
Helio Chissini de Castro | c6a7f1a513 | |
Rex Dieter | 83f0aeaec2 | |
Rex Dieter | 7f6316426f | |
Rex Dieter | d867910e44 | |
Rex Dieter | 3b0365138e | |
Helio Chissini de Castro | 00a208ef32 | |
Helio Chissini de Castro | 243e1453dd | |
Helio Chissini de Castro | d7b52e5dad |
|
@ -1,4 +1,6 @@
|
|||
/qtbase-opensource-src-5.4.2.tar.xz
|
||||
/qtbase-opensource-src-5.5.0.tar.xz
|
||||
/qtbase-opensource-src-5.5.1-rc1.tar.xz
|
||||
/qtbase-opensource-src-5.5.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
|
||||
|
|
|
@ -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,56 +0,0 @@
|
|||
From ae51e360f986698eaf41fdb38f8a878a50f69be1 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Volkov <a.volkov@rusbitech.ru>
|
||||
Date: Fri, 19 Jun 2015 13:34:11 +0300
|
||||
Subject: [PATCH 197/412] xcb: Ignore disabling of outputs in the middle of the
|
||||
mode switch
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
X server may send RROutputChangeNotify event with null crtc and mode,
|
||||
when it switches an output mode. Request RROutputInfo to distinguish
|
||||
this case from the case when the output is explicitly disabled.
|
||||
|
||||
Change-Id: I4c2356ec71dbcc8013009ea8a6f46dd11f19d6bb
|
||||
Task-number: QTBUG-44158
|
||||
Task-number: QTBUG-46786
|
||||
Task-number: QTBUG-46822
|
||||
Reviewed-by: Daniel Vrátil <dvratil@redhat.com>
|
||||
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbconnection.cpp | 18 +++++++++++++-----
|
||||
1 file changed, 13 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
index 0867615..29e1fd1 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
@@ -265,11 +265,19 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
|
||||
} else if (screen) {
|
||||
// Screen has been disabled -> remove
|
||||
if (output.crtc == XCB_NONE && output.mode == XCB_NONE) {
|
||||
- qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
|
||||
- m_screens.removeOne(screen);
|
||||
- foreach (QXcbScreen *otherScreen, m_screens)
|
||||
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
|
||||
- QXcbIntegration::instance()->destroyScreen(screen);
|
||||
+ xcb_randr_get_output_info_cookie_t outputInfoCookie =
|
||||
+ xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
|
||||
+ QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
|
||||
+ xcb_randr_get_output_info_reply(xcb_connection(), outputInfoCookie, NULL));
|
||||
+ if (outputInfo->crtc == XCB_NONE) {
|
||||
+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
|
||||
+ m_screens.removeOne(screen);
|
||||
+ foreach (QXcbScreen *otherScreen, m_screens)
|
||||
+ otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
|
||||
+ QXcbIntegration::instance()->destroyScreen(screen);
|
||||
+ } else {
|
||||
+ qCDebug(lcQpaScreen) << "output" << screen->name() << "has been temporarily disabled for the mode switch";
|
||||
+ }
|
||||
} else {
|
||||
// Just update existing screen
|
||||
screen->updateGeometry(output.config_timestamp);
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -1,6 +1,14 @@
|
|||
#!/bin/sh
|
||||
OPENGL_VERSION=`LANG=C glxinfo | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'`
|
||||
if [ "$OPENGL_VERSION" -lt 2 ]; then
|
||||
#!/bin/bash
|
||||
|
||||
if [ -z "$QT_XCB_FORCE_SOFTWARE_OPENGL" ]; then
|
||||
|
||||
QT5_CHECK_OPENGL_VERSION=`LANG=C glxinfo 2> /dev/null | grep '^OpenGL version string: ' | head -n 1 | sed -e 's/^OpenGL version string: \([0-9]\).*$/\1/g'` ||:
|
||||
|
||||
if [ "$QT5_CHECK_OPENGL_VERSION" == "1" ]; then
|
||||
QT_XCB_FORCE_SOFTWARE_OPENGL=1
|
||||
export QT_XCB_FORCE_SOFTWARE_OPENGL
|
||||
fi
|
||||
|
||||
unset QT5_CHECK_OPENGL_VERSION
|
||||
|
||||
fi
|
||||
|
|
386
138201.patch
386
138201.patch
|
@ -1,386 +0,0 @@
|
|||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-21 21:02:53.056198256 +0200
|
||||
@@ -229,7 +229,6 @@ void QXcbConnection::updateScreens(const
|
||||
if (screen->mode() != crtc.mode)
|
||||
screen->updateRefreshRate(crtc.mode);
|
||||
}
|
||||
-
|
||||
} else if (event->subCode == XCB_RANDR_NOTIFY_OUTPUT_CHANGE) {
|
||||
xcb_randr_output_change_t output = event->u.oc;
|
||||
QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(output.window);
|
||||
@@ -242,20 +241,18 @@ void QXcbConnection::updateScreens(const
|
||||
|
||||
if (screen && output.connection == XCB_RANDR_CONNECTION_DISCONNECTED) {
|
||||
qCDebug(lcQpaScreen) << "screen" << screen->name() << "has been disconnected";
|
||||
-
|
||||
- // Known screen removed -> delete it
|
||||
- m_screens.removeOne(screen);
|
||||
- foreach (QXcbScreen *otherScreen, m_screens)
|
||||
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
|
||||
-
|
||||
- QXcbIntegration::instance()->destroyScreen(screen);
|
||||
-
|
||||
- // QTBUG-40174, QTBUG-42985: If all screens are removed, wait
|
||||
- // and start rendering again later if a screen becomes available.
|
||||
-
|
||||
+ destroyScreen(screen, true);
|
||||
} else if (!screen && output.connection == XCB_RANDR_CONNECTION_CONNECTED) {
|
||||
// New XRandR output is available and it's enabled
|
||||
if (output.crtc != XCB_NONE && output.mode != XCB_NONE) {
|
||||
+ // QTBUG-40174, QTBUG-42985: If virtual screen exists,
|
||||
+ // remove it and next add a physical screen.
|
||||
+ if (m_onlyVirtualScreen) {
|
||||
+ qCDebug(lcQpaScreen) << "default screen" << screen->name() << "has been removed";
|
||||
+ destroyScreen(m_screens.at(0), false);
|
||||
+ m_onlyVirtualScreen = false;
|
||||
+ }
|
||||
+
|
||||
xcb_randr_get_output_info_cookie_t outputInfoCookie =
|
||||
xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
|
||||
QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
|
||||
@@ -270,34 +267,25 @@ void QXcbConnection::updateScreens(const
|
||||
otherScreen->addVirtualSibling(screen);
|
||||
m_screens << screen;
|
||||
QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
|
||||
-
|
||||
- // Windows which had null screens have already had expose events by now.
|
||||
- // They need to be told the screen is back, it's OK to render.
|
||||
- foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
|
||||
- QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
|
||||
- if (xcbWin)
|
||||
- xcbWin->maybeSetScreen(screen);
|
||||
- }
|
||||
+ maybeSetScreenForTopLevelWindows(screen);
|
||||
}
|
||||
- // else ignore disabled screens
|
||||
} else if (screen) {
|
||||
- // Screen has been disabled -> remove
|
||||
if (output.crtc == XCB_NONE && output.mode == XCB_NONE) {
|
||||
+ // Screen has been disabled
|
||||
xcb_randr_get_output_info_cookie_t outputInfoCookie =
|
||||
xcb_randr_get_output_info(xcb_connection(), output.output, output.config_timestamp);
|
||||
QScopedPointer<xcb_randr_get_output_info_reply_t, QScopedPointerPodDeleter> outputInfo(
|
||||
xcb_randr_get_output_info_reply(xcb_connection(), outputInfoCookie, NULL));
|
||||
if (outputInfo->crtc == XCB_NONE) {
|
||||
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been disabled";
|
||||
- m_screens.removeOne(screen);
|
||||
- foreach (QXcbScreen *otherScreen, m_screens)
|
||||
- otherScreen->removeVirtualSibling((QPlatformScreen *) screen);
|
||||
- QXcbIntegration::instance()->destroyScreen(screen);
|
||||
+ destroyScreen(screen, true);
|
||||
} else {
|
||||
qCDebug(lcQpaScreen) << "output" << screen->name() << "has been temporarily disabled for the mode switch";
|
||||
+ screen->setCrtc(XCB_NONE); //Invalidate crtc
|
||||
}
|
||||
} else {
|
||||
// Just update existing screen
|
||||
+ screen->setCrtc(output.crtc); //Set the new crtc, because it may be invalidated
|
||||
screen->updateGeometry(output.config_timestamp);
|
||||
const bool wasPrimary = screen->isPrimary();
|
||||
screen->setPrimary(checkOutputIsPrimary(output.window, output.output));
|
||||
@@ -316,19 +304,61 @@ void QXcbConnection::updateScreens(const
|
||||
qCDebug(lcQpaScreen) << "output has changed" << screen;
|
||||
}
|
||||
}
|
||||
+
|
||||
if (!m_screens.isEmpty())
|
||||
qCDebug(lcQpaScreen) << "primary output is" << m_screens.first()->name();
|
||||
else
|
||||
qCDebug(lcQpaScreen) << "no outputs";
|
||||
}
|
||||
}
|
||||
+void QXcbConnection::destroyScreen(QXcbScreen *screen, bool canCreateVirtualScreen)
|
||||
+{
|
||||
+ // Known screen removed -> delete it
|
||||
+ m_screens.removeOne(screen);
|
||||
+ foreach (QXcbScreen *otherScreen, m_screens)
|
||||
+ otherScreen->removeVirtualSibling((QPlatformScreen *)screen);
|
||||
+ QXcbIntegration::instance()->destroyScreen(screen);
|
||||
+
|
||||
+ // QTBUG-40174, QTBUG-42985: If all screens are removed, add a virtual
|
||||
+ // screen and remove it later if a physical screen becomes available.
|
||||
+ if (canCreateVirtualScreen && m_screens.isEmpty())
|
||||
+ createVirtualScreen();
|
||||
+}
|
||||
+void QXcbConnection::createVirtualScreen()
|
||||
+{
|
||||
+ QXcbVirtualDesktop *virtualDesktop = m_virtualDesktops.value(0);
|
||||
+ if (virtualDesktop && !virtualDesktop->size().isEmpty()) {
|
||||
+ Q_ASSERT(m_screens.isEmpty());
|
||||
+ QXcbScreen *screen = createScreen(virtualDesktop, 0, Q_NULLPTR);
|
||||
+ screen->setVirtualSiblings(QList<QPlatformScreen *>() << screen);
|
||||
+ screen->setPrimary(true);
|
||||
+ m_onlyVirtualScreen = true;
|
||||
+ m_screens << screen;
|
||||
+ QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
|
||||
+ maybeSetScreenForTopLevelWindows(screen);
|
||||
+ qCDebug(lcQpaScreen) << "virtual screen was created" << screen;
|
||||
+ }
|
||||
+}
|
||||
+void QXcbConnection::maybeSetScreenForTopLevelWindows(QXcbScreen *screen)
|
||||
+{
|
||||
+ // Windows which had null screens have already had expose events by now.
|
||||
+ // They need to be told the screen is back, it's OK to render.
|
||||
+ bool doFlush = false;
|
||||
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
|
||||
+ QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
|
||||
+ if (xcbWin)
|
||||
+ doFlush |= xcbWin->maybeSetScreen(screen);
|
||||
+ }
|
||||
+ // Flush Window System Events to prevent disappearing windows
|
||||
+ if (doFlush)
|
||||
+ QWindowSystemInterface::flushWindowSystemEvents();
|
||||
+}
|
||||
|
||||
void QXcbConnection::initializeScreens()
|
||||
{
|
||||
xcb_screen_iterator_t it = xcb_setup_roots_iterator(m_setup);
|
||||
int xcbScreenNumber = 0; // screen number in the xcb sense
|
||||
QXcbScreen* primaryScreen = Q_NULLPTR;
|
||||
- bool hasOutputs = false;
|
||||
while (it.rem) {
|
||||
// Each "screen" in xcb terminology is a virtual desktop,
|
||||
// potentially a collection of separate juxtaposed monitors.
|
||||
@@ -407,7 +437,6 @@ void QXcbConnection::initializeScreens()
|
||||
|
||||
QXcbScreen *screen = createScreen(virtualDesktop, outputs[i], output.data());
|
||||
siblings << screen;
|
||||
- hasOutputs = true;
|
||||
m_screens << screen;
|
||||
|
||||
// There can be multiple outputs per screen, use either
|
||||
@@ -434,39 +463,23 @@ void QXcbConnection::initializeScreens()
|
||||
++xcbScreenNumber;
|
||||
} // for each xcb screen
|
||||
|
||||
- // If there's no randr extension, or there was some error above, or we found a
|
||||
- // screen which doesn't have outputs for some other reason (e.g. on VNC or ssh -X),
|
||||
- // but the dimensions are known anyway, and we don't already have any lingering
|
||||
- // (possibly disconnected) screens, then showing windows should be possible,
|
||||
- // so create one screen. (QTBUG-31389)
|
||||
- QXcbVirtualDesktop *virtualDesktop = m_virtualDesktops.value(0);
|
||||
- if (virtualDesktop && !hasOutputs && !virtualDesktop->size().isEmpty() && m_screens.isEmpty()) {
|
||||
- QXcbScreen *screen = createScreen(virtualDesktop, 0, Q_NULLPTR);
|
||||
- screen->setVirtualSiblings(QList<QPlatformScreen *>() << screen);
|
||||
- m_screens << screen;
|
||||
- primaryScreen = screen;
|
||||
- primaryScreen->setPrimary(true);
|
||||
- qCDebug(lcQpaScreen) << "found a screen with zero outputs" << screen;
|
||||
- }
|
||||
-
|
||||
- // Ensure the primary screen is first in the list
|
||||
- if (primaryScreen) {
|
||||
- Q_ASSERT(!m_screens.isEmpty());
|
||||
- if (m_screens.first() != primaryScreen) {
|
||||
- m_screens.removeOne(primaryScreen);
|
||||
- m_screens.prepend(primaryScreen);
|
||||
+ if (m_screens.isEmpty()) {
|
||||
+ createVirtualScreen();
|
||||
+ } else {
|
||||
+ // Ensure the primary screen is first in the list
|
||||
+ if (primaryScreen) {
|
||||
+ if (m_screens.first() != primaryScreen) {
|
||||
+ m_screens.removeOne(primaryScreen);
|
||||
+ m_screens.prepend(primaryScreen);
|
||||
+ }
|
||||
}
|
||||
- }
|
||||
|
||||
- // Push the screens to QApplication
|
||||
- QXcbIntegration *integration = QXcbIntegration::instance();
|
||||
- foreach (QXcbScreen* screen, m_screens) {
|
||||
- qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ")";
|
||||
- integration->screenAdded(screen, screen->isPrimary());
|
||||
- }
|
||||
-
|
||||
- if (!m_screens.isEmpty())
|
||||
- qCDebug(lcQpaScreen) << "primary output is" << m_screens.first()->name();
|
||||
+ // Push the screens to QGuiApplication
|
||||
+ foreach (QXcbScreen *screen, m_screens) {
|
||||
+ qCDebug(lcQpaScreen) << "adding" << screen << "(Primary:" << screen->isPrimary() << ")";
|
||||
+ QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGrabServer, xcb_visualid_t defaultVisualId, const char *displayName)
|
||||
@@ -474,6 +487,7 @@ QXcbConnection::QXcbConnection(QXcbNativ
|
||||
, m_canGrabServer(canGrabServer)
|
||||
, m_defaultVisualId(defaultVisualId)
|
||||
, m_primaryScreenNumber(0)
|
||||
+ , m_onlyVirtualScreen(false)
|
||||
, m_displayName(displayName ? QByteArray(displayName) : qgetenv("DISPLAY"))
|
||||
, m_nativeInterface(nativeInterface)
|
||||
#ifdef XCB_USE_XLIB
|
||||
@@ -1110,8 +1124,19 @@ void QXcbConnection::handleXcbEvent(xcb_
|
||||
handled = false;
|
||||
break;
|
||||
case XCB_PROPERTY_NOTIFY:
|
||||
- HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
|
||||
+ {
|
||||
+ // Update geometry for all screens, because availableGeometry must be changed
|
||||
+ const xcb_property_notify_event_t *propertyNotifyEvent = (const xcb_property_notify_event_t *)event;
|
||||
+ if (propertyNotifyEvent->atom == atom(QXcbAtom::_NET_WORKAREA)) {
|
||||
+ foreach (QXcbScreen *screen, m_screens) {
|
||||
+ if (propertyNotifyEvent->window == screen->root())
|
||||
+ screen->updateGeometry(propertyNotifyEvent->time);
|
||||
+ }
|
||||
+ } else {
|
||||
+ HANDLE_PLATFORM_WINDOW_EVENT(xcb_property_notify_event_t, window, handlePropertyNotifyEvent);
|
||||
+ }
|
||||
break;
|
||||
+ }
|
||||
#if defined(XCB_USE_XINPUT2)
|
||||
case XCB_GE_GENERIC:
|
||||
// Here the windowEventListener is invoked from xi2HandleEvent()
|
||||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.h
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.h 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.h 2015-10-21 21:00:21.767613360 +0200
|
||||
@@ -519,6 +519,9 @@ private:
|
||||
QXcbVirtualDesktop* virtualDesktopForRootWindow(xcb_window_t rootWindow);
|
||||
bool checkOutputIsPrimary(xcb_window_t rootWindow, xcb_randr_output_t output);
|
||||
void initializeScreens();
|
||||
+ void destroyScreen(QXcbScreen *screen, bool canCreateVirtualScreen);
|
||||
+ void createVirtualScreen();
|
||||
+ void maybeSetScreenForTopLevelWindows(QXcbScreen *screen);
|
||||
void updateScreens(const xcb_randr_notify_event_t *event);
|
||||
|
||||
bool m_xi2Enabled;
|
||||
@@ -583,6 +586,7 @@ private:
|
||||
QList<QXcbVirtualDesktop *> m_virtualDesktops;
|
||||
QList<QXcbScreen *> m_screens;
|
||||
int m_primaryScreenNumber;
|
||||
+ bool m_onlyVirtualScreen;
|
||||
|
||||
xcb_atom_t m_allAtoms[QXcbAtom::NAtoms];
|
||||
|
||||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.cpp
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.cpp 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.cpp 2015-10-21 21:00:21.768613377 +0200
|
||||
@@ -438,14 +438,6 @@ void QXcbScreen::handleScreenChange(xcb_
|
||||
|
||||
QDpi ldpi = logicalDpi();
|
||||
QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QPlatformScreen::screen(), ldpi.first, ldpi.second);
|
||||
-
|
||||
- // Windows which had null screens have already had expose events by now.
|
||||
- // They need to be told the screen is back, it's OK to render.
|
||||
- foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
|
||||
- QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
|
||||
- if (xcbWin)
|
||||
- xcbWin->maybeSetScreen(this);
|
||||
- }
|
||||
}
|
||||
|
||||
void QXcbScreen::updateGeometry(xcb_timestamp_t timestamp)
|
||||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.h
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbscreen.h 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbscreen.h 2015-10-21 21:00:21.768613377 +0200
|
||||
@@ -116,6 +116,8 @@ public:
|
||||
xcb_randr_crtc_t crtc() const { return m_crtc; }
|
||||
xcb_randr_mode_t mode() const { return m_mode; }
|
||||
|
||||
+ void setCrtc(xcb_randr_crtc_t crtc) { m_crtc = crtc; }
|
||||
+
|
||||
void windowShown(QXcbWindow *window);
|
||||
QString windowManagerName() const { return m_windowManagerName; }
|
||||
bool syncRequestSupported() const { return m_syncRequestSupported; }
|
||||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.cpp
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.cpp 2015-10-21 21:01:17.324562601 +0200
|
||||
@@ -694,12 +694,17 @@ void QXcbWindow::destroy()
|
||||
m_pendingSyncRequest->invalidate();
|
||||
}
|
||||
|
||||
-void QXcbWindow::maybeSetScreen(QXcbScreen *screen)
|
||||
+bool QXcbWindow::maybeSetScreen(QXcbScreen *screen)
|
||||
{
|
||||
- if (!window()->screen() && screen->geometry().contains(geometry().topLeft())) {
|
||||
+ // Every window must have a screen. Otherwise application can
|
||||
+ // crash and the window contents are invisible e.g. in x11vnc.
|
||||
+ if (!window()->screen()) {
|
||||
QWindowSystemInterface::handleWindowScreenChanged(window(), static_cast<QPlatformScreen *>(screen)->screen());
|
||||
- QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(0, 0), window()->size())));
|
||||
+ if (screen->geometry().contains(geometry().topLeft()))
|
||||
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(0, 0), window()->size())));
|
||||
+ return true;
|
||||
}
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void QXcbWindow::setGeometry(const QRect &rect)
|
||||
@@ -1243,8 +1248,6 @@ void QXcbWindow::changeNetWmState(bool s
|
||||
event.data.data32[3] = 0;
|
||||
event.data.data32[4] = 0;
|
||||
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbScreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event));
|
||||
}
|
||||
|
||||
@@ -1493,8 +1496,6 @@ void QXcbWindow::setParent(const QPlatfo
|
||||
xcb_parent_id = qXcbParent->xcb_window();
|
||||
m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow;
|
||||
} else {
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
xcb_parent_id = xcbScreen()->root();
|
||||
m_embedded = false;
|
||||
}
|
||||
@@ -2323,8 +2324,6 @@ void QXcbWindow::handleEnterNotifyEvent(
|
||||
|
||||
const int dpr = int(devicePixelRatio());
|
||||
const QPoint local(event->event_x/dpr, event->event_y/dpr);
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
QPoint global = xcbScreen()->mapFromNative(QPoint(event->root_x, event->root_y));
|
||||
QWindowSystemInterface::handleEnterEvent(window(), local, global);
|
||||
}
|
||||
@@ -2343,8 +2342,6 @@ void QXcbWindow::handleLeaveNotifyEvent(
|
||||
if (enterWindow) {
|
||||
const int dpr = int(devicePixelRatio());
|
||||
QPoint local(enter->event_x/dpr, enter->event_y/dpr);
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
QPoint global = xcbScreen()->mapFromNative(QPoint(event->root_x, event->root_y));
|
||||
|
||||
QWindowSystemInterface::handleEnterLeaveEvent(enterWindow->window(), window(), local, global);
|
||||
@@ -2360,8 +2357,6 @@ void QXcbWindow::handlePropertyNotifyEve
|
||||
connection()->setTime(event->time);
|
||||
|
||||
const bool propertyDeleted = event->state == XCB_PROPERTY_DELETE;
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
|
||||
if (event->atom == atom(QXcbAtom::_NET_WM_STATE) || event->atom == atom(QXcbAtom::WM_STATE)) {
|
||||
if (propertyDeleted)
|
||||
@@ -2403,8 +2398,6 @@ void QXcbWindow::handlePropertyNotifyEve
|
||||
return;
|
||||
} else if (event->atom == atom(QXcbAtom::_NET_FRAME_EXTENTS)) {
|
||||
m_dirtyFrameMargins = true;
|
||||
- } else if (event->atom == atom(QXcbAtom::_NET_WORKAREA) && xcbScreen() && event->window == xcbScreen()->root()) {
|
||||
- xcbScreen()->updateGeometry(event->time);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2682,8 +2675,6 @@ bool QXcbWindow::needsSync() const
|
||||
|
||||
void QXcbWindow::postSyncWindowRequest()
|
||||
{
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
if (!m_pendingSyncRequest) {
|
||||
QXcbSyncWindowRequest *e = new QXcbSyncWindowRequest(this);
|
||||
m_pendingSyncRequest = e;
|
||||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.h qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.h
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.h 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbwindow.h 2015-10-21 21:00:21.769613394 +0200
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
|
||||
virtual void create();
|
||||
virtual void destroy();
|
||||
- void maybeSetScreen(QXcbScreen *screen);
|
||||
+ bool maybeSetScreen(QXcbScreen *screen);
|
||||
QXcbScreen *screenForNativeGeometry(const QRect &newGeometry) const;
|
||||
|
||||
public Q_SLOTS:
|
30
macros.qt5
30
macros.qt5
|
@ -1,30 +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
|
||||
|
||||
%qmake_qt5 \
|
||||
%{_qt5_qmake} \\\
|
||||
QMAKE_CFLAGS_DEBUG="${CFLAGS:-%optflags}" \\\
|
||||
QMAKE_CFLAGS_RELEASE="${CFLAGS:-%optflags}" \\\
|
||||
QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%optflags}" \\\
|
||||
QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%optflags}" \\\
|
||||
QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{?__global_ldflags}}" \\\
|
||||
QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{?__global_ldflags}}" \\\
|
||||
QMAKE_STRIP=
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
%_qt5 @@NAME@@
|
||||
%_qt5_epoch @@EPOCH@@
|
||||
%_qt5_version @@VERSION@@
|
||||
%_qt5_evr @@EVR@@
|
|
@ -6,7 +6,10 @@
|
|||
|
||||
#ifndef QCONFIG_MULTILIB_H
|
||||
#define QCONFIG_MULTILIB_H
|
||||
|
||||
#ifndef __WORDSIZE
|
||||
#include <bits/wordsize.h>
|
||||
#endif
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "QtCore/qconfig-32.h"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# run process through valgrind instead
|
||||
|
||||
DIRNAME=$(dirname $0)
|
||||
set -x
|
||||
valgrind ${DIRNAME}/qdoc.orig $@
|
735
qt5-poll.patch
735
qt5-poll.patch
|
@ -1,735 +0,0 @@
|
|||
commit 8a2d9073e959356808ce1685822b839d880e6498
|
||||
Author: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri Sep 14 17:27:35 2012 +0200
|
||||
|
||||
Replace most calls to select(2) with poll(2)
|
||||
|
||||
select(2) limits the number of file descriptor in a process to
|
||||
FD_SETSIZE (typically 1023). Process creation and certain socket
|
||||
operations fail because they call select(2) on a file descriptor outside
|
||||
the FD_SETSIZE range.
|
||||
|
||||
The remaining select(2) calls are used for timeouts only, or are in the
|
||||
traditional event loop. The glib-based event loop does not use
|
||||
select(2), so this should be sufficient.
|
||||
|
||||
This change adds a poll emulation for VxWorks, which only offers
|
||||
select(2).
|
||||
|
||||
Change-Id: I9b0cf5bec81da70b29c501c62d14fb57df87fa61
|
||||
|
||||
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
|
||||
index e159bf8..bb8a3ae 100644
|
||||
--- a/src/corelib/io/qprocess_unix.cpp
|
||||
+++ b/src/corelib/io/qprocess_unix.cpp
|
||||
@@ -134,13 +134,6 @@ static void qt_sa_sigchld_handler(int signum)
|
||||
oldAction(signum);
|
||||
}
|
||||
|
||||
-static inline void add_fd(int &nfds, int fd, fd_set *fdset)
|
||||
-{
|
||||
- FD_SET(fd, fdset);
|
||||
- if ((fd) > nfds)
|
||||
- nfds = fd;
|
||||
-}
|
||||
-
|
||||
struct QProcessInfo {
|
||||
QProcess *process;
|
||||
int deathPipe;
|
||||
@@ -235,9 +228,9 @@ QProcessManager::~QProcessManager()
|
||||
void QProcessManager::run()
|
||||
{
|
||||
forever {
|
||||
- fd_set readset;
|
||||
- FD_ZERO(&readset);
|
||||
- FD_SET(qt_qprocess_deadChild_pipe[0], &readset);
|
||||
+ pollfd fd;
|
||||
+ fd.fd = qt_qprocess_deadChild_pipe[0];
|
||||
+ fd.events = POLLIN;
|
||||
|
||||
#if defined (QPROCESS_DEBUG)
|
||||
qDebug() << "QProcessManager::run() waiting for children to die";
|
||||
@@ -246,8 +239,8 @@ void QProcessManager::run()
|
||||
// block forever, or until activity is detected on the dead child
|
||||
// pipe. the only other peers are the SIGCHLD signal handler, and the
|
||||
// QProcessManager destructor.
|
||||
- int nselect = select(qt_qprocess_deadChild_pipe[0] + 1, &readset, 0, 0, 0);
|
||||
- if (nselect < 0) {
|
||||
+ int ret = qt_safe_poll(&fd, 1, -1, /* retry_eintr */ false);
|
||||
+ if (ret < 0) {
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
break;
|
||||
@@ -996,17 +989,6 @@ void QProcessPrivate::killProcess()
|
||||
::kill(pid_t(pid), SIGKILL);
|
||||
}
|
||||
|
||||
-static int select_msecs(int nfds, fd_set *fdread, fd_set *fdwrite, int timeout)
|
||||
-{
|
||||
- if (timeout < 0)
|
||||
- return qt_safe_select(nfds, fdread, fdwrite, 0, 0);
|
||||
-
|
||||
- struct timeval tv;
|
||||
- tv.tv_sec = timeout / 1000;
|
||||
- tv.tv_usec = (timeout % 1000) * 1000;
|
||||
- return qt_safe_select(nfds, fdread, fdwrite, 0, &tv);
|
||||
-}
|
||||
-
|
||||
/*
|
||||
Returns the difference between msecs and elapsed. If msecs is -1,
|
||||
however, -1 is returned.
|
||||
@@ -1029,10 +1011,10 @@ bool QProcessPrivate::waitForStarted(int msecs)
|
||||
childStartedPipe[0]);
|
||||
#endif
|
||||
|
||||
- fd_set fds;
|
||||
- FD_ZERO(&fds);
|
||||
- FD_SET(childStartedPipe[0], &fds);
|
||||
- if (select_msecs(childStartedPipe[0] + 1, &fds, 0, msecs) == 0) {
|
||||
+ pollfd fd;
|
||||
+ fd.fd = childStartedPipe[0];
|
||||
+ fd.events = POLLIN;
|
||||
+ if (qt_safe_poll(&fd, 1, msecs) == 0) {
|
||||
processError = QProcess::Timedout;
|
||||
q->setErrorString(QProcess::tr("Process operation timed out"));
|
||||
#if defined (QPROCESS_DEBUG)
|
||||
@@ -1048,6 +1030,47 @@ bool QProcessPrivate::waitForStarted(int msecs)
|
||||
return startedEmitted;
|
||||
}
|
||||
|
||||
+class QProcessFDSet {
|
||||
+ pollfd fds[5];
|
||||
+
|
||||
+ static size_t size()
|
||||
+ {
|
||||
+ return sizeof(fds)/sizeof(fds[0]);
|
||||
+ }
|
||||
+
|
||||
+public:
|
||||
+ QProcessFDSet(QProcessPrivate &proc)
|
||||
+ {
|
||||
+ for (size_t i = 0; i < size(); ++i) {
|
||||
+ fds[i].fd = -1;
|
||||
+ fds[i].events = POLLIN;
|
||||
+ }
|
||||
+ death().fd = proc.deathPipe[0];
|
||||
+
|
||||
+ if (proc.processState == QProcess::Starting)
|
||||
+ started().fd = proc.childStartedPipe[0];
|
||||
+
|
||||
+ stdout().fd = proc.stdoutChannel.pipe[0];
|
||||
+ stderr().fd = proc.stderrChannel.pipe[0];
|
||||
+
|
||||
+ if (!proc.writeBuffer.isEmpty()) {
|
||||
+ stdin().fd = proc.stdinChannel.pipe[1];
|
||||
+ stdin().events = POLLOUT;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ int poll(int timeout)
|
||||
+ {
|
||||
+ return qt_safe_poll(fds, size(), timeout);
|
||||
+ }
|
||||
+
|
||||
+ pollfd &death() { return fds[0]; }
|
||||
+ pollfd &started() { return fds[1]; }
|
||||
+ pollfd &stdout() { return fds[2]; }
|
||||
+ pollfd &stderr() { return fds[3]; }
|
||||
+ pollfd &stdin() { return fds[4]; }
|
||||
+};
|
||||
+
|
||||
bool QProcessPrivate::waitForReadyRead(int msecs)
|
||||
{
|
||||
Q_Q(QProcess);
|
||||
@@ -1059,28 +1082,9 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
|
||||
stopWatch.start();
|
||||
|
||||
forever {
|
||||
- fd_set fdread;
|
||||
- fd_set fdwrite;
|
||||
-
|
||||
- FD_ZERO(&fdread);
|
||||
- FD_ZERO(&fdwrite);
|
||||
-
|
||||
- int nfds = deathPipe[0];
|
||||
- FD_SET(deathPipe[0], &fdread);
|
||||
-
|
||||
- if (processState == QProcess::Starting)
|
||||
- add_fd(nfds, childStartedPipe[0], &fdread);
|
||||
-
|
||||
- if (stdoutChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
|
||||
- if (stderrChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
|
||||
-
|
||||
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
|
||||
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
|
||||
-
|
||||
+ QProcessFDSet fdset(*this);
|
||||
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
|
||||
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
|
||||
+ int ret = fdset.poll(timeout);
|
||||
if (ret < 0) {
|
||||
break;
|
||||
}
|
||||
@@ -1090,18 +1094,18 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.started())) {
|
||||
if (!_q_startupNotification())
|
||||
return false;
|
||||
}
|
||||
|
||||
bool readyReadEmitted = false;
|
||||
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.stdout())) {
|
||||
bool canRead = _q_canReadStandardOutput();
|
||||
if (processChannel == QProcess::StandardOutput && canRead)
|
||||
readyReadEmitted = true;
|
||||
}
|
||||
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.stderr())) {
|
||||
bool canRead = _q_canReadStandardError();
|
||||
if (processChannel == QProcess::StandardError && canRead)
|
||||
readyReadEmitted = true;
|
||||
@@ -1109,13 +1113,13 @@ bool QProcessPrivate::waitForReadyRead(int msecs)
|
||||
if (readyReadEmitted)
|
||||
return true;
|
||||
|
||||
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
|
||||
+ if (qt_writable(fdset.stdin()))
|
||||
_q_canWrite();
|
||||
|
||||
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.death())) {
|
||||
if (_q_processDied())
|
||||
return false;
|
||||
- }
|
||||
+ }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1131,29 +1135,9 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
|
||||
stopWatch.start();
|
||||
|
||||
while (!writeBuffer.isEmpty()) {
|
||||
- fd_set fdread;
|
||||
- fd_set fdwrite;
|
||||
-
|
||||
- FD_ZERO(&fdread);
|
||||
- FD_ZERO(&fdwrite);
|
||||
-
|
||||
- int nfds = deathPipe[0];
|
||||
- FD_SET(deathPipe[0], &fdread);
|
||||
-
|
||||
- if (processState == QProcess::Starting)
|
||||
- add_fd(nfds, childStartedPipe[0], &fdread);
|
||||
-
|
||||
- if (stdoutChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
|
||||
- if (stderrChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
|
||||
-
|
||||
-
|
||||
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
|
||||
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
|
||||
-
|
||||
+ QProcessFDSet fdset(*this);
|
||||
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
|
||||
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
|
||||
+ int ret = fdset.poll(timeout);
|
||||
if (ret < 0) {
|
||||
break;
|
||||
}
|
||||
@@ -1164,24 +1148,24 @@ bool QProcessPrivate::waitForBytesWritten(int msecs)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.started())) {
|
||||
if (!_q_startupNotification())
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
|
||||
+ if (qt_writable(fdset.stdin()))
|
||||
return _q_canWrite();
|
||||
|
||||
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
|
||||
+ if (qt_readable(fdset.stdout()))
|
||||
_q_canReadStandardOutput();
|
||||
|
||||
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
|
||||
+ if (qt_readable(fdset.stderr()))
|
||||
_q_canReadStandardError();
|
||||
|
||||
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
|
||||
- if (_q_processDied())
|
||||
- return false;
|
||||
- }
|
||||
+ if (qt_readable(fdset.death())) {
|
||||
+ if (_q_processDied())
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1198,29 +1182,9 @@ bool QProcessPrivate::waitForFinished(int msecs)
|
||||
stopWatch.start();
|
||||
|
||||
forever {
|
||||
- fd_set fdread;
|
||||
- fd_set fdwrite;
|
||||
- int nfds = -1;
|
||||
-
|
||||
- FD_ZERO(&fdread);
|
||||
- FD_ZERO(&fdwrite);
|
||||
-
|
||||
- if (processState == QProcess::Starting)
|
||||
- add_fd(nfds, childStartedPipe[0], &fdread);
|
||||
-
|
||||
- if (stdoutChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stdoutChannel.pipe[0], &fdread);
|
||||
- if (stderrChannel.pipe[0] != -1)
|
||||
- add_fd(nfds, stderrChannel.pipe[0], &fdread);
|
||||
-
|
||||
- if (processState == QProcess::Running)
|
||||
- add_fd(nfds, deathPipe[0], &fdread);
|
||||
-
|
||||
- if (!writeBuffer.isEmpty() && stdinChannel.pipe[1] != -1)
|
||||
- add_fd(nfds, stdinChannel.pipe[1], &fdwrite);
|
||||
-
|
||||
+ QProcessFDSet fdset(*this);
|
||||
int timeout = qt_timeout_value(msecs, stopWatch.elapsed());
|
||||
- int ret = select_msecs(nfds + 1, &fdread, &fdwrite, timeout);
|
||||
+ int ret = fdset.poll(timeout);
|
||||
if (ret < 0) {
|
||||
break;
|
||||
}
|
||||
@@ -1230,20 +1194,20 @@ bool QProcessPrivate::waitForFinished(int msecs)
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (childStartedPipe[0] != -1 && FD_ISSET(childStartedPipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.started())) {
|
||||
if (!_q_startupNotification())
|
||||
return false;
|
||||
}
|
||||
- if (stdinChannel.pipe[1] != -1 && FD_ISSET(stdinChannel.pipe[1], &fdwrite))
|
||||
+ if (qt_writable(fdset.stdin()))
|
||||
_q_canWrite();
|
||||
|
||||
- if (stdoutChannel.pipe[0] != -1 && FD_ISSET(stdoutChannel.pipe[0], &fdread))
|
||||
+ if (qt_readable(fdset.stdout()))
|
||||
_q_canReadStandardOutput();
|
||||
|
||||
- if (stderrChannel.pipe[0] != -1 && FD_ISSET(stderrChannel.pipe[0], &fdread))
|
||||
+ if (qt_readable(fdset.stderr()))
|
||||
_q_canReadStandardError();
|
||||
|
||||
- if (deathPipe[0] == -1 || FD_ISSET(deathPipe[0], &fdread)) {
|
||||
+ if (qt_readable(fdset.death())) {
|
||||
if (_q_processDied())
|
||||
return true;
|
||||
}
|
||||
@@ -1253,10 +1217,10 @@ bool QProcessPrivate::waitForFinished(int msecs)
|
||||
|
||||
bool QProcessPrivate::waitForWrite(int msecs)
|
||||
{
|
||||
- fd_set fdwrite;
|
||||
- FD_ZERO(&fdwrite);
|
||||
- FD_SET(stdinChannel.pipe[1], &fdwrite);
|
||||
- return select_msecs(stdinChannel.pipe[1] + 1, 0, &fdwrite, msecs < 0 ? 0 : msecs) == 1;
|
||||
+ pollfd fd;
|
||||
+ fd.fd = stdinChannel.pipe[1];
|
||||
+ fd.events = POLLIN;
|
||||
+ return qt_safe_poll(&fd, 1, msecs);
|
||||
}
|
||||
|
||||
void QProcessPrivate::findExitCode()
|
||||
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
|
||||
index cc54798..ca178bb 100644
|
||||
--- a/src/corelib/kernel/qcore_unix.cpp
|
||||
+++ b/src/corelib/kernel/qcore_unix.cpp
|
||||
@@ -103,4 +103,165 @@ int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef Q_OS_VXWORKS
|
||||
+
|
||||
+int qt_safe_poll(struct pollfd *fds, int nfds, int timeout_ms, bool retry_eintr)
|
||||
+{
|
||||
+ if (nfds == 0)
|
||||
+ return 0;
|
||||
+ if (nfds < 0) {
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ // Retry on ret == 0 if the deadline has not yet passed because
|
||||
+ // Linux can return early from the syscall, without setting EINTR.
|
||||
+ if (timeout_ms < 0) {
|
||||
+ forever {
|
||||
+ int ret = ::poll(fds, nfds, -1);
|
||||
+ if (ret > 0)
|
||||
+ return ret;
|
||||
+ if (retry_eintr) {
|
||||
+ if (ret == 0 || ret == -1 && errno == EINTR) {
|
||||
+ continue;
|
||||
+ } else {
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (ret == 0) {
|
||||
+ errno = EINTR;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return ret;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ timeval previous = qt_gettime();
|
||||
+ timeval deadline = previous;
|
||||
+ deadline.tv_sec += timeout_ms / 1000;
|
||||
+ deadline.tv_usec += (timeout_ms % 1000) * 1000;
|
||||
+ if (deadline.tv_usec >= 1000000) {
|
||||
+ ++deadline.tv_sec;
|
||||
+ deadline.tv_usec -= 1000000;
|
||||
+ }
|
||||
+ int remaining = timeout_ms;
|
||||
+
|
||||
+ forever {
|
||||
+ int ret = ::poll(fds, nfds, remaining);
|
||||
+ if (ret > 0)
|
||||
+ return ret;
|
||||
+ timeval now = qt_gettime();
|
||||
+ if ((now.tv_sec > deadline.tv_sec // past deadline
|
||||
+ || (now.tv_sec == deadline.tv_sec
|
||||
+ && now.tv_usec >= deadline.tv_usec))
|
||||
+ || (now.tv_sec < previous.tv_sec // time warp
|
||||
+ || (now.tv_sec == previous.tv_sec
|
||||
+ && now.tv_usec < previous.tv_usec))
|
||||
+ || (ret < 0 && (errno != EINTR || !retry_eintr))) // other error
|
||||
+ return ret;
|
||||
+ if (ret == 0 && !retry_eintr) {
|
||||
+ errno = EINTR;
|
||||
+ return -1;
|
||||
+ }
|
||||
+ remaining = (deadline.tv_sec - now.tv_sec) * 1000
|
||||
+ + (deadline.tv_usec - now.tv_usec) / 1000;
|
||||
+ previous = now;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#else
|
||||
+
|
||||
+// Poll emulation for VxWorks.
|
||||
+
|
||||
+static int mark_bad_descriptors(pollfd *fds, int nfds)
|
||||
+{
|
||||
+ fd_set r;
|
||||
+ FD_ZERO(&r);
|
||||
+ struct timeval tv;
|
||||
+ tv.tv_sec = 0;
|
||||
+ tv.tv_usec = 0;
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ // Check each descriptor invidually for badness.
|
||||
+ for (int i = 0; i < nfds; ++i) {
|
||||
+ pollfd &fd(fds[i]);
|
||||
+ if (fd.fd >= 0) {
|
||||
+ FD_SET(fd.fd, &r);
|
||||
+ int ret = qt_safe_select(fd.fd + 1, &r, NULL, NULL, &tv);
|
||||
+ FD_CLR(fd.fd, &r);
|
||||
+ if (ret < 0 && errno == EBADF) {
|
||||
+ fd.revents = POLLNVAL;
|
||||
+ ++ret;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ Q_ASSERT(ret > 0);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+int qt_safe_poll(pollfd *fds, int nfds, int timeout, bool retry_eintr)
|
||||
+{
|
||||
+ fd_set r, w;
|
||||
+ FD_ZERO(&r);
|
||||
+ FD_ZERO(&w);
|
||||
+ int maxfd = -1;
|
||||
+
|
||||
+ // Extract the watched descriptors.
|
||||
+ for (int i = 0; i < nfds; ++i) {
|
||||
+ pollfd &fd(fds[i]);
|
||||
+ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
|
||||
+ if (fd.events & POLLIN) {
|
||||
+ FD_SET(fd.fd, &r);
|
||||
+ if (fd.fd > maxfd)
|
||||
+ maxfd = fd.fd;
|
||||
+ }
|
||||
+ if (fd.events & POLLOUT) {
|
||||
+ FD_SET(fd.fd, &w);
|
||||
+ if (fd.fd > maxfd)
|
||||
+ maxfd = fd.fd;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // If timeout is negative, wait indefinitely for activity.
|
||||
+ timeval tv;
|
||||
+ timeval *ptv;
|
||||
+ if (timeout >= 0) {
|
||||
+ tv.tv_sec = timeout / 1000;
|
||||
+ tv.tv_usec = (timeout % 1000) * 1000;
|
||||
+ ptv = &tv;
|
||||
+ } else
|
||||
+ ptv = NULL;
|
||||
+
|
||||
+ int ret;
|
||||
+ if (retry_eintr)
|
||||
+ ret = qt_safe_select(maxfd + 1, &r, &w, NULL, ptv);
|
||||
+ else
|
||||
+ ret = ::select(maxfd + 1, &r, &w, NULL, ptv);
|
||||
+ if (ret < 0 && errno == EBADF) {
|
||||
+ return mark_bad_descriptors(fds, nfds);
|
||||
+ }
|
||||
+ if (ret <= 0)
|
||||
+ return ret;
|
||||
+
|
||||
+ // Set the revents flags.
|
||||
+ ret = 0;
|
||||
+ for (int i = 0; i < nfds; ++i) {
|
||||
+ pollfd &fd(fds[i]);
|
||||
+ fd.revents = 0;
|
||||
+ if (fd.fd >= 0 && fd.fd < FD_SETSIZE) {
|
||||
+ if ((fd.events & POLLIN) && FD_ISSET(fd.fd, &r))
|
||||
+ fd.revents |= POLLIN;
|
||||
+ if ((fd.events & POLLOUT) && FD_ISSET(fd.fd, &w))
|
||||
+ fd.revents |= POLLOUT;
|
||||
+ if (fd.revents)
|
||||
+ ++ret;
|
||||
+ }
|
||||
+ }
|
||||
+ Q_ASSERT(ret > 0);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+#endif // Q_OS_VXWORKS
|
||||
+
|
||||
QT_END_NAMESPACE
|
||||
diff --git a/src/corelib/kernel/qcore_unix_p.h b/src/corelib/kernel/qcore_unix_p.h
|
||||
index 6342b03..f7f4767 100644
|
||||
--- a/src/corelib/kernel/qcore_unix_p.h
|
||||
+++ b/src/corelib/kernel/qcore_unix_p.h
|
||||
@@ -71,6 +71,8 @@
|
||||
|
||||
#if defined(Q_OS_VXWORKS)
|
||||
# include <ioLib.h>
|
||||
+#else
|
||||
+# include <poll.h>
|
||||
#endif
|
||||
|
||||
struct sockaddr;
|
||||
@@ -341,6 +343,36 @@ void qt_nanosleep(timespec amount);
|
||||
Q_CORE_EXPORT int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
|
||||
const struct timeval *tv);
|
||||
|
||||
+#ifdef Q_OS_VXWORKS
|
||||
+// Poll emulation for VxWorks. Provided by <poll.h> on other systems.
|
||||
+
|
||||
+struct pollfd {
|
||||
+ int fd;
|
||||
+ short events;
|
||||
+ short revents;
|
||||
+};
|
||||
+
|
||||
+#define POLLIN 1
|
||||
+#define POLLOUT 2
|
||||
+#define POLLERR 4
|
||||
+#define POLLHUP 8
|
||||
+#define POLLNVAL 16
|
||||
+#endif
|
||||
+
|
||||
+inline bool qt_readable(const pollfd &fd)
|
||||
+{
|
||||
+ return fd.fd >= 0 && (fd.revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL)) != 0;
|
||||
+}
|
||||
+
|
||||
+inline bool qt_writable(const pollfd &fd)
|
||||
+{
|
||||
+ return fd.fd >= 0 && (fd.revents & (POLLOUT | POLLHUP | POLLERR | POLLNVAL)) != 0;
|
||||
+}
|
||||
+
|
||||
+// Deprecated due to FD_SETSIZE limitation, use qt_safe_poll instead.
|
||||
+Q_CORE_EXPORT int qt_safe_poll(pollfd *fds, int nfds, int timeout,
|
||||
+ bool retry_eintr = true);
|
||||
+
|
||||
// according to X/OPEN we have to define semun ourselves
|
||||
// we use prefix as on some systems sem.h will have it
|
||||
struct semid_ds;
|
||||
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
|
||||
index 2bcf1ac..efb8128 100644
|
||||
--- a/src/network/socket/qlocalserver_unix.cpp
|
||||
+++ b/src/network/socket/qlocalserver_unix.cpp
|
||||
@@ -293,16 +293,11 @@ void QLocalServerPrivate::_q_onNewConnection()
|
||||
|
||||
void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
|
||||
{
|
||||
- fd_set readfds;
|
||||
- FD_ZERO(&readfds);
|
||||
- FD_SET(listenSocket, &readfds);
|
||||
+ struct pollfd fd;
|
||||
+ fd.fd = listenSocket;
|
||||
+ fd.events = POLLIN;
|
||||
|
||||
- timeval timeout;
|
||||
- timeout.tv_sec = msec / 1000;
|
||||
- timeout.tv_usec = (msec % 1000) * 1000;
|
||||
-
|
||||
- int result = -1;
|
||||
- result = qt_safe_select(listenSocket + 1, &readfds, 0, 0, (msec == -1) ? 0 : &timeout);
|
||||
+ int result = qt_safe_poll(&fd, 1, msec);
|
||||
if (-1 == result) {
|
||||
setError(QLatin1String("QLocalServer::waitForNewConnection"));
|
||||
closeServer();
|
||||
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
|
||||
index 49eb71a..c598c2b 100644
|
||||
--- a/src/network/socket/qlocalsocket_unix.cpp
|
||||
+++ b/src/network/socket/qlocalsocket_unix.cpp
|
||||
@@ -56,10 +56,6 @@
|
||||
#include <qdebug.h>
|
||||
#include <qelapsedtimer.h>
|
||||
|
||||
-#ifdef Q_OS_VXWORKS
|
||||
-# include <selectLib.h>
|
||||
-#endif
|
||||
-
|
||||
#define QT_CONNECT_TIMEOUT 30000
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@@ -524,25 +520,16 @@ bool QLocalSocket::waitForConnected(int msec)
|
||||
if (state() != ConnectingState)
|
||||
return (state() == ConnectedState);
|
||||
|
||||
- fd_set fds;
|
||||
- FD_ZERO(&fds);
|
||||
- FD_SET(d->connectingSocket, &fds);
|
||||
-
|
||||
- timeval timeout;
|
||||
- timeout.tv_sec = msec / 1000;
|
||||
- timeout.tv_usec = (msec % 1000) * 1000;
|
||||
+ pollfd fd;
|
||||
+ fd.fd = d->connectingSocket;
|
||||
+ fd.events = POLLIN | POLLOUT;
|
||||
|
||||
- // timeout can not be 0 or else select will return an error.
|
||||
- if (0 == msec)
|
||||
- timeout.tv_usec = 1000;
|
||||
-
|
||||
- int result = -1;
|
||||
- // on Linux timeout will be updated by select, but _not_ on other systems.
|
||||
+ int result;
|
||||
QElapsedTimer timer;
|
||||
+ int remaining = msec > 0 ? msec : 1000;
|
||||
timer.start();
|
||||
- while (state() == ConnectingState
|
||||
- && (-1 == msec || timer.elapsed() < msec)) {
|
||||
- result = ::select(d->connectingSocket + 1, &fds, 0, 0, &timeout);
|
||||
+ while (state() == ConnectingState) {
|
||||
+ result = qt_safe_poll(&fd, 1, remaining, /* retry_eintr */ false);
|
||||
if (-1 == result && errno != EINTR) {
|
||||
d->errorOccurred( QLocalSocket::UnknownSocketError,
|
||||
QLatin1String("QLocalSocket::waitForConnected"));
|
||||
@@ -550,6 +537,11 @@ bool QLocalSocket::waitForConnected(int msec)
|
||||
}
|
||||
if (result > 0)
|
||||
d->_q_connectToSocket();
|
||||
+ if (msec >= 0) {
|
||||
+ remaining = timer.elapsed() - msec;
|
||||
+ if (remaining < 0)
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
return (state() == ConnectedState);
|
||||
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
|
||||
index 4f3408b..a1bb298 100644
|
||||
--- a/src/network/socket/qnativesocketengine_unix.cpp
|
||||
+++ b/src/network/socket/qnativesocketengine_unix.cpp
|
||||
@@ -1122,48 +1122,40 @@ qint64 QNativeSocketEnginePrivate::nativeRead(char *data, qint64 maxSize)
|
||||
|
||||
int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool selectForRead) const
|
||||
{
|
||||
- fd_set fds;
|
||||
- FD_ZERO(&fds);
|
||||
- FD_SET(socketDescriptor, &fds);
|
||||
-
|
||||
- struct timeval tv;
|
||||
- tv.tv_sec = timeout / 1000;
|
||||
- tv.tv_usec = (timeout % 1000) * 1000;
|
||||
-
|
||||
- int retval;
|
||||
- if (selectForRead)
|
||||
- retval = qt_safe_select(socketDescriptor + 1, &fds, 0, 0, timeout < 0 ? 0 : &tv);
|
||||
- else
|
||||
- retval = qt_safe_select(socketDescriptor + 1, 0, &fds, 0, timeout < 0 ? 0 : &tv);
|
||||
-
|
||||
- return retval;
|
||||
+ struct pollfd fd;
|
||||
+ fd.fd = socketDescriptor;
|
||||
+ if (selectForRead) {
|
||||
+ fd.events = POLLIN;
|
||||
+ } else {
|
||||
+ fd.events = POLLOUT;
|
||||
+ }
|
||||
+ return qt_safe_poll(&fd, 1, timeout);
|
||||
}
|
||||
|
||||
int QNativeSocketEnginePrivate::nativeSelect(int timeout, bool checkRead, bool checkWrite,
|
||||
bool *selectForRead, bool *selectForWrite) const
|
||||
{
|
||||
- fd_set fdread;
|
||||
- FD_ZERO(&fdread);
|
||||
+ struct pollfd fd;
|
||||
+ fd.fd = socketDescriptor;
|
||||
if (checkRead)
|
||||
- FD_SET(socketDescriptor, &fdread);
|
||||
-
|
||||
- fd_set fdwrite;
|
||||
- FD_ZERO(&fdwrite);
|
||||
+ fd.events = POLLIN;
|
||||
+ else
|
||||
+ fd.events = 0;
|
||||
if (checkWrite)
|
||||
- FD_SET(socketDescriptor, &fdwrite);
|
||||
-
|
||||
- struct timeval tv;
|
||||
- tv.tv_sec = timeout / 1000;
|
||||
- tv.tv_usec = (timeout % 1000) * 1000;
|
||||
-
|
||||
- int ret;
|
||||
- ret = qt_safe_select(socketDescriptor + 1, &fdread, &fdwrite, 0, timeout < 0 ? 0 : &tv);
|
||||
-
|
||||
+ fd.events |= POLLOUT;
|
||||
+ int ret = qt_safe_poll(&fd, 1, timeout);
|
||||
if (ret <= 0)
|
||||
- return ret;
|
||||
- *selectForRead = FD_ISSET(socketDescriptor, &fdread);
|
||||
- *selectForWrite = FD_ISSET(socketDescriptor, &fdwrite);
|
||||
-
|
||||
+ return ret;
|
||||
+ bool r = (fd.revents & (POLLIN | POLLHUP | POLLERR)) != 0;
|
||||
+ bool w = (fd.revents & (POLLOUT | POLLHUP | POLLERR)) != 0;
|
||||
+ // Emulate the return value from select(2).
|
||||
+ ret = 0;
|
||||
+ if (r)
|
||||
+ ++ret;
|
||||
+ if (w)
|
||||
+ ++ret;
|
||||
+ *selectForRead = r;
|
||||
+ *selectForWrite = w;
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -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
|
|
@ -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,45 +0,0 @@
|
|||
From b0b08cc0e4e38504d6b833702f7477aee4e2a192 Mon Sep 17 00:00:00 2001
|
||||
From: Ralf Jung <post@ralfj.de>
|
||||
Date: Sun, 5 Jul 2015 12:15:29 +0200
|
||||
Subject: [PATCH] When a screen comes back online, the windows need to be told
|
||||
about it
|
||||
|
||||
On my system, this fixes the misbehavior of Qt applications when the (only) active screen is
|
||||
switched, e.g. from an external screen to the laptop.
|
||||
This behavior is caused by the screen() of widgets to be set to NULL when their screen goes away.
|
||||
When a new screen comes online, the widgets *should* be told about it, but they are not. The only
|
||||
place that "maybeSetScreen" is called is when an existing screen changes its geometry, but not
|
||||
when a screen gets enabled without its geometry being affected in any way (e.g. because it was
|
||||
just disabled via xrandr, but has been connected all along). This makes sure that "maybeSetScreen"
|
||||
is also called when a screen gets enabled.
|
||||
|
||||
Task-number: QTBUG-47041
|
||||
Change-Id: Ic72d6beaa544bf9a4efdbea0830b1bc0d6ce5362
|
||||
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
index 74f48b0..0867615 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
@@ -252,6 +252,14 @@ void QXcbConnection::updateScreens(const xcb_randr_notify_event_t *event)
|
||||
otherScreen->addVirtualSibling(screen);
|
||||
m_screens << screen;
|
||||
QXcbIntegration::instance()->screenAdded(screen, screen->isPrimary());
|
||||
+
|
||||
+ // Windows which had null screens have already had expose events by now.
|
||||
+ // They need to be told the screen is back, it's OK to render.
|
||||
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
|
||||
+ QXcbWindow *xcbWin = static_cast<QXcbWindow*>(window->handle());
|
||||
+ if (xcbWin)
|
||||
+ xcbWin->maybeSetScreen(screen);
|
||||
+ }
|
||||
}
|
||||
// else ignore disabled screens
|
||||
} else if (screen) {
|
||||
--
|
||||
2.3.5
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
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
|
||||
|
1293
qt5-qtbase.spec
1293
qt5-qtbase.spec
File diff suppressed because it is too large
Load Diff
|
@ -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)
|
||||
|
|
@ -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
|
|
@ -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,39 +1,33 @@
|
|||
diff --git a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
|
||||
index 340aa85..571a559 100644
|
||||
--- a/mkspecs/linux-g++-32/qmake.conf
|
||||
+++ b/mkspecs/linux-g++-32/qmake.conf
|
||||
@@ -9,6 +9,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
|
||||
QMAKE_CFLAGS = -m32
|
||||
QMAKE_LFLAGS = -m32
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
diff --git a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
|
||||
index 36fb6a8..9a07595 100644
|
||||
--- a/mkspecs/linux-g++-64/qmake.conf
|
||||
+++ b/mkspecs/linux-g++-64/qmake.conf
|
||||
@@ -12,6 +12,8 @@ QMAKE_INCREMENTAL_STYLE = sublib
|
||||
QMAKE_CFLAGS = -m64
|
||||
QMAKE_LFLAGS = -m64
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
diff --git a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
|
||||
index 35bce8f..5186f98 100644
|
||||
--- a/mkspecs/linux-g++/qmake.conf
|
||||
+++ b/mkspecs/linux-g++/qmake.conf
|
||||
@@ -6,6 +6,8 @@ MAKEFILE_GENERATOR = UNIX
|
||||
diff -r -u a/mkspecs/linux-g++/qmake.conf b/mkspecs/linux-g++/qmake.conf
|
||||
--- a/mkspecs/linux-g++/qmake.conf 2015-10-30 06:20:01.000000000 -0200
|
||||
+++ b/mkspecs/linux-g++/qmake.conf 2015-11-05 11:23:23.230741601 -0200
|
||||
@@ -5,6 +5,7 @@
|
||||
MAKEFILE_GENERATOR = UNIX
|
||||
CONFIG += incremental
|
||||
QMAKE_INCREMENTAL_STYLE = sublib
|
||||
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
+
|
||||
|
||||
include(../common/linux.conf)
|
||||
include(../common/gcc-base-unix.conf)
|
||||
diff -r -u a/mkspecs/linux-g++-32/qmake.conf b/mkspecs/linux-g++-32/qmake.conf
|
||||
--- a/mkspecs/linux-g++-32/qmake.conf 2015-10-30 06:20:01.000000000 -0200
|
||||
+++ b/mkspecs/linux-g++-32/qmake.conf 2015-11-05 11:22:19.761494470 -0200
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
QMAKE_CFLAGS = -m32
|
||||
QMAKE_LFLAGS = -m32
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
diff -r -u a/mkspecs/linux-g++-64/qmake.conf b/mkspecs/linux-g++-64/qmake.conf
|
||||
--- a/mkspecs/linux-g++-64/qmake.conf 2015-10-30 06:20:01.000000000 -0200
|
||||
+++ b/mkspecs/linux-g++-64/qmake.conf 2015-11-05 11:22:49.497610248 -0200
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
QMAKE_CFLAGS = -m64
|
||||
QMAKE_LFLAGS = -m64
|
||||
+QMAKE_CFLAGS_RELEASE += -O2
|
||||
|
||||
include(../common/gcc-base-unix.conf)
|
||||
include(../common/g++-unix.conf)
|
||||
|
|
|
@ -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,12 +0,0 @@
|
|||
diff -up qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp.QTBUG-43057 qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp
|
||||
--- qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp.QTBUG-43057 2014-12-05 10:24:31.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.4.0/src/tools/qdoc/qdocindexfiles.cpp 2014-12-17 14:47:19.393037164 -0600
|
||||
@@ -1327,7 +1327,7 @@ void QDocIndexFiles::generateIndexSectio
|
||||
const InnerNode* inner = static_cast<const InnerNode*>(node);
|
||||
|
||||
NodeList cnodes = inner->childNodes();
|
||||
- std::sort(cnodes.begin(), cnodes.end(), compareNodes);
|
||||
+ qSort(cnodes.begin(), cnodes.end(), compareNodes);
|
||||
|
||||
foreach (Node* child, cnodes) {
|
||||
generateIndexSections(writer, child, generateInternalNodes);
|
|
@ -1,196 +0,0 @@
|
|||
diff --git a/configure b/configure
|
||||
index 5ad29bb..7ff0df1 100644
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5060,10 +5060,8 @@ if [ "$CFG_XCB" != "no" ]; then
|
||||
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`"
|
||||
fi
|
||||
|
||||
- # libxcb version 1.10 was the first version that enables xcb-xkb by default,
|
||||
- # therefore the minimal xcb-xkb version we support is 1.10
|
||||
CFG_XKB=no
|
||||
- if $PKG_CONFIG --exists "xcb-xkb >= 1.10" 2>/dev/null; then
|
||||
+ if $PKG_CONFIG --exists "xcb-xkb" 2>/dev/null; then
|
||||
QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`"
|
||||
QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`"
|
||||
if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then
|
||||
@@ -5172,16 +5170,16 @@ MIN_REQ_XKBCOMMON="0.4.1"
|
||||
if [ "$CFG_XCB" != "no" ]; then
|
||||
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
|
||||
# Check if there is a suitable system-wide xkbcommon
|
||||
- if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
|
||||
- QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`"
|
||||
- QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`"
|
||||
+ if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
|
||||
+ QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`"
|
||||
+ QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon 2>/dev/null`"
|
||||
|
||||
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
|
||||
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
|
||||
CFG_XKBCOMMON=system
|
||||
elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
|
||||
- echo " xkbcommon support cannot be enabled because either xkbcommon or "
|
||||
- echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
|
||||
+ echo " xkbcommon support cannot be enabled because xkbcommon"
|
||||
+ echo " >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
|
||||
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -force-pkg-config?"
|
||||
echo " Turn on verbose messaging (-v) to $0 to see the final report."
|
||||
echo " If you believe this message is in error you may use the continue"
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
index 5510c3b..4762977 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
@@ -1761,7 +1761,7 @@ void QXcbConnection::initializeXKB()
|
||||
xcb_xkb_use_extension_cookie_t xkb_query_cookie;
|
||||
xcb_xkb_use_extension_reply_t *xkb_query;
|
||||
|
||||
- xkb_query_cookie = xcb_xkb_use_extension(c, XKB_X11_MIN_MAJOR_XKB_VERSION, XKB_X11_MIN_MINOR_XKB_VERSION);
|
||||
+ xkb_query_cookie = xcb_xkb_use_extension(c, XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION);
|
||||
xkb_query = xcb_xkb_use_extension_reply(c, xkb_query_cookie, 0);
|
||||
|
||||
if (!xkb_query) {
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
||||
index 5fb7457..487c3ba 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
||||
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
||||
@@ -693,50 +693,65 @@ void QXcbKeyboard::updateKeymap()
|
||||
// log only critical errors, we do our own error logging from printKeymapError()
|
||||
xkb_context_set_log_level(xkb_context, (xkb_log_level)XKB_LOG_LEVEL_CRITICAL);
|
||||
}
|
||||
- // update xkb keymap object
|
||||
- xkb_keymap_unref(xkb_keymap);
|
||||
- xkb_keymap = 0;
|
||||
|
||||
- struct xkb_state *new_state = 0;
|
||||
-#ifndef QT_NO_XKB
|
||||
- if (connection()->hasXKB()) {
|
||||
- xkb_keymap = xkb_x11_keymap_new_from_device(xkb_context, xcb_connection(), core_device_id, (xkb_keymap_compile_flags)0);
|
||||
- if (xkb_keymap) {
|
||||
- // Create a new keyboard state object for a keymap
|
||||
- new_state = xkb_x11_state_new_from_device(xkb_keymap, xcb_connection(), core_device_id);
|
||||
- }
|
||||
- }
|
||||
-#endif
|
||||
+ readXKBConfig();
|
||||
+ // Compile a keymap from RMLVO (rules, models, layouts, variants and options) names
|
||||
+ if (xkb_keymap)
|
||||
+ xkb_keymap_unref(xkb_keymap);
|
||||
+
|
||||
+ xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
|
||||
if (!xkb_keymap) {
|
||||
- // Compile a keymap from RMLVO (rules, models, layouts, variants and options) names
|
||||
- readXKBConfig();
|
||||
+ // last fallback is to used hard-coded keymap name, see DEFAULT_XKB_* in xkbcommon.pri
|
||||
+ qWarning() << "Qt: Could not determine keyboard configuration data"
|
||||
+ " from X server, will use hard-coded keymap configuration.";
|
||||
+ clearXKBConfig();
|
||||
xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
|
||||
- if (!xkb_keymap) {
|
||||
- // last fallback is to used hard-coded keymap name, see DEFAULT_XKB_* in xkbcommon.pri
|
||||
- qWarning() << "Qt: Could not determine keyboard configuration data"
|
||||
- " from X server, will use hard-coded keymap configuration.";
|
||||
- clearXKBConfig();
|
||||
- xkb_keymap = xkb_keymap_new_from_names(xkb_context, &xkb_names, (xkb_keymap_compile_flags)0);
|
||||
- }
|
||||
- if (xkb_keymap) {
|
||||
- new_state = xkb_state_new(xkb_keymap);
|
||||
- } else {
|
||||
- printKeymapError("Qt: Failed to compile a keymap!");
|
||||
- m_config = false;
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
}
|
||||
+ if (!xkb_keymap) {
|
||||
+ printKeymapError("Qt: Failed to compile a keymap!");
|
||||
+ m_config = false;
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ struct xkb_state *new_state = xkb_state_new(xkb_keymap);
|
||||
if (!new_state) {
|
||||
qWarning("Qt: Failed to create xkb state!");
|
||||
m_config = false;
|
||||
return;
|
||||
}
|
||||
- // update xkb state object
|
||||
- xkb_state_unref(xkb_state);
|
||||
- xkb_state = new_state;
|
||||
- if (!connection()->hasXKB())
|
||||
- updateXKBMods();
|
||||
+
|
||||
+ if (xkb_state) {
|
||||
+ xkb_state_unref(xkb_state);
|
||||
+ xkb_state = new_state;
|
||||
+ } else {
|
||||
+ xkb_state = new_state;
|
||||
+#ifndef QT_NO_XKB
|
||||
+ if (connection()->hasXKB()) {
|
||||
+ // get initial state from the X server (and keep it up-to-date at all times)
|
||||
+ xcb_xkb_get_state_cookie_t state;
|
||||
+ xcb_xkb_get_state_reply_t *init_state;
|
||||
+
|
||||
+ xcb_connection_t *c = xcb_connection();
|
||||
+ state = xcb_xkb_get_state(c, XCB_XKB_ID_USE_CORE_KBD);
|
||||
+ init_state = xcb_xkb_get_state_reply(c, state, 0);
|
||||
+ if (!init_state) {
|
||||
+ qWarning("Qt: couldn't retrieve an initial keyboard state");
|
||||
+ return;
|
||||
+ }
|
||||
+ /* The xkb keyboard state is comprised of the state of all keyboard modifiers,
|
||||
+ the keyboard group, and the state of the pointer buttons */
|
||||
+ xkb_state_update_mask(xkb_state,
|
||||
+ init_state->baseMods,
|
||||
+ init_state->latchedMods,
|
||||
+ init_state->lockedMods,
|
||||
+ init_state->baseGroup,
|
||||
+ init_state->latchedGroup,
|
||||
+ init_state->lockedGroup);
|
||||
+ free(init_state);
|
||||
+ } else
|
||||
+#endif
|
||||
+ updateXKBMods();
|
||||
+ }
|
||||
|
||||
checkForLatinLayout();
|
||||
}
|
||||
@@ -1097,11 +1112,23 @@ QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection)
|
||||
if (connection->hasXKB()) {
|
||||
updateVModMapping();
|
||||
updateVModToRModMapping();
|
||||
- core_device_id = xkb_x11_get_core_keyboard_device_id(xcb_connection());
|
||||
- if (core_device_id == -1) {
|
||||
+
|
||||
+ // get the core keyboard id
|
||||
+ xcb_xkb_get_device_info_cookie_t device_id_cookie;
|
||||
+ xcb_xkb_get_device_info_reply_t *device_id;
|
||||
+
|
||||
+ device_id_cookie = xcb_xkb_get_device_info(xcb_connection(),
|
||||
+ XCB_XKB_ID_USE_CORE_KBD,
|
||||
+ 0, 0, 0, 0, 0, 0);
|
||||
+
|
||||
+ device_id = xcb_xkb_get_device_info_reply(xcb_connection(), device_id_cookie, 0);
|
||||
+ if (!device_id) {
|
||||
qWarning("Qt: couldn't get core keyboard device info");
|
||||
return;
|
||||
}
|
||||
+
|
||||
+ core_device_id = device_id->deviceID;
|
||||
+ free(device_id);
|
||||
} else {
|
||||
#endif
|
||||
m_key_symbols = xcb_key_symbols_alloc(xcb_connection());
|
||||
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
|
||||
index 9f1cf16..3beee7b 100644
|
||||
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
|
||||
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
|
||||
@@ -39,9 +39,6 @@
|
||||
#include <xcb/xcb_keysyms.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
||||
-#ifndef QT_NO_XKB
|
||||
-#include <xkbcommon/xkbcommon-x11.h>
|
||||
-#endif
|
||||
|
||||
#include <QEvent>
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/configure qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure
|
||||
--- qtbase-opensource-src-5.4.0-rc-old_xcb/configure 2014-11-29 03:07:40.000000000 +0100
|
||||
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure 2014-11-29 03:32:16.000000000 +0100
|
||||
@@ -5144,7 +5144,7 @@
|
||||
fi
|
||||
|
||||
# Detect libxkbcommon
|
||||
-MIN_REQ_XKBCOMMON="0.4.1"
|
||||
+MIN_REQ_XKBCOMMON="0.3.0"
|
||||
# currently only xcb platform plugin supports building xkbcommon
|
||||
if [ "$CFG_XCB" != "no" ]; then
|
||||
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
|
||||
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp
|
||||
--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:29:53.000000000 +0100
|
||||
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:35:36.000000000 +0100
|
||||
@@ -971,7 +971,7 @@
|
||||
}
|
||||
|
||||
QList<int> result;
|
||||
- int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode));
|
||||
+ int baseQtKey = keysymToQtKey(sym, modifiers, keysymToUnicode(sym));
|
||||
result += (baseQtKey + modifiers); // The base key is _always_ valid, of course
|
||||
|
||||
xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift");
|
||||
@@ -1008,7 +1008,7 @@
|
||||
continue;
|
||||
|
||||
Qt::KeyboardModifiers mods = modifiers & ~neededMods;
|
||||
- qtKey = keysymToQtKey(sym, mods, lookupString(kb_state, keycode));
|
||||
+ qtKey = keysymToQtKey(sym, mods, keysymToUnicode(sym));
|
||||
if (!qtKey || qtKey == baseQtKey)
|
||||
continue;
|
||||
|
||||
@@ -1462,7 +1462,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- QString string = lookupString(xkb_state, code);
|
||||
+ QString string = keysymToUnicode(sym);
|
||||
int count = string.size();
|
||||
string.truncate(count);
|
||||
|
||||
@@ -1535,12 +1535,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
-QString QXcbKeyboard::lookupString(struct xkb_state *state, xcb_keycode_t code) const
|
||||
+QString QXcbKeyboard::keysymToUnicode(xcb_keysym_t sym) const
|
||||
{
|
||||
QByteArray chars;
|
||||
- chars.resize(1 + xkb_state_key_get_utf8(state, code, 0, 0));
|
||||
- // equivalent of XLookupString
|
||||
- xkb_state_key_get_utf8(state, code, chars.data(), chars.size());
|
||||
+ int bytes;
|
||||
+ chars.resize(7);
|
||||
+
|
||||
+ bytes = xkb_keysym_to_utf8(sym, chars.data(), chars.size());
|
||||
+
|
||||
+ if (bytes == -1)
|
||||
+ qWarning("QXcbKeyboard::handleKeyEvent - buffer too small");
|
||||
+ chars.resize(bytes-1);
|
||||
+
|
||||
return QString::fromUtf8(chars);
|
||||
}
|
||||
|
||||
diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h
|
||||
--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:07:40.000000000 +0100
|
||||
+++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:32:16.000000000 +0100
|
||||
@@ -75,7 +75,7 @@
|
||||
void handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time);
|
||||
|
||||
void resolveMaskConflicts();
|
||||
- QString lookupString(struct xkb_state *state, xcb_keycode_t code) const;
|
||||
+ QString keysymToUnicode(xcb_keysym_t sym) const;
|
||||
int keysymToQtKey(xcb_keysym_t keysym) const;
|
||||
int keysymToQtKey(xcb_keysym_t keysym, Qt::KeyboardModifiers &modifiers, QString text) const;
|
||||
void printKeymapError(const char *error) const;
|
|
@ -1,41 +0,0 @@
|
|||
diff -rupN qtbase-opensource-src-5.5.0/src/gui/kernel/qplatformintegration.cpp qtbase-opensource-src-5.5.0-new/src/gui/kernel/qplatformintegration.cpp
|
||||
--- qtbase-opensource-src-5.5.0/src/gui/kernel/qplatformintegration.cpp 2015-06-29 22:04:53.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.0-new/src/gui/kernel/qplatformintegration.cpp 2015-07-12 10:24:17.195000304 +0200
|
||||
@@ -456,6 +456,14 @@ void QPlatformIntegration::screenAdded(Q
|
||||
} else {
|
||||
QGuiApplicationPrivate::screen_list.append(screen);
|
||||
}
|
||||
+
|
||||
+ // All screens might have been removed before a new one is added, so
|
||||
+ // iterate over the toplevel windows and set their screen to the current
|
||||
+ // primary screen if the window has no screen set
|
||||
+ foreach (QWindow *window, QGuiApplication::topLevelWindows()) {
|
||||
+ if (window->screen() == 0)
|
||||
+ window->setScreen(QGuiApplicationPrivate::screen_list.at(0));
|
||||
+ }
|
||||
emit qGuiApp->screenAdded(screen);
|
||||
}
|
||||
|
||||
diff -rupN qtbase-opensource-src-5.5.0/src/gui/kernel/qwindow.cpp qtbase-opensource-src-5.5.0-new/src/gui/kernel/qwindow.cpp
|
||||
--- qtbase-opensource-src-5.5.0/src/gui/kernel/qwindow.cpp 2015-06-29 22:04:52.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.0-new/src/gui/kernel/qwindow.cpp 2015-07-12 11:51:18.832889497 +0200
|
||||
@@ -372,15 +372,14 @@ void QWindowPrivate::setTopLevelScreen(Q
|
||||
return;
|
||||
}
|
||||
if (newScreen != topLevelScreen) {
|
||||
- const bool shouldRecreate = recreate && windowRecreationRequired(newScreen);
|
||||
- const bool shouldShow = visibilityOnDestroy && !topLevelScreen;
|
||||
+ const bool shouldRecreate = recreate/* && windowRecreationRequired(newScreen)*/;
|
||||
if (shouldRecreate && platformWindow)
|
||||
q->destroy();
|
||||
connectToScreen(newScreen);
|
||||
- if (shouldShow)
|
||||
- q->setVisible(true);
|
||||
- else if (newScreen && shouldRecreate)
|
||||
+ if (newScreen && shouldRecreate) {
|
||||
create(true);
|
||||
+ q->setVisible(visibilityOnDestroy);
|
||||
+ }
|
||||
emitScreenChangedRecursion(newScreen);
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
diff -up qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp
|
||||
--- qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp.qdbusconnection_no_debug 2015-02-16 22:56:38.000000000 -0600
|
||||
+++ qtbase-opensource-src-5.4.1/src/dbus/qdbusconnection.cpp 2015-04-25 10:48:52.099668703 -0500
|
||||
@@ -1056,8 +1056,10 @@ public:
|
||||
// make sure this connection is running on the main thread
|
||||
QCoreApplication *instance = QCoreApplication::instance();
|
||||
if (!instance) {
|
||||
+#ifndef QT_NO_DEBUG
|
||||
qWarning("QDBusConnection: %s D-Bus connection created before QCoreApplication. Application may misbehave.",
|
||||
type == SessionBus ? "session" : type == SystemBus ? "system" : "generic");
|
||||
+#endif
|
||||
} else if (QDBusConnectionPrivate::d(*this)) {
|
||||
QDBusConnectionPrivate::d(*this)->moveToThread(instance->thread());
|
||||
}
|
|
@ -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;
|
|
@ -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>
|
|
@ -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
|
|
@ -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)
|
|
@ -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
|
|
@ -0,0 +1,3 @@
|
|||
[Rules]
|
||||
*.debug=false
|
||||
qt.qpa.xcb.xcberror.warning=false
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
687e2b122fa2c3390b5e20a166d38038 qtbase-opensource-src-5.5.1.tar.xz
|
||||
SHA512 (qtbase-everywhere-src-5.14.2.tar.xz) = 8c83e06d58b56e9f288e83d6c3dd4ad6cc9f1eb1a32c7b44fb912fda34ed7255766fd9fa60cd740ee001df7d6172f25df05f1f95e986c3e793fbcd9bf4f18de9
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
qtbase-everywhere-src
|
|
@ -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