Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit b4dc8c6

Browse files
authored
Merge pull request #195 from redhatrises/use_qt_sleep
Use QT interals for sleep rather than unistd.h
2 parents c30271a + f95832c commit b4dc8c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DiagnosticsDialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#include <QAbstractEventDispatcher>
2525
#include <QApplication>
2626
#include <QClipboard>
27+
#include <QThread>
2728

2829
#include <iostream>
29-
#include <unistd.h>
3030

3131
DiagnosticsDialog::DiagnosticsDialog(QWidget* parent):
3232
QDialog(parent)
@@ -64,7 +64,7 @@ void DiagnosticsDialog::waitUntilHidden(unsigned int interval)
6464
while (isVisible())
6565
{
6666
QAbstractEventDispatcher::instance(0)->processEvents(QEventLoop::AllEvents);
67-
usleep(interval * 1000);
67+
QThread::usleep(interval * 1000);
6868
}
6969
}
7070

0 commit comments

Comments
 (0)