diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-23 16:05:55 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-24 12:05:03 +0100 |
commit | 649ba48e4a56889692bae5996d9dbd2f6e503336 (patch) | |
tree | bbc2df77ff6899632302d0324dd584487f0596ef /src/shared/qtlockedfile | |
parent | b0eff051c1b67105a1dcc2c03d2ae30195dab539 (diff) |
Compile with Qt 5/Linux.
(after running fixqt4headers.pl).
Change-Id: Icb047cee2bd69acdb049beb9a769bfd2f4dcb841
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/shared/qtlockedfile')
-rw-r--r-- | src/shared/qtlockedfile/qtlockedfile_win.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/shared/qtlockedfile/qtlockedfile_win.cpp b/src/shared/qtlockedfile/qtlockedfile_win.cpp index 1d11b0996d..158c7665ae 100644 --- a/src/shared/qtlockedfile/qtlockedfile_win.cpp +++ b/src/shared/qtlockedfile/qtlockedfile_win.cpp @@ -76,13 +76,8 @@ bool QtLockedFile::lock(LockMode mode, bool block) QString sem_name = QString::fromLatin1(SEMAPHORE_PREFIX) + fi.absoluteFilePath().toLower(); - QT_WA( { - m_semaphore_hnd = CreateSemaphoreW(0, SEMAPHORE_MAX, SEMAPHORE_MAX, - (TCHAR*)sem_name.utf16()); - } , { - m_semaphore_hnd = CreateSemaphoreA(0, SEMAPHORE_MAX, SEMAPHORE_MAX, - sem_name.toLocal8Bit().constData()); - } ); + m_semaphore_hnd = CreateSemaphoreW(0, SEMAPHORE_MAX, SEMAPHORE_MAX, + (TCHAR*)sem_name.utf16()); if (m_semaphore_hnd == 0) { qWarning("QtLockedFile::lock(): CreateSemaphore: %s", @@ -101,11 +96,8 @@ bool QtLockedFile::lock(LockMode mode, bool block) QFileInfo fi(*this); QString mut_name = QString::fromLatin1(MUTEX_PREFIX) + fi.absoluteFilePath().toLower(); - QT_WA( { - m_mutex_hnd = CreateMutexW(NULL, FALSE, (TCHAR*)mut_name.utf16()); - } , { - m_mutex_hnd = CreateMutexA(NULL, FALSE, mut_name.toLocal8Bit().constData()); - } ); + + m_mutex_hnd = CreateMutexW(NULL, FALSE, (TCHAR*)mut_name.utf16()); if (m_mutex_hnd == 0) { qWarning("QtLockedFile::lock(): CreateMutex: %s", |