summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@qt.io>2016-10-04 08:32:55 +0200
committerMaurice Kalinowski <maurice.kalinowski@qt.io>2016-10-05 06:33:33 +0000
commitd44925507b1c5d9989df8d8144051d2e8730e953 (patch)
tree3cb19d840703824d5cf84aed52e47626d92a06ce
parent72a1a72776533c2cf95a020876c0959c6af14608 (diff)
winrt: Fix compilation for projects using C++/CX extensions
In case a project uses C++/CX extensions via /ZW compile flag including qfunctions_winrt.h resulted in a compile error about duplicate definition of Started due to namespace usages. Change-Id: I8913522eafbabae77dd7d17187f202e555b0275f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
-rw-r--r--src/corelib/kernel/qfunctions_winrt.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qfunctions_winrt.h b/src/corelib/kernel/qfunctions_winrt.h
index 9af5a08a01..db94d6739a 100644
--- a/src/corelib/kernel/qfunctions_winrt.h
+++ b/src/corelib/kernel/qfunctions_winrt.h
@@ -174,7 +174,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
t.start();
switch (awaitStyle) {
case ProcessMainThreadEvents:
- while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
+ while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
QCoreApplication::processEvents();
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
@@ -182,7 +182,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
break;
case ProcessThreadEvents:
if (QAbstractEventDispatcher *dispatcher = QThread::currentThread()->eventDispatcher()) {
- while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
+ while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
dispatcher->processEvents(QEventLoop::AllEvents);
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
@@ -192,7 +192,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
// fall through
default:
case YieldThread:
- while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == Started) {
+ while (SUCCEEDED(hr = asyncInfo->get_Status(&status)) && status == AsyncStatus::Started) {
QThread::yieldCurrentThread();
if (timeout && t.hasExpired(timeout))
return ERROR_TIMEOUT;
@@ -200,7 +200,7 @@ static inline HRESULT _await_impl(const Microsoft::WRL::ComPtr<T> &asyncOp, Awai
break;
}
- if (FAILED(hr) || status != Completed) {
+ if (FAILED(hr) || status != AsyncStatus::Completed) {
HRESULT ec;
hr = asyncInfo->get_ErrorCode(&ec);
if (FAILED(hr))