summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-06 01:01:08 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-10-06 01:01:08 +0200
commit2c4b44d7500be72b6eb74c4989e7311b3f924119 (patch)
tree8cf8cb8aa36f18ee9474486178f51c7fe0770ee8 /src/plugins
parent7e2016de5ee6d9cc2c5d6b94fab4bc56a8a33303 (diff)
parent327b305e95187fda869c5af407e78a17e0e381cd (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm13
-rw-r--r--src/plugins/sqldrivers/ibase/qsql_ibase.cpp8
2 files changed, 9 insertions, 12 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 8ff2890ed2..f212b3e3f0 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1272,14 +1272,11 @@ void QCocoaWindow::windowWillClose()
bool QCocoaWindow::windowShouldClose()
{
qCDebug(lcQpaWindow) << "QCocoaWindow::windowShouldClose" << window();
- // This callback should technically only determine if the window
- // should (be allowed to) close, but since our QPA API to determine
- // that also involves actually closing the window we do both at the
- // same time, instead of doing the latter in windowWillClose.
- bool accepted = false;
- QWindowSystemInterface::handleCloseEvent(window(), &accepted);
- QWindowSystemInterface::flushWindowSystemEvents();
- return accepted;
+ // This callback should technically only determine if the window
+ // should (be allowed to) close, but since our QPA API to determine
+ // that also involves actually closing the window we do both at the
+ // same time, instead of doing the latter in windowWillClose.
+ return QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::SynchronousDelivery>(window());
}
// ----------------------------- QPA forwarding -----------------------------
diff --git a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
index b0b5375222..d0928fe6ab 100644
--- a/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
+++ b/src/plugins/sqldrivers/ibase/qsql_ibase.cpp
@@ -40,6 +40,7 @@
#include "qsql_ibase_p.h"
#include <qcoreapplication.h>
#include <qdatetime.h>
+#include <qdeadlinetimer.h>
#include <qvariant.h>
#include <qsqlerror.h>
#include <qsqlfield.h>
@@ -1570,10 +1571,9 @@ void QIBaseDriver::close()
d->eventBuffers.clear();
#if defined(FB_API_VER)
- // Workaround for Firebird crash
- QTime timer;
- timer.start();
- while (timer.elapsed() < 500)
+ // TODO check whether this workaround for Firebird crash is still needed
+ QDeadlineTimer timer(500);
+ while (!timer.hasExpired())
QCoreApplication::processEvents();
#endif
}