diff options
author | hjk <qthjk@ovi.com> | 2011-11-19 14:10:31 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-11-21 13:15:14 +0100 |
commit | 2f9608a18df17db88dd2533b06d0b864e843c934 (patch) | |
tree | a48d646b403d1e3631b09bb0f5e5bcce02e1d2c6 /installerbuilder/libinstaller/qtpatch.cpp | |
parent | dfb16001d52da19931d893fa0e09ccdacfc4739d (diff) |
Remaining whitespace, removal of empty destructors etc.
Change-Id: I9f99ae71e832586432d6fc493a701c5d5d074d6a
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder/libinstaller/qtpatch.cpp')
-rw-r--r-- | installerbuilder/libinstaller/qtpatch.cpp | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/installerbuilder/libinstaller/qtpatch.cpp b/installerbuilder/libinstaller/qtpatch.cpp index 4e70a5300..c687adb55 100644 --- a/installerbuilder/libinstaller/qtpatch.cpp +++ b/installerbuilder/libinstaller/qtpatch.cpp @@ -45,7 +45,6 @@ #include <QCoreApplication> #include <QByteArrayMatcher> - #ifdef Q_OS_WIN #include <windows.h> // for Sleep #endif @@ -55,33 +54,27 @@ #include <time.h> #endif -//"anonymous" namespace to make clear that this is only for inside use -namespace { - void sleepCopiedFromQTest(int ms) - { - if (ms < 0) - return; - #ifdef Q_OS_WIN - Sleep(uint(ms)); - #else - struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; - nanosleep(&ts, NULL); - #endif - } - - void uiDetachedWait(int ms) - { - QTime timer; - timer.start(); - do { - QCoreApplication::processEvents(QEventLoop::AllEvents, ms); - sleepCopiedFromQTest(10); - } while (timer.elapsed() < ms); - } - - -}//"anonymous" namespace +static void sleepCopiedFromQTest(int ms) +{ + if (ms < 0) + return; +#ifdef Q_OS_WIN + Sleep(uint(ms)); +#else + struct timespec ts = { ms / 1000, (ms % 1000) * 1000 * 1000 }; + nanosleep(&ts, NULL); +#endif +} +static void uiDetachedWait(int ms) +{ + QTime timer; + timer.start(); + do { + QCoreApplication::processEvents(QEventLoop::AllEvents, ms); + sleepCopiedFromQTest(10); + } while (timer.elapsed() < ms); +} QHash<QString, QByteArray> QtPatch::qmakeValues(const QString &qmakePath, QByteArray *qmakeOutput) { @@ -225,7 +218,6 @@ bool QtPatch::patchTextFile(const QString &fileName, return true; } - bool QtPatch::openFileForPatching(QFile *file) { if (file->openMode() == QIODevice::NotOpen) { |