diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-11 01:00:12 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-12-11 01:00:13 +0100 |
commit | a2fd99c430e253ac9c695ffdad635e6882eb910a (patch) | |
tree | 475639f056e84b3aeb51bea6c44064ca2f90fa19 /src | |
parent | b688c7e99a8def9db836d1d6ab7388ae14a5d5b0 (diff) | |
parent | d43ac840e5d5a0a2df9e8adce276c956c98be6aa (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I91e684e74c36467efda8ded6ed19791baa0c1a1f
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qrandom.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfont_p.h | 2 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 27 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoatheme.mm | 7 | ||||
-rw-r--r-- | src/plugins/platforms/platforms.pro | 2 | ||||
-rw-r--r-- | src/plugins/platforms/windows/qwindowssystemtrayicon.cpp | 18 | ||||
-rw-r--r-- | src/widgets/kernel/qopenglwidget.cpp | 1 | ||||
-rw-r--r-- | src/widgets/styles/qfusionstyle.cpp | 1 | ||||
-rw-r--r-- | src/widgets/widgets/qdatetimeedit.cpp | 2 |
9 files changed, 44 insertions, 20 deletions
diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 03534cf453..6195c324e7 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -48,7 +48,7 @@ #include <errno.h> -#if !QT_CONFIG(getentropy) && !defined(Q_OS_BSD4) && !defined(Q_OS_WIN) +#if !QT_CONFIG(getentropy) && (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN) # include "qdeadlinetimer.h" # include "qhashfunctions.h" @@ -259,7 +259,7 @@ static void fallback_fill(quint32 *, qsizetype) Q_DECL_NOTHROW // no fallback necessary, getentropy cannot fail under normal circumstances Q_UNREACHABLE(); } -#elif defined(Q_OS_BSD4) +#elif defined(Q_OS_BSD4) && !defined(__GLIBC__) static void fallback_update_seed(unsigned) {} static void fallback_fill(quint32 *ptr, qsizetype left) Q_DECL_NOTHROW { diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 14c01766ba..f8835dd513 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -214,7 +214,7 @@ private: }; -class Q_AUTOTEST_EXPORT QFontCache : public QObject +class Q_GUI_EXPORT QFontCache : public QObject { public: // note: these static functions work on a per-thread basis diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index f9e8f01222..01aa06446c 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -866,7 +866,7 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl() // reason, we will search a few common paths (see findAllLibSsl() above) in hopes // we find one that works. // - // If that fails, for OpenSSL 1.0 we also try a fallback -- just look up + // If that fails, for OpenSSL 1.0 we also try some fallbacks -- look up // libssl.so with a hardcoded soname. The reason is QTBUG-68156: the binary // builds of Qt happen (at the time of this writing) on RHEL machines, // which change SHLIB_VERSION_NUMBER to a non-portable string. When running @@ -899,14 +899,23 @@ static QPair<QLibrary*, QLibrary*> loadOpenSsl() } #if !QT_CONFIG(opensslv11) - // first-and-half attempt: for OpenSSL 1.0 try to load an hardcoded soname. - libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String("1.0.0")); - libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String("1.0.0")); - if (libcrypto->load() && libssl->load()) { - return pair; - } else { - libssl->unload(); - libcrypto->unload(); + // first-and-half attempts: for OpenSSL 1.0 try to load some hardcoded sonames: + // - "1.0.0" is the official upstream one + // - "1.0.2" is found on some distributions (e.g. Debian) that patch OpenSSL + static const QLatin1String fallbackSonames[] = { + QLatin1String("1.0.0"), + QLatin1String("1.0.2") + }; + + for (auto fallbackSoname : fallbackSonames) { + libssl->setFileNameAndVersion(QLatin1String("ssl"), fallbackSoname); + libcrypto->setFileNameAndVersion(QLatin1String("crypto"), fallbackSoname); + if (libcrypto->load() && libssl->load()) { + return pair; + } else { + libssl->unload(); + libcrypto->unload(); + } } #endif #endif diff --git a/src/plugins/platforms/cocoa/qcocoatheme.mm b/src/plugins/platforms/cocoa/qcocoatheme.mm index a2229159b5..240deeddbd 100644 --- a/src/plugins/platforms/cocoa/qcocoatheme.mm +++ b/src/plugins/platforms/cocoa/qcocoatheme.mm @@ -53,11 +53,13 @@ #include "qcocoahelpers.h" #include <QtCore/qfileinfo.h> +#include <QtGui/private/qfont_p.h> #include <QtGui/private/qguiapplication_p.h> #include <QtGui/private/qcoregraphics_p.h> #include <QtGui/qpainter.h> #include <QtGui/qtextformat.h> #include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h> +#include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h> #include <QtThemeSupport/private/qabstractfileiconengine_p.h> #include <qpa/qplatformdialoghelper.h> #include <qpa/qplatformintegration.h> @@ -162,6 +164,11 @@ void QCocoaTheme::handleSystemThemeChange() m_systemPalette = qt_mac_createSystemPalette(); m_palettes = qt_mac_createRolePalettes(); + if (QCoreTextFontEngine::fontSmoothing() == QCoreTextFontEngine::FontSmoothing::Grayscale) { + // Re-populate glyph caches based on the new appearance's assumed text fill color + QFontCache::instance()->clear(); + } + QWindowSystemInterface::handleThemeChange(nullptr); } diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro index 5bf2b77421..db2a31d1a5 100644 --- a/src/plugins/platforms/platforms.pro +++ b/src/plugins/platforms/platforms.pro @@ -46,7 +46,7 @@ haiku { SUBDIRS += haiku } -wasm: SUBDIRS = wasm +wasm: SUBDIRS += wasm qtConfig(mirclient): SUBDIRS += mirclient diff --git a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp index 901d132ea5..3c27f2914d 100644 --- a/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp +++ b/src/plugins/platforms/windows/qwindowssystemtrayicon.cpp @@ -382,12 +382,20 @@ bool QWindowsSystemTrayIcon::winEvent(const MSG &message, long *result) emit activated(DoubleClick); // release we must ignore it break; case WM_CONTEXTMENU: { + // QTBUG-67966: Coordinates may be out of any screen in PROCESS_DPI_UNAWARE mode + // since hi-res coordinates are delivered in this case (Windows issue). + // Default to primary screen with check to prevent a crash. const QPoint globalPos = QPoint(GET_X_LPARAM(message.wParam), GET_Y_LPARAM(message.wParam)); - const QPlatformScreen *screen = QWindowsContext::instance()->screenManager().screenAtDp(globalPos); - emit contextMenuRequested(globalPos, screen); - emit activated(Context); - if (m_menu) - m_menu->trackPopupMenu(message.hwnd, globalPos.x(), globalPos.y()); + const auto &screenManager = QWindowsContext::instance()->screenManager(); + const QPlatformScreen *screen = screenManager.screenAtDp(globalPos); + if (!screen) + screen = screenManager.screens().value(0); + if (screen) { + emit contextMenuRequested(globalPos, screen); + emit activated(Context); + if (m_menu) + m_menu->trackPopupMenu(message.hwnd, globalPos.x(), globalPos.y()); + } } break; case NIN_BALLOONUSERCLICK: diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index ed0fe0ed91..89f860150f 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -756,6 +756,7 @@ void QOpenGLWidgetPrivate::recreateFbo() fbo->bind(); context->functions()->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + flushPending = true; // Make sure the FBO is initialized before use paintDevice->setSize(deviceSize); paintDevice->setDevicePixelRatio(q->devicePixelRatioF()); diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index df151067df..c565932889 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -725,7 +725,6 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem, // Draw Outline painter->setPen( QPen(hasFocus ? highlightedOutline : outline)); - painter->setBrush(option->palette.base()); painter->drawRoundedRect(r.adjusted(0, 0, -1, -1), 2, 2); if (hasFocus) { diff --git a/src/widgets/widgets/qdatetimeedit.cpp b/src/widgets/widgets/qdatetimeedit.cpp index 68bfd175ff..c66400f423 100644 --- a/src/widgets/widgets/qdatetimeedit.cpp +++ b/src/widgets/widgets/qdatetimeedit.cpp @@ -553,7 +553,7 @@ void QDateTimeEdit::setMaximumTime(const QTime &max) { Q_D(QDateTimeEdit); if (max.isValid()) { - const QDateTime m(d->maximum.toDate(), max); + const QDateTime m(d->maximum.toDate(), max, d->spec); setMaximumDateTime(m); } } |