Compare commits

...
Author SHA1 Message Date
Matthieu Gallien 437fb03bc1 try to detect if QApplication::notify is taking too much time
Signed-off-by: Matthieu Gallien <[email protected]>
2025-02-06 17:59:41 +01:00
2 changed files with 14 additions and 0 deletions

No files matched your search

+12
View File
@@ -69,6 +69,7 @@
#include <QVersionNumber>
#include <QRandomGenerator>
#include <QHttp2Configuration>
#include <QElapsedTimer>
class QSocket;
@@ -1114,4 +1115,15 @@ bool Application::event(QEvent *event)
return SharedTools::QtSingleApplication::event(event);
}
bool Application::notify(QObject *object, QEvent *event)
{
QElapsedTimer timer;
timer.start();
const auto result = SharedTools::QtSingleApplication::notify(object, event);
if (timer.elapsed() > 200) {
qCCritical(lcApplication()) << "stuck main thread";
}
return result;
}
} // namespace OCC
+2
View File
@@ -74,6 +74,8 @@ public:
bool event(QEvent *event) override;
bool notify(QObject *, QEvent *) override;
public slots:
// TODO: this should not be public
void slotownCloudWizardDone(int);