Mercurial > hg > easyhg
comparison src/mainwindow.cpp @ 635:6e479f33ea93
* Prepend working folder path to filename when showing files in explorer
author | Sam Izzo <sam@humbug.net> |
---|---|
date | Mon, 27 Aug 2012 02:10:06 +1000 |
parents | db62a0cb3037 |
children | a1b4108da48c |
comparison
equal
deleted
inserted
replaced
634:58ac1b197666 | 635:6e479f33ea93 |
---|---|
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; | |
870 char c = m_workFolderPath[last].toAscii(); | |
871 if (c == '\\' || c == '/') { | |
872 m_workFolderPath.chop(1); | |
873 } | |
874 file = m_workFolderPath + "\\" + file; | |
869 file = file.replace('/', '\\'); | 875 file = file.replace('/', '\\'); |
870 args << "/select," << file; | 876 args << "/select," << file; |
871 // FIXME: This shouldn't be using a hardcoded path. | 877 // FIXME: This shouldn't be using a hardcoded path. |
872 QProcess::execute("c:/windows/explorer.exe", args); | 878 QProcess::execute("c:/windows/explorer.exe", args); |
873 #else if defined(Q_OS_MAC) | 879 #else if defined(Q_OS_MAC) |