58 |
#include <QTimer> |
#include <QTimer> |
59 |
#include <QDateTime> |
#include <QDateTime> |
60 |
|
|
61 |
|
#include <QElapsedTimer> |
62 |
|
|
63 |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) |
64 |
#include <QMimeData> |
#include <QMimeData> |
65 |
#endif |
#endif |
2931 |
|
|
2932 |
// Give it some time to terminate gracefully and stabilize... |
// Give it some time to terminate gracefully and stabilize... |
2933 |
if (bGraceWait) { |
if (bGraceWait) { |
2934 |
QTime t; |
QElapsedTimer timer; |
2935 |
t.start(); |
timer.start(); |
2936 |
while (t.elapsed() < QSAMPLER_TIMER_MSECS) |
while (timer.elapsed() < QSAMPLER_TIMER_MSECS) |
2937 |
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); |
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); |
2938 |
} |
} |
2939 |
} |
} |
2963 |
// Force final server shutdown... |
// Force final server shutdown... |
2964 |
m_pServer->kill(); |
m_pServer->kill(); |
2965 |
// Give it some time to terminate gracefully and stabilize... |
// Give it some time to terminate gracefully and stabilize... |
2966 |
QTime t; |
QElapsedTimer timer; |
2967 |
t.start(); |
timer.start(); |
2968 |
while (t.elapsed() < QSAMPLER_TIMER_MSECS) |
while (timer.elapsed() < QSAMPLER_TIMER_MSECS) |
2969 |
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); |
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents); |
2970 |
} |
} |
2971 |
// Force final server shutdown... |
// Force final server shutdown... |