changeset 203:c77c4d00a4fe

Merge
author Chris Cannam
date Tue, 04 Jan 2011 14:31:30 +0000
parents 3d4291d4226c (current diff) 0844b4d8d911 (diff)
children d256cc418fa3 3cc6455e58c2
files filestatuswidget.cpp
diffstat 1 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/filestatuswidget.cpp	Tue Jan 04 14:31:22 2011 +0000
+++ b/filestatuswidget.cpp	Tue Jan 04 14:31:30 2011 +0000
@@ -155,16 +155,24 @@
     QDir d(m_localPath);
     if (d.exists()) {
         QStringList args;
-        args << d.canonicalPath();
+        QString path = d.canonicalPath();
+#if defined Q_OS_WIN32
+        // Although the Win32 API is quite happy to have
+        // forward slashes as directory separators, Windows
+        // Explorer is not
+        path = path.replace('/', '\\');
+        args << path;
+        QProcess::execute("c:/windows/explorer.exe", args);
+#else
+        args << path;
         QProcess::execute(
-#if defined Q_OS_WIN32
-            "c:/windows/explorer.exe",
-#elif defined Q_OS_MAC
+#if defined Q_OS_MAC
             "/usr/bin/open",
 #else
             "/usr/bin/xdg-open",
 #endif
             args);
+#endif
     }
 }