diff options
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qfeatures.txt | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore.cpp | 3 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_p.h | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_unix.cpp | 1 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_win.cpp | 1 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_p.h | 4 |
6 files changed, 11 insertions, 5 deletions
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 84c9379bbc..fb6e56ec7d 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -748,7 +748,7 @@ Name: QPdf Feature: PRINTER Description: Supports printing Section: Painting -Requires: PICTURE TEMPORARYFILE +Requires: PICTURE TEMPORARYFILE PDF Name: QPrinter Feature: CUPS diff --git a/src/corelib/kernel/qsystemsemaphore.cpp b/src/corelib/kernel/qsystemsemaphore.cpp index 6f0e5ee011..82e14e6f3f 100644 --- a/src/corelib/kernel/qsystemsemaphore.cpp +++ b/src/corelib/kernel/qsystemsemaphore.cpp @@ -229,8 +229,7 @@ void QSystemSemaphore::setKey(const QString &key, int initialValue, AccessMode m { if (key == d->key && mode == Open) return; - d->error = NoError; - d->errorString = QString(); + d->clearError(); #if !defined(Q_OS_WIN) // optimization to not destroy/create the file & semaphore if (key == d->key && mode == Create && d->createdSemaphore && d->createdFile) { diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h index c809ba58c1..b34ec1b9a7 100644 --- a/src/corelib/kernel/qsystemsemaphore_p.h +++ b/src/corelib/kernel/qsystemsemaphore_p.h @@ -75,6 +75,11 @@ public: return QSharedMemoryPrivate::makePlatformSafeKey(key, QLatin1String("qipc_systemsem_")); } + inline void setError(QSystemSemaphore::SystemSemaphoreError e, const QString &message) + { error = e; errorString = message; } + inline void clearError() + { setError(QSystemSemaphore::NoError, QString()); } + #ifdef Q_OS_WIN Qt::HANDLE handle(QSystemSemaphore::AccessMode mode = QSystemSemaphore::Open); void setErrorString(const QString &function); diff --git a/src/corelib/kernel/qsystemsemaphore_unix.cpp b/src/corelib/kernel/qsystemsemaphore_unix.cpp index 073bd020ba..8f439c94a0 100644 --- a/src/corelib/kernel/qsystemsemaphore_unix.cpp +++ b/src/corelib/kernel/qsystemsemaphore_unix.cpp @@ -229,6 +229,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count) return false; } + clearError(); return true; } diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp index 55df20b24e..edf90a31ac 100644 --- a/src/corelib/kernel/qsystemsemaphore_win.cpp +++ b/src/corelib/kernel/qsystemsemaphore_win.cpp @@ -136,6 +136,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count) } } + clearError(); return true; } diff --git a/src/corelib/tools/qlocale_p.h b/src/corelib/tools/qlocale_p.h index 4b4606ffab..581a12e0c7 100644 --- a/src/corelib/tools/qlocale_p.h +++ b/src/corelib/tools/qlocale_p.h @@ -360,10 +360,10 @@ inline char QLocalePrivate::digitToCLocale(QChar in) const if (in.unicode() >= '0' && in.unicode() <= '9') return in.toLatin1(); - if (in == plus()) + if (in == plus() || in == QLatin1Char('+')) return '+'; - if (in == minus()) + if (in == minus() || in == QLatin1Char('-') || in == QChar(0x2212)) return '-'; if (in == decimal()) |