diff options
author | Maurice Kalinowski <maurice.kalinowski@digia.com> | 2014-05-26 09:24:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-26 15:06:12 +0200 |
commit | 262d2cba12e9b164f9699951b37def21e1ed1652 (patch) | |
tree | efed0436cab10b4c20d01ca95e6f7d6ddd6827fe | |
parent | b214c177ea799baa33fe7ef7cf6446407928a38b (diff) |
WinRT: Fix compile warnings
Change-Id: If223dd73b9558a0f5144be38f19a61316f8c807b
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
-rw-r--r-- | src/corelib/kernel/qsharedmemory_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qcollator_win.cpp | 1 | ||||
-rw-r--r-- | src/network/kernel/qhostaddress.cpp | 4 | ||||
-rw-r--r-- | src/network/kernel/qhostinfo_winrt.cpp | 2 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine_winrt.cpp | 4 | ||||
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtcursor.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtplatformtheme.cpp | 2 | ||||
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtscreen.cpp | 2 | ||||
-rw-r--r-- | src/widgets/kernel/qwidgetbackingstore.cpp | 3 |
9 files changed, 19 insertions, 3 deletions
diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp index b00434977b..fd79a7efea 100644 --- a/src/corelib/kernel/qsharedmemory_win.cpp +++ b/src/corelib/kernel/qsharedmemory_win.cpp @@ -148,6 +148,7 @@ bool QSharedMemoryPrivate::create(int size) // Create the file mapping. #if defined(Q_OS_WINPHONE) Q_UNIMPLEMENTED(); + Q_UNUSED(size) hand = 0; #elif defined(Q_OS_WINRT) hand = CreateFileMappingFromApp(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE, size, (PCWSTR)nativeKey.utf16()); @@ -169,6 +170,7 @@ bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode) int permissions = (mode == QSharedMemory::ReadOnly ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS); #if defined(Q_OS_WINPHONE) Q_UNIMPLEMENTED(); + Q_UNUSED(mode) memory = 0; #elif defined(Q_OS_WINRT) memory = (void *)MapViewOfFileFromApp(handle(), permissions, 0, 0); diff --git a/src/corelib/tools/qcollator_win.cpp b/src/corelib/tools/qcollator_win.cpp index 9a672a0505..4141ba1205 100644 --- a/src/corelib/tools/qcollator_win.cpp +++ b/src/corelib/tools/qcollator_win.cpp @@ -155,6 +155,7 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const #elif defined(Q_OS_WINPHONE) int size = 0; Q_UNIMPLEMENTED(); + Q_UNUSED(string) #else // Q_OS_WINPHONE int size = LCMapStringEx(LOCALE_NAME_USER_DEFAULT, LCMAP_SORTKEY | d->collator, reinterpret_cast<LPCWSTR>(string.constData()), string.size(), diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index 0ab72191dc..1d38d06ae9 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -453,6 +453,8 @@ QHostAddress::QHostAddress(const struct sockaddr *sockaddr) setAddress(htonl(((sockaddr_in *)sockaddr)->sin_addr.s_addr)); else if (sockaddr->sa_family == AF_INET6) setAddress(((qt_sockaddr_in6 *)sockaddr)->sin6_addr.qt_s6_addr); +#else + Q_UNUSED(sockaddr) #endif } @@ -612,6 +614,8 @@ void QHostAddress::setAddress(const struct sockaddr *sockaddr) setAddress(htonl(((sockaddr_in *)sockaddr)->sin_addr.s_addr)); else if (sockaddr->sa_family == AF_INET6) setAddress(((qt_sockaddr_in6 *)sockaddr)->sin6_addr.qt_s6_addr); +#else + Q_UNUSED(sockaddr) #endif } diff --git a/src/network/kernel/qhostinfo_winrt.cpp b/src/network/kernel/qhostinfo_winrt.cpp index 928c9e4628..92897f563d 100644 --- a/src/network/kernel/qhostinfo_winrt.cpp +++ b/src/network/kernel/qhostinfo_winrt.cpp @@ -84,7 +84,7 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) HStringReference classId(RuntimeClass_Windows_Networking_HostName); if (FAILED(GetActivationFactory(classId.Get(), &hostnameFactory))) - Q_ASSERT(false, "Could not obtain hostname factory."); + Q_ASSERT_X(false, "QHostInfoAgent", "Could not obtain hostname factory."); IHostName *host; HStringReference hostNameRef((const wchar_t*)hostName.utf16()); diff --git a/src/network/socket/qnativesocketengine_winrt.cpp b/src/network/socket/qnativesocketengine_winrt.cpp index db1d3dc96b..a32a757191 100644 --- a/src/network/socket/qnativesocketengine_winrt.cpp +++ b/src/network/socket/qnativesocketengine_winrt.cpp @@ -1159,7 +1159,7 @@ HRESULT QNativeSocketEnginePrivate::handleBindCompleted(IAsyncAction *, AsyncSta HRESULT QNativeSocketEnginePrivate::handleClientConnection(IStreamSocketListener *listener, IStreamSocketListenerConnectionReceivedEventArgs *args) { Q_Q(QNativeSocketEngine); - Q_ASSERT(tcpListener.Get() == listener); + Q_UNUSED(listener) IStreamSocket *socket; args->get_Socket(&socket); pendingConnections.append(socket); @@ -1253,7 +1253,7 @@ HRESULT QNativeSocketEnginePrivate::handleWriteCompleted(IAsyncOperationWithProg HRESULT QNativeSocketEnginePrivate::handleNewDatagram(IDatagramSocket *socket, IDatagramSocketMessageReceivedEventArgs *args) { Q_Q(QNativeSocketEngine); - Q_ASSERT(udp == socket); + Q_UNUSED(socket) pendingDatagrams.append(args); emit q->readReady(); diff --git a/src/plugins/platforms/winrt/qwinrtcursor.cpp b/src/plugins/platforms/winrt/qwinrtcursor.cpp index 8241560cef..f09454ebc3 100644 --- a/src/plugins/platforms/winrt/qwinrtcursor.cpp +++ b/src/plugins/platforms/winrt/qwinrtcursor.cpp @@ -135,6 +135,8 @@ void QWinRTCursor::changeCursor(QCursor *windowCursor, QWindow *) ICoreCursor *cursor; if (SUCCEEDED(m_cursorFactory->CreateCursor(type, 0, &cursor))) m_window->put_PointerCursor(cursor); +#else // Q_OS_WINPHONE + Q_UNUSED(windowCursor) #endif // Q_OS_WINPHONE } #endif // QT_NO_CURSOR diff --git a/src/plugins/platforms/winrt/qwinrtplatformtheme.cpp b/src/plugins/platforms/winrt/qwinrtplatformtheme.cpp index e8f853e4b1..d4034ec571 100644 --- a/src/plugins/platforms/winrt/qwinrtplatformtheme.cpp +++ b/src/plugins/platforms/winrt/qwinrtplatformtheme.cpp @@ -53,6 +53,8 @@ bool QWinRTPlatformTheme::usePlatformNativeDialog(QPlatformTheme::DialogType typ #if !(defined(Q_OS_WINPHONE) && _MSC_VER<=1700) if (type == QPlatformTheme::MessageDialog) return true; +#else + Q_UNUSED(type) #endif // !(Q_OS_WINPHONE && _MSC_VER<=1700) return false; } diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp index 3fe856558f..f948cf9924 100644 --- a/src/plugins/platforms/winrt/qwinrtscreen.cpp +++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp @@ -960,6 +960,8 @@ HRESULT QWinRTScreen::onAutomationProviderRequested(ICoreWindow *, IAutomationPr { #ifndef Q_OS_WINPHONE args->put_AutomationProvider(m_inputContext); +#else + Q_UNUSED(args) #endif return S_OK; } diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp index 221e6825ed..9d024fd359 100644 --- a/src/widgets/kernel/qwidgetbackingstore.cpp +++ b/src/widgets/kernel/qwidgetbackingstore.cpp @@ -168,6 +168,9 @@ static void showYellowThing_win(QWidget *widget, const QRegion ®ion, int msec void QWidgetBackingStore::showYellowThing(QWidget *widget, const QRegion &toBePainted, int msec, bool unclipped) { +#ifdef Q_OS_WINRT + Q_UNUSED(msec) +#endif QRegion paintRegion = toBePainted; QRect widgetRect = widget->rect(); |