comparison src/mainwindow.cpp @ 382:f7dc2c5d8650

Avoid failing on startup if started with no cwd
author Chris Cannam
date Thu, 19 May 2011 09:14:12 +0100
parents ad2e56d1e4c4
children 2925975bdc9e
comparison
equal deleted inserted replaced
381:c22a3981c88d 382:f7dc2c5d8650
218 218
219 void MainWindow::hgTest() 219 void MainWindow::hgTest()
220 { 220 {
221 QStringList params; 221 QStringList params;
222 params << "--version"; 222 params << "--version";
223 m_runner->requestAction(HgAction(ACT_TEST_HG, m_myDirPath, params)); 223 // The path is not necessarily set here, but we need something for
224 // this test or else HgRunner will (cautiously) refuse to run
225 QString path = m_myDirPath;
226 if (path == "") path = QDir::homePath();
227 m_runner->requestAction(HgAction(ACT_TEST_HG, path, params));
224 } 228 }
225 229
226 void MainWindow::hgTestExtension() 230 void MainWindow::hgTestExtension()
227 { 231 {
228 QStringList params; 232 QStringList params;
229 params << "--version"; 233 params << "--version";
230 m_runner->requestAction(HgAction(ACT_TEST_HG_EXT, m_myDirPath, params)); 234 // The path is not necessarily set here, but we need something for
235 // this test or else HgRunner will (cautiously) refuse to run
236 QString path = m_myDirPath;
237 if (path == "") path = QDir::homePath();
238 m_runner->requestAction(HgAction(ACT_TEST_HG_EXT, path, params));
231 } 239 }
232 240
233 void MainWindow::hgStat() 241 void MainWindow::hgStat()
234 { 242 {
235 QStringList params; 243 QStringList params;