aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpaster
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2021-01-28 11:29:14 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2021-01-29 15:24:41 +0000
commitbe1d33299e48a14d2feecb924537752a76d5fdcc (patch)
tree2e48ef6714beb9020d3d8d05cd7ee4ee5147b71d /src/plugins/cpaster
parent9c646d55cde151fc640dd8abf6aeccf9153cf5e9 (diff)
Use invokeMethod instead of single shot timer with 0 timeout
Refactor it in coreplugin. Change-Id: I6aaad1b9270a8ff8a4a0bea6a1fff806b2fe190b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpaster')
-rw-r--r--src/plugins/cpaster/frontend/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/cpaster/frontend/main.cpp b/src/plugins/cpaster/frontend/main.cpp
index afdfdd9166..b2aba50ac3 100644
--- a/src/plugins/cpaster/frontend/main.cpp
+++ b/src/plugins/cpaster/frontend/main.cpp
@@ -29,7 +29,6 @@
#include <QFile>
#include <QObject>
-#include <QTimer>
#include <QCoreApplication>
#include <cstdio>
@@ -109,7 +108,7 @@ int main(int argc, char *argv[])
return EXIT_SUCCESS;
case ArgumentsCollector::RequestTypePaste: {
PasteReceiver pr(argsCollector.protocol(), argsCollector.inputFilePath());
- QTimer::singleShot(0, &pr, &PasteReceiver::paste);
+ QMetaObject::invokeMethod(&pr, &PasteReceiver::paste, Qt::QueuedConnection);
return app.exec();
}
}