diff options
author | Jonathan Liu <net147@gmail.com> | 2012-02-19 22:33:35 +1100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-20 09:37:24 +0100 |
commit | 7d8f5777bede600d60ceb9be1213c71fd93c3ed7 (patch) | |
tree | 2ae023ac20f574fdf1ef9cb36eeca0fb4c52e11b /src/plugins/platforms/windows/qwindowsservices.cpp | |
parent | 3cb078a23cb8b86169bd9d8259f5658be0c2082e (diff) |
Fix compilation with MinGW-w64
This fixes a "cast from 'void*' to 'int' loses precision" error and adds
a missing argument to qWarning.
Change-Id: I38544c4e317a3f6d1ecf26ebb3e35c66b1878d24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsservices.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp index 5cc4ce93af..905a1bd12c 100644 --- a/src/plugins/platforms/windows/qwindowsservices.cpp +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -54,10 +54,10 @@ enum { debug = 0 }; static inline bool shellExecute(const QString &file) { - const int result = (int)ShellExecute(0, 0, (wchar_t*)file.utf16(), 0, 0, SW_SHOWNORMAL); + const quintptr result = (quintptr)ShellExecute(0, 0, (wchar_t*)file.utf16(), 0, 0, SW_SHOWNORMAL); // ShellExecute returns a value greater than 32 if successful if (result <= 32) { - qWarning("ShellExecute '%s' failed (error %0x).", qPrintable(file), result); + qWarning("ShellExecute '%s' failed (error %s).", qPrintable(file), qPrintable(QString::number(result))); return false; } return true; @@ -104,7 +104,7 @@ static inline bool launchMail(const QUrl &url) { QString command = mailCommand(); if (command.isEmpty()) { - qWarning("Cannot launch '%s': There is no mail program installed."); + qWarning("Cannot launch '%s': There is no mail program installed.", qPrintable(url.toString())); return false; } //Make sure the path for the process is in quotes |