comparison src/mainwindow.cpp @ 680:21e03596dd93

Towards Win32 deployment
author Chris Cannam
date Fri, 07 Dec 2018 13:41:32 +0000
parents 0329bbd4b57c
children 5b3bcb2d0943
comparison
equal deleted inserted replaced
677:0329bbd4b57c 680:21e03596dd93
872 #if defined Q_OS_WIN32 872 #if defined Q_OS_WIN32
873 // Although the Win32 API is quite happy to have 873 // Although the Win32 API is quite happy to have
874 // forward slashes as directory separators, Windows 874 // forward slashes as directory separators, Windows
875 // Explorer is not 875 // Explorer is not
876 int last = m_workFolderPath.length() - 1; 876 int last = m_workFolderPath.length() - 1;
877 char c = m_workFolderPath[last].toAscii(); 877 QChar c = m_workFolderPath[last];
878 if (c == '\\' || c == '/') { 878 if (c == '\\' || c == '/') {
879 m_workFolderPath.chop(1); 879 m_workFolderPath.chop(1);
880 } 880 }
881 file = m_workFolderPath + "\\" + file; 881 file = m_workFolderPath + "\\" + file;
882 file = file.replace('/', '\\'); 882 file = file.replace('/', '\\');
883 args << "/select," << file; 883 args << "/select," << file;
884 // FIXME: This shouldn't be using a hardcoded path.
885 QProcess::execute("c:/windows/explorer.exe", args); 884 QProcess::execute("c:/windows/explorer.exe", args);
886 #elif defined(Q_OS_MAC) 885 #elif defined(Q_OS_MAC)
887 file = m_workFolderPath + "/" + file; 886 file = m_workFolderPath + "/" + file;
888 args << "--reveal" << file; 887 args << "--reveal" << file;
889 QProcess::execute("/usr/bin/open", args); 888 QProcess::execute("/usr/bin/open", args);