MinGW: Fix warnings.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Fri, 3 Feb 2012 14:29:13 +0000 (15:29 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sat, 4 Feb 2012 07:43:38 +0000 (08:43 +0100)
- Special #define to access HB seems no longer necessary
  (it was causing about mismatching DLL import attributes).

Change-Id: I57cc7d57b12a67c1d549b053db81e1f198f87786
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
src/corelib/io/qprocess_win.cpp
src/corelib/io/qwinoverlappedionotifier.cpp
src/network/socket/qlocalsocket_win.cpp
src/network/socket/qnativesocketengine_win.cpp
src/plugins/platforms/windows/qwindowsfontengine.h

index fd5c08b..51f34a6 100644 (file)
@@ -98,7 +98,7 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
             break;
         DWORD dwError = GetLastError();
         if (dwError != ERROR_PIPE_BUSY || !--attempts) {
-            qErrnoWarning(dwError, "QProcess: CreateNamedPipe failed.", GetLastError());
+            qErrnoWarning(dwError, "QProcess: CreateNamedPipe failed.");
             return;
         }
     }
@@ -115,7 +115,7 @@ static void qt_create_pipe(Q_PIPE *pipe, bool isInputPipe)
                         FILE_FLAG_OVERLAPPED,
                         NULL);
     if (hWrite == INVALID_HANDLE_VALUE) {
-        qWarning("QProcess: CreateFile failed with error code %d.\n", GetLastError());
+        qErrnoWarning("QProcess: CreateFile failed.");
         CloseHandle(hRead);
         return;
     }
index a0dd7a7..a26dfd4 100644 (file)
@@ -84,7 +84,7 @@ public:
         : hPort(INVALID_HANDLE_VALUE)
     {
         setObjectName(QLatin1String("I/O completion port thread"));
-        HANDLE hIOCP = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, NULL, 0);
+        HANDLE hIOCP = CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0);
         if (!hIOCP) {
             qErrnoWarning("CreateIoCompletionPort failed.");
             return;
@@ -94,7 +94,7 @@ public:
 
     ~QWinIoCompletionPort()
     {
-        PostQueuedCompletionStatus(hPort, 0, NULL, NULL);
+        PostQueuedCompletionStatus(hPort, 0, 0, NULL);
         QThread::wait();
         CloseHandle(hPort);
     }
index a6f8ef2..35b0130 100644 (file)
@@ -108,8 +108,8 @@ void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &functio
 
 QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
        handle(INVALID_HANDLE_VALUE),
-       pipeReader(0),
        pipeWriter(0),
+       pipeReader(0),
        error(QLocalSocket::UnknownSocketError),
        state(QLocalSocket::UnconnectedState)
 {
index 7b3cdc0..e57bfcb 100644 (file)
@@ -732,6 +732,8 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port)
             ipv6only = 1;
             ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) );
         }
+#else
+        Q_UNUSED(ipv6only)
 #endif
         break;
     case QAbstractSocket::IPv4Protocol:
index d141859..f8ebc89 100644 (file)
 // We mean it.
 //
 
-// Enable access to HB_Face in harfbuzz includes included by qfontengine_p.h.
-#define QT_BUILD_GUI_LIB
 #include <QtGui/private/qfontengine_p.h>
-#undef QT_BUILD_GUI_LIB
 
 #include <QtGui/QImage>
 #include <QtCore/QSharedPointer>