diff options
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 47 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication_p.h | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreevent.h | 5 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_winrt.cpp | 10 | ||||
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 27 | ||||
-rw-r--r-- | src/corelib/kernel/qobject.h | 16 | ||||
-rw-r--r-- | src/corelib/kernel/qobjectdefs.h | 16 | ||||
-rw-r--r-- | src/corelib/kernel/qppsobject.cpp | 28 | ||||
-rw-r--r-- | src/corelib/kernel/qppsobjectprivate_p.h | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_posix.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_systemv.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_win.cpp | 6 |
13 files changed, 98 insertions, 71 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 38efc44399..330a1eb0f5 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -674,7 +674,7 @@ QCoreApplication::QCoreApplication(QCoreApplicationPrivate &p) : QObject(p, 0) #endif { - init(); + d_func()->q_ptr = this; // note: it is the subclasses' job to call // QCoreApplicationPrivate::eventDispatcher->startingUp(); } @@ -723,27 +723,26 @@ QCoreApplication::QCoreApplication(int &argc, char **argv : QObject(*new QCoreApplicationPrivate(argc, argv, _internal)) #endif { - init(); + d_func()->q_ptr = this; + d_func()->init(); #ifndef QT_NO_QOBJECT QCoreApplicationPrivate::eventDispatcher->startingUp(); #endif } -// ### move to QCoreApplicationPrivate constructor? -void QCoreApplication::init() +void QCoreApplicationPrivate::init() { - d_ptr->q_ptr = this; - Q_D(QCoreApplication); + Q_Q(QCoreApplication); - QCoreApplicationPrivate::initLocale(); + initLocale(); - Q_ASSERT_X(!self, "QCoreApplication", "there should be only one application object"); - QCoreApplication::self = this; + Q_ASSERT_X(!QCoreApplication::self, "QCoreApplication", "there should be only one application object"); + QCoreApplication::self = q; // Store app name (so it's still available after QCoreApplication is destroyed) if (!coreappdata()->applicationNameSet) - coreappdata()->application = d_func()->appName(); + coreappdata()->application = appName(); QLoggingRegistry::instance()->init(); @@ -759,7 +758,7 @@ void QCoreApplication::init() // anywhere in the list, we can just linearly scan the lists and find the items that // have been removed. Once the original list is exhausted we know all the remaining // items have been added. - QStringList newPaths(libraryPaths()); + QStringList newPaths(q->libraryPaths()); for (int i = manualPaths->length(), j = appPaths->length(); i > 0 || j > 0; qt_noop()) { if (--j < 0) { newPaths.prepend((*manualPaths)[--i]); @@ -779,28 +778,28 @@ void QCoreApplication::init() #ifndef QT_NO_QOBJECT // use the event dispatcher created by the app programmer (if any) - if (!QCoreApplicationPrivate::eventDispatcher) - QCoreApplicationPrivate::eventDispatcher = d->threadData->eventDispatcher.load(); + if (!eventDispatcher) + eventDispatcher = threadData->eventDispatcher.load(); // otherwise we create one - if (!QCoreApplicationPrivate::eventDispatcher) - d->createEventDispatcher(); - Q_ASSERT(QCoreApplicationPrivate::eventDispatcher != 0); + if (!eventDispatcher) + createEventDispatcher(); + Q_ASSERT(eventDispatcher); - if (!QCoreApplicationPrivate::eventDispatcher->parent()) { - QCoreApplicationPrivate::eventDispatcher->moveToThread(d->threadData->thread); - QCoreApplicationPrivate::eventDispatcher->setParent(this); + if (!eventDispatcher->parent()) { + eventDispatcher->moveToThread(threadData->thread); + eventDispatcher->setParent(q); } - d->threadData->eventDispatcher = QCoreApplicationPrivate::eventDispatcher; - d->eventDispatcherReady(); + threadData->eventDispatcher = eventDispatcher; + eventDispatcherReady(); #endif #ifdef QT_EVAL extern void qt_core_eval_init(QCoreApplicationPrivate::Type); - qt_core_eval_init(d->application_type); + qt_core_eval_init(application_type); #endif - d->processCommandLineArguments(); + processCommandLineArguments(); qt_call_pre_routines(); qt_startup_hook(); @@ -810,7 +809,7 @@ void QCoreApplication::init() #endif #ifndef QT_NO_QOBJECT - QCoreApplicationPrivate::is_app_running = true; // No longer starting up. + is_app_running = true; // No longer starting up. #endif } diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 3131265fd5..a22e1c4f9e 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -206,8 +206,6 @@ private: static bool notifyInternal2(QObject *receiver, QEvent *); #endif - void init(); - static QCoreApplication *self; Q_DISABLE_COPY(QCoreApplication) diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index 482429f073..445bae01b4 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -80,6 +80,8 @@ public: QCoreApplicationPrivate(int &aargc, char **aargv, uint flags); ~QCoreApplicationPrivate(); + void init(); + QString appName() const; #ifdef Q_OS_MAC diff --git a/src/corelib/kernel/qcoreevent.h b/src/corelib/kernel/qcoreevent.h index 95068e6a67..7e962f816e 100644 --- a/src/corelib/kernel/qcoreevent.h +++ b/src/corelib/kernel/qcoreevent.h @@ -325,6 +325,11 @@ private: friend class QGraphicsView; friend class QGraphicsScene; friend class QGraphicsScenePrivate; + // from QtTest: + friend class QSpontaneKeyEvent; + // needs this: + Q_ALWAYS_INLINE + void setSpontaneous() { spont = true; } }; class Q_CORE_EXPORT QTimerEvent : public QEvent diff --git a/src/corelib/kernel/qeventdispatcher_winrt.cpp b/src/corelib/kernel/qeventdispatcher_winrt.cpp index bef105b184..a6f61afc90 100644 --- a/src/corelib/kernel/qeventdispatcher_winrt.cpp +++ b/src/corelib/kernel/qeventdispatcher_winrt.cpp @@ -216,8 +216,10 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags) const QVector<HANDLE> timerHandles = d->timerIdToHandle.values().toVector(); if (waitTime) emit aboutToBlock(); + bool timerEventsSent = false; DWORD waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, waitTime, TRUE); - if (waitResult >= WAIT_OBJECT_0 && waitResult < WAIT_OBJECT_0 + timerHandles.count()) { + while (waitResult >= WAIT_OBJECT_0 && waitResult < WAIT_OBJECT_0 + timerHandles.count()) { + timerEventsSent = true; const HANDLE handle = timerHandles.value(waitResult - WAIT_OBJECT_0); ResetEvent(handle); const int timerId = d->timerHandleToId.value(handle); @@ -232,12 +234,10 @@ bool QEventDispatcherWinRT::processEvents(QEventLoop::ProcessEventsFlags flags) // Update timer's targetTime const quint64 targetTime = qt_msectime() + info.interval; info.targetTime = targetTime; - emit awake(); - return true; + waitResult = WaitForMultipleObjectsEx(timerHandles.count(), timerHandles.constData(), FALSE, 0, TRUE); } emit awake(); - - if (userEventsSent) + if (timerEventsSent || userEventsSent) return true; // We cannot wait infinitely like on other platforms, as diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 1c426225a5..4f764e7e78 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -325,6 +325,24 @@ const char *QMetaObject::className() const \sa className() */ +/* + Returns \c true if the class described by this QMetaObject inherits + the type described by \a metaObject; otherwise returns false. + + A type is considered to inherit itself. + + \since 5.7 +*/ +bool QMetaObject::inherits(const QMetaObject *metaObject) const Q_DECL_NOEXCEPT +{ + const QMetaObject *m = this; + do { + if (metaObject == m) + return true; + } while ((m = m->d.superdata)); + return false; +} + /*! \internal @@ -345,14 +363,7 @@ QObject *QMetaObject::cast(QObject *obj) const */ const QObject *QMetaObject::cast(const QObject *obj) const { - if (obj) { - const QMetaObject *m = obj->metaObject(); - do { - if (m == this) - return obj; - } while ((m = m->d.superdata)); - } - return 0; + return (obj && obj->metaObject()->inherits(this)) ? obj : nullptr; } #ifndef QT_NO_TRANSLATION diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index a070ddd805..1f3d3dcfc7 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -119,8 +119,8 @@ public: Q_INVOKABLE explicit QObject(QObject *parent=Q_NULLPTR); virtual ~QObject(); - virtual bool event(QEvent *); - virtual bool eventFilter(QObject *, QEvent *); + virtual bool event(QEvent *event); + virtual bool eventFilter(QObject *watched, QEvent *event); #ifdef Q_QDOC static QString tr(const char *sourceText, const char *comment = Q_NULLPTR, int n = -1); @@ -195,9 +195,9 @@ public: inline const QObjectList &children() const { return d_ptr->children; } - void setParent(QObject *); - void installEventFilter(QObject *); - void removeEventFilter(QObject *); + void setParent(QObject *parent); + void installEventFilter(QObject *filterObj); + void removeEventFilter(QObject *obj); static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType = Qt::AutoConnection); @@ -428,9 +428,9 @@ protected: int receivers(const char* signal) const; bool isSignalConnected(const QMetaMethod &signal) const; - virtual void timerEvent(QTimerEvent *); - virtual void childEvent(QChildEvent *); - virtual void customEvent(QEvent *); + virtual void timerEvent(QTimerEvent *event); + virtual void childEvent(QChildEvent *event); + virtual void customEvent(QEvent *event); virtual void connectNotify(const QMetaMethod &signal); virtual void disconnectNotify(const QMetaMethod &signal); diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 2a6e24533a..3d47bae4a0 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -159,6 +159,12 @@ inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {} # define Q_OBJECT_NO_OVERRIDE_WARNING #endif +#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && Q_CC_GNU >= 600 +# define Q_OBJECT_NO_ATTRIBUTES_WARNING QT_WARNING_DISABLE_GCC("-Wattributes") +#else +# define Q_OBJECT_NO_ATTRIBUTES_WARNING +#endif + /* qmake ignore Q_OBJECT */ #define Q_OBJECT \ public: \ @@ -169,10 +175,11 @@ public: \ virtual const QMetaObject *metaObject() const; \ virtual void *qt_metacast(const char *); \ virtual int qt_metacall(QMetaObject::Call, int, void **); \ - QT_WARNING_POP \ QT_TR_FUNCTIONS \ private: \ + Q_OBJECT_NO_ATTRIBUTES_WARNING \ Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \ + QT_WARNING_POP \ struct QPrivateSignal {}; /* qmake ignore Q_OBJECT */ @@ -186,7 +193,11 @@ public: \ void qt_check_for_QGADGET_macro(); \ typedef void QtGadgetHelper; \ private: \ - Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); + QT_WARNING_PUSH \ + Q_OBJECT_NO_ATTRIBUTES_WARNING \ + Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \ + QT_WARNING_POP \ + /*end*/ #endif // QT_NO_META_MACROS #else // Q_MOC_RUN @@ -316,6 +327,7 @@ struct Q_CORE_EXPORT QMetaObject const char *className() const; const QMetaObject *superClass() const; + bool inherits(const QMetaObject *metaObject) const Q_DECL_NOEXCEPT; QObject *cast(QObject *obj) const; const QObject *cast(const QObject *obj) const; diff --git a/src/corelib/kernel/qppsobject.cpp b/src/corelib/kernel/qppsobject.cpp index 5990deb9c3..dbff997c88 100644 --- a/src/corelib/kernel/qppsobject.cpp +++ b/src/corelib/kernel/qppsobject.cpp @@ -72,7 +72,7 @@ public: { int fd = qt_safe_open("/pps/.all", O_RDONLY); if (fd == -1) { - qWarning() << "qppsobject.cpp: qt_safe_open failed"; + qWarning("qppsobject.cpp: qt_safe_open failed"); value = -1; } @@ -114,7 +114,7 @@ QPpsAttributeMap QPpsObjectPrivate::decode(const QByteArray &rawData, bool *ok) // no need to check ok in this case attributeMap = decodeObject(&decoder, ok); } else { - qWarning() << "QPpsObjectPrivate::decode: pps_decoder_initialize failed"; + qWarning("QPpsObjectPrivate::decode: pps_decoder_initialize failed"); *ok = false; } @@ -162,7 +162,7 @@ QPpsAttribute QPpsObjectPrivate::decodeString(pps_decoder_t *decoder) pps_decoder_error_t error = pps_decoder_get_string(decoder, 0, &value); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeString: PPS_DECODER_GET_STRING failed"; + qWarning("QPpsObjectPrivate::decodeString: PPS_DECODER_GET_STRING failed"); return QPpsAttribute(); } @@ -189,19 +189,19 @@ QPpsAttribute QPpsObjectPrivate::decodeNumber(pps_decoder_t *decoder) case PPS_DECODER_CONVERSION_FAILED: error = pps_decoder_get_int64(decoder, 0, &llValue); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeNumber: failed to decode integer"; + qWarning("QPpsObjectPrivate::decodeNumber: failed to decode integer"); return QPpsAttribute(); } flags = readFlags(decoder); return QPpsAttributePrivate::createPpsAttribute(llValue, flags); default: - qWarning() << "QPpsObjectPrivate::decodeNumber: pps_decoder_get_int failed"; + qWarning("QPpsObjectPrivate::decodeNumber: pps_decoder_get_int failed"); return QPpsAttribute(); } } else { pps_decoder_error_t error = pps_decoder_get_double(decoder, 0, &dValue); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeNumber: pps_decoder_get_double failed"; + qWarning("QPpsObjectPrivate::decodeNumber: pps_decoder_get_double failed"); return QPpsAttribute(); } flags = readFlags(decoder); @@ -215,7 +215,7 @@ QPpsAttribute QPpsObjectPrivate::decodeBool(pps_decoder_t *decoder) pps_decoder_error_t error = pps_decoder_get_bool(decoder, 0, &value); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeBool: pps_decoder_get_bool failed"; + qWarning("QPpsObjectPrivate::decodeBool: pps_decoder_get_bool failed"); return QPpsAttribute(); } @@ -278,7 +278,7 @@ QPpsAttribute QPpsObjectPrivate::decodeData(pps_decoder_t *decoder) case PPS_TYPE_NONE: case PPS_TYPE_UNKNOWN: default: - qWarning() << "QPpsObjectPrivate::decodeData: invalid pps_node_type"; + qWarning("QPpsObjectPrivate::decodeData: invalid pps_node_type"); return QPpsAttribute(); } } @@ -292,7 +292,7 @@ QPpsAttributeList QPpsObjectPrivate::decodeArray(pps_decoder_t *decoder, bool *o // Force movement to a specific index. pps_decoder_error_t error = pps_decoder_goto_index(decoder, i); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeArray: pps_decoder_goto_index failed"; + qWarning("QPpsObjectPrivate::decodeArray: pps_decoder_goto_index failed"); *ok = false; return QPpsAttributeList(); } @@ -319,7 +319,7 @@ QPpsAttributeMap QPpsObjectPrivate::decodeObject(pps_decoder_t *decoder, bool *o // Force movement to a specific index. pps_decoder_error_t error = pps_decoder_goto_index(decoder, i); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeObject: pps_decoder_goto_index failed"; + qWarning("QPpsObjectPrivate::decodeObject: pps_decoder_goto_index failed"); *ok = false; return QPpsAttributeMap(); } @@ -368,7 +368,7 @@ QVariant QPpsObjectPrivate::variantFromPpsAttribute(const QPpsAttribute &attribu return variantMapFromPpsAttributeMap(attribute.toMap()); case QPpsAttribute::None: default: - qWarning() << "QPpsObjectPrivate::variantFromPpsAttribute: invalid attribute parameter"; + qWarning("QPpsObjectPrivate::variantFromPpsAttribute: invalid attribute parameter"); return QVariant(); } } @@ -385,7 +385,7 @@ QByteArray QPpsObjectPrivate::encode(const QVariantMap &ppsData, bool *ok) // The memory will be freed when pps_encoder_cleanup is called. rawData = pps_encoder_buffer(&encoder); if (!rawData) { - qWarning() << "QPpsObjectPrivate::encode: pps_encoder_buffer failed"; + qWarning("QPpsObjectPrivate::encode: pps_encoder_buffer failed"); *ok = false; } } @@ -448,7 +448,7 @@ void QPpsObjectPrivate::encodeData(pps_encoder_t *encoder, const char *name, con errorFunction = QStringLiteral("pps_encoder_add_null"); break; default: - qWarning() << "QPpsObjectPrivate::encodeData: the type of the parameter data is invalid"; + qWarning("QPpsObjectPrivate::encodeData: the type of the parameter data is invalid"); *ok = false; return; } @@ -685,7 +685,7 @@ QByteArray QPpsObject::read(bool *ok) const int maxSize = ppsMaxSize->value; if (maxSize == -1) { - qWarning() << "QPpsObject::read: maxSize is equal to -1"; + qWarning("QPpsObject::read: maxSize is equal to -1"); safeAssign(ok, false); return QByteArray(); } diff --git a/src/corelib/kernel/qppsobjectprivate_p.h b/src/corelib/kernel/qppsobjectprivate_p.h index 26d89ab7f0..e1d54e58de 100644 --- a/src/corelib/kernel/qppsobjectprivate_p.h +++ b/src/corelib/kernel/qppsobjectprivate_p.h @@ -105,7 +105,7 @@ inline bool QPpsObjectPrivate::decoderPush(pps_decoder_t *decoder, const char *n { pps_decoder_error_t error = pps_decoder_push(decoder, name); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeData: pps_decoder_push failed"; + qWarning("QPpsObjectPrivate::decodeData: pps_decoder_push failed"); return false; } return true; @@ -115,7 +115,7 @@ inline bool QPpsObjectPrivate::decoderPop(pps_decoder_t *decoder) { pps_decoder_error_t error = pps_decoder_pop(decoder); if (error != PPS_DECODER_OK) { - qWarning() << "QPpsObjectPrivate::decodeData: pps_decoder_pop failed"; + qWarning("QPpsObjectPrivate::decodeData: pps_decoder_pop failed"); return false; } return true; diff --git a/src/corelib/kernel/qsystemsemaphore_posix.cpp b/src/corelib/kernel/qsystemsemaphore_posix.cpp index 76ab0d42eb..6137239467 100644 --- a/src/corelib/kernel/qsystemsemaphore_posix.cpp +++ b/src/corelib/kernel/qsystemsemaphore_posix.cpp @@ -119,7 +119,7 @@ void QSystemSemaphorePrivate::cleanHandle() if (::sem_close(semaphore) == -1) { setErrorString(QLatin1String("QSystemSemaphore::cleanHandle (sem_close)")); #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphore::cleanHandle sem_close failed."); + qDebug("QSystemSemaphore::cleanHandle sem_close failed."); #endif } semaphore = SEM_FAILED; @@ -129,7 +129,7 @@ void QSystemSemaphorePrivate::cleanHandle() if (::sem_unlink(QFile::encodeName(fileName).constData()) == -1 && errno != ENOENT) { setErrorString(QLatin1String("QSystemSemaphore::cleanHandle (sem_unlink)")); #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphore::cleanHandle sem_unlink failed."); + qDebug("QSystemSemaphore::cleanHandle sem_unlink failed."); #endif } createdSemaphore = false; diff --git a/src/corelib/kernel/qsystemsemaphore_systemv.cpp b/src/corelib/kernel/qsystemsemaphore_systemv.cpp index 69e1bf7705..f4fdfa5f58 100644 --- a/src/corelib/kernel/qsystemsemaphore_systemv.cpp +++ b/src/corelib/kernel/qsystemsemaphore_systemv.cpp @@ -153,7 +153,7 @@ void QSystemSemaphorePrivate::cleanHandle() if (-1 == semctl(semaphore, 0, IPC_RMID, 0)) { setErrorString(QLatin1String("QSystemSemaphore::cleanHandle")); #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphore::cleanHandle semctl failed."); + qDebug("QSystemSemaphore::cleanHandle semctl failed."); #endif } semaphore = -1; diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp index ca31e9d59d..236e346afe 100644 --- a/src/corelib/kernel/qsystemsemaphore_win.cpp +++ b/src/corelib/kernel/qsystemsemaphore_win.cpp @@ -101,7 +101,7 @@ void QSystemSemaphorePrivate::cleanHandle() { if (semaphore && !CloseHandle(semaphore)) { #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphorePrivate::CloseHandle: sem failed"); + qDebug("QSystemSemaphorePrivate::CloseHandle: sem failed"); #endif } semaphore = 0; @@ -116,7 +116,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count) if (0 == ReleaseSemaphore(semaphore, count, 0)) { setErrorString(QLatin1String("QSystemSemaphore::modifySemaphore")); #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphore::modifySemaphore ReleaseSemaphore failed"); + qDebug("QSystemSemaphore::modifySemaphore ReleaseSemaphore failed"); #endif return false; } @@ -128,7 +128,7 @@ bool QSystemSemaphorePrivate::modifySemaphore(int count) #endif setErrorString(QLatin1String("QSystemSemaphore::modifySemaphore")); #if defined QSYSTEMSEMAPHORE_DEBUG - qDebug() << QLatin1String("QSystemSemaphore::modifySemaphore WaitForSingleObject failed"); + qDebug("QSystemSemaphore::modifySemaphore WaitForSingleObject failed"); #endif return false; } |