summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-10 01:00:18 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-12-10 01:00:19 +0100
commit0a88c5e92ba621ff9dda22d42636cabdf8493098 (patch)
tree41167b8a6a8c8e5d2f3384f7a4deba7a5dc91fbe /src
parent8d7542acad18a2f1be701242d655015263f3147a (diff)
parentcf708de03aa96d18c5bc043c90b2795fcf1b0517 (diff)
Merge remote-tracking branch 'origin/5.11' into 5.12
Diffstat (limited to 'src')
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp27
-rw-r--r--src/plugins/platforms/windows/qwindowssystemtrayicon.cpp18
-rw-r--r--src/widgets/kernel/qopenglwidget.cpp1
3 files changed, 32 insertions, 14 deletions
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index fd58e9548e..299df6b685 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -824,7 +824,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
@@ -857,14 +857,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/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());