diff filestatuswidget.cpp @ 203:c77c4d00a4fe

Merge
author Chris Cannam
date Tue, 04 Jan 2011 14:31:30 +0000
parents 3d4291d4226c 0844b4d8d911
children c5fceb3fe5b4
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
     }
 }