summaryrefslogtreecommitdiffstats
path: root/tests/postbuild
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2020-05-20 12:54:05 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2020-05-20 11:22:15 +0000
commit0d1939aa7f1d64216b3aab0b5a6542025fa22064 (patch)
tree5d69646c2664ac41ece79a4d9045472b4419ce89 /tests/postbuild
parentc944784fbc4be7f72bb9ec9d8cfdb137e1bd3f9d (diff)
Fix build with latest qtbase dev
Change-Id: If39b8ad925b1cdbc6e3bf846b655b7a2c7894e48 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/postbuild')
-rw-r--r--tests/postbuild/guiapplauncher/windowmanager.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/postbuild/guiapplauncher/windowmanager.cpp b/tests/postbuild/guiapplauncher/windowmanager.cpp
index 6c226bd8..c2e9f774 100644
--- a/tests/postbuild/guiapplauncher/windowmanager.cpp
+++ b/tests/postbuild/guiapplauncher/windowmanager.cpp
@@ -27,7 +27,7 @@
****************************************************************************/
#include "windowmanager.h"
-#include <QtCore/QTime>
+#include <QtCore/QElapsedTimer>
#include <QtCore/QThread>
#include <QtCore/QDebug>
#include <QtCore/QTextStream>
@@ -137,7 +137,7 @@ static Window waitForTopLevelMapped(Display *display, unsigned count, int timeOu
xa_wm_state = XInternAtom(display, "WM_STATE", False);
#endif
- QTime elapsedTime;
+ QElapsedTimer elapsedTime;
elapsedTime.start();
while (mappingsCount) {
if (elapsedTime.elapsed() > timeOutMS) {
@@ -366,8 +366,8 @@ static BOOL CALLBACK findProcessWindowEnumWindowProc(HWND hwnd, LPARAM lParam)
}
QString Win_WindowManager::waitForTopLevelWindowImpl(unsigned /* count */, Q_PID pid, int timeOutMS, QString *errorMessage)
-{
- QTime elapsed;
+{
+ QElapsedTimer elapsed;
elapsed.start();
// First, wait until the application is up
if (WaitForInputIdle(pid->hProcess, timeOutMS) != 0) {
@@ -376,7 +376,7 @@ QString Win_WindowManager::waitForTopLevelWindowImpl(unsigned /* count */, Q_PID
}
// Try to locate top level app window. App still might be in splash screen or initialization
// phase.
- const int remainingMilliSeconds = qMax(timeOutMS - elapsed.elapsed(), 500);
+ const int remainingMilliSeconds = qMax(timeOutMS - elapsed.elapsed(), qint64(500));
const int attempts = 10;
const int intervalMilliSeconds = remainingMilliSeconds / attempts;
for (int a = 0; a < attempts; a++) {