aboutsummaryrefslogtreecommitdiff
path: root/src/qt/guiutil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/guiutil.cpp')
-rw-r--r--src/qt/guiutil.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index ac69bd07e9..ad530a78e4 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -17,6 +17,7 @@
#include <QClipboard>
#include <QFileDialog>
#include <QDesktopServices>
+#include <QThread>
QString GUIUtil::dateTimeStr(qint64 nTime)
{
@@ -184,3 +185,14 @@ QString GUIUtil::getSaveFileName(QWidget *parent, const QString &caption,
return result;
}
+Qt::ConnectionType GUIUtil::blockingGUIThreadConnection()
+{
+ if(QThread::currentThread() != QCoreApplication::instance()->thread())
+ {
+ return Qt::BlockingQueuedConnection;
+ }
+ else
+ {
+ return Qt::DirectConnection;
+ }
+}