summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-24 14:47:20 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-02-24 14:47:20 +0000
commitb736151c2bb6c68f700d38274d740a6e0cf59a49 (patch)
tree83e110a7205757addba6e86a3c2367e4b52afa05 /src/corelib
parentff76300a5c9f209f625384f35ad0fdb0acebd799 (diff)
parent1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (diff)
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/arch/qatomic_cxx11.h8
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp19
2 files changed, 14 insertions, 13 deletions
diff --git a/src/corelib/arch/qatomic_cxx11.h b/src/corelib/arch/qatomic_cxx11.h
index 4c9001a7cd..bb49aae4fb 100644
--- a/src/corelib/arch/qatomic_cxx11.h
+++ b/src/corelib/arch/qatomic_cxx11.h
@@ -151,7 +151,7 @@ template <typename X> struct QAtomicOps
static inline Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
template <typename T>
- static bool testAndSetRelaxed(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
+ static bool testAndSetRelaxed(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_relaxed);
if (currentValue)
@@ -160,7 +160,7 @@ template <typename X> struct QAtomicOps
}
template <typename T>
- static bool testAndSetAcquire(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
+ static bool testAndSetAcquire(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acquire);
if (currentValue)
@@ -169,7 +169,7 @@ template <typename X> struct QAtomicOps
}
template <typename T>
- static bool testAndSetRelease(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
+ static bool testAndSetRelease(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_release);
if (currentValue)
@@ -178,7 +178,7 @@ template <typename X> struct QAtomicOps
}
template <typename T>
- static bool testAndSetOrdered(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = 0) Q_DECL_NOTHROW
+ static bool testAndSetOrdered(std::atomic<T> &_q_value, T expectedValue, T newValue, T *currentValue = Q_NULLPTR) Q_DECL_NOTHROW
{
bool tmp = _q_value.compare_exchange_strong(expectedValue, newValue, std::memory_order_acq_rel);
if (currentValue)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 42bda25be5..79a3254a39 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -588,7 +588,8 @@ void QCoreApplicationPrivate::initLocale()
This class is used by non-GUI applications to provide their event
loop. For non-GUI application that uses Qt, there should be exactly
one QCoreApplication object. For GUI applications, see
- QApplication.
+ QGuiApplication. For applications that use the Qt Widgets module,
+ see QApplication.
QCoreApplication contains the main event loop, where all events
from the operating system (e.g., timer and network events) and
@@ -602,10 +603,10 @@ void QCoreApplicationPrivate::initLocale()
operations can call processEvents() to keep the application
responsive.
- In general, we recommend that you create a QCoreApplication or a
- QApplication object in your \c main() function as early as
- possible. exec() will not return until the event loop exits; e.g.,
- when quit() is called.
+ In general, we recommend that you create a QCoreApplication,
+ QGuiApplication or a QApplication object in your \c main()
+ function as early as possible. exec() will not return until
+ the event loop exits; e.g., when quit() is called.
Several static convenience functions are also provided. The
QCoreApplication object is available from instance(). Events can
@@ -647,8 +648,8 @@ void QCoreApplicationPrivate::initLocale()
instance, when converting between data types such as floats and
strings, since the notation may differ between locales. To get
around this problem, call the POSIX function \c{setlocale(LC_NUMERIC,"C")}
- right after initializing QApplication or QCoreApplication to reset
- the locale that is used for number formatting to "C"-locale.
+ right after initializing QApplication, QGuiApplication or QCoreApplication
+ to reset the locale that is used for number formatting to "C"-locale.
\sa QGuiApplication, QAbstractEventDispatcher, QEventLoop,
{Semaphores Example}, {Wait Conditions Example}
@@ -658,7 +659,7 @@ void QCoreApplicationPrivate::initLocale()
\fn static QCoreApplication *QCoreApplication::instance()
Returns a pointer to the application's QCoreApplication (or
- QApplication) instance.
+ QGuiApplication/QApplication) instance.
If no instance has been allocated, \c null is returned.
*/
@@ -1865,7 +1866,7 @@ void QCoreApplication::quit()
Installing or removing a QTranslator, or changing an installed QTranslator
generates a \l{QEvent::LanguageChange}{LanguageChange} event for the
- QCoreApplication instance. A QApplication instance will propagate the event
+ QCoreApplication instance. A QGuiApplication instance will propagate the event
to all toplevel windows, where a reimplementation of changeEvent can
re-translate the user interface by passing user-visible strings via the
tr() function to the respective property setters. User-interface classes