summaryrefslogtreecommitdiffstats
path: root/src/gui/util/qdesktopservices_win.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
committerWarwick Allison <warwick.allison@nokia.com>2009-07-31 11:52:57 +1000
commitaa9cf406d62004519ad54596e1c391f9a6439210 (patch)
treedd562b9c296981f2761b76623911be8496c7af84 /src/gui/util/qdesktopservices_win.cpp
parent987aec28b950e1c9817a20a9dd71afc071cd93ea (diff)
parent56b6a5924008ab5cdbae36e9662eddba923acd5e (diff)
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/gui/util/qdesktopservices_win.cpp')
-rw-r--r--src/gui/util/qdesktopservices_win.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp
index 00cb4aef2..62ab2f756 100644
--- a/src/gui/util/qdesktopservices_win.cpp
+++ b/src/gui/util/qdesktopservices_win.cpp
@@ -66,8 +66,10 @@ static bool openDocument(const QUrl &file)
{
if (!file.isValid())
return false;
-
- quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t*)file.toString().utf16(), 0, 0, SW_SHOWNORMAL);
+ QString filePath = file.toLocalFile();
+ if (filePath.isEmpty())
+ filePath = file.toString();
+ quintptr returnValue = (quintptr)ShellExecute(0, 0, (wchar_t*)filePath.utf16(), 0, 0, SW_SHOWNORMAL);
return (returnValue > 32); //ShellExecute returns a value greater than 32 if successful
}