comparison src/mainwindow.cpp @ 638:436a97afe732

Fix preprocessor syntax
author Chris Cannam
date Fri, 19 Oct 2012 11:33:05 +0100
parents a1b4108da48c
children 91b7ad45c608
comparison
equal deleted inserted replaced
637:a1b4108da48c 638:436a97afe732
860 void MainWindow::hgShowIn(QStringList files) 860 void MainWindow::hgShowIn(QStringList files)
861 { 861 {
862 foreach (QString file, files) 862 foreach (QString file, files)
863 { 863 {
864 QStringList args; 864 QStringList args;
865 #if defined Q_OS_WIN32 865 #if defined Q_OS_WIN32
866 // Although the Win32 API is quite happy to have 866 // Although the Win32 API is quite happy to have
867 // forward slashes as directory separators, Windows 867 // forward slashes as directory separators, Windows
868 // Explorer is not 868 // Explorer is not
869 int last = m_workFolderPath.length() - 1; 869 int last = m_workFolderPath.length() - 1;
870 char c = m_workFolderPath[last].toAscii(); 870 char c = m_workFolderPath[last].toAscii();
874 file = m_workFolderPath + "\\" + file; 874 file = m_workFolderPath + "\\" + file;
875 file = file.replace('/', '\\'); 875 file = file.replace('/', '\\');
876 args << "/select," << file; 876 args << "/select," << file;
877 // FIXME: This shouldn't be using a hardcoded path. 877 // FIXME: This shouldn't be using a hardcoded path.
878 QProcess::execute("c:/windows/explorer.exe", args); 878 QProcess::execute("c:/windows/explorer.exe", args);
879 #else if defined(Q_OS_MAC) 879 #elif defined(Q_OS_MAC)
880 file = m_workFolderPath + "/" + file; 880 file = m_workFolderPath + "/" + file;
881 args << "--reveal" << file; 881 args << "--reveal" << file;
882 QProcess::execute("/usr/bin/open", args); 882 QProcess::execute("/usr/bin/open", args);
883 #endif 883 #endif
884 } 884 }
885 } 885 }
886 886
887 QString MainWindow::getDiffBinaryName() 887 QString MainWindow::getDiffBinaryName()
888 { 888 {