comparison src/mainwindow.cpp @ 564:39cac58b4f92

Add commandCancelled signal -- but don't make use of it; it didn't work out as I'd hoped
author Chris Cannam
date Tue, 28 Feb 2012 16:59:25 +0000
parents 533519ebc0cb
children c2e212ab0068
comparison
equal deleted inserted replaced
563:0a094020c2d4 564:39cac58b4f92
83 this, SLOT(commandStarting(HgAction))); 83 this, SLOT(commandStarting(HgAction)));
84 connect(m_runner, SIGNAL(commandCompleted(HgAction, QString)), 84 connect(m_runner, SIGNAL(commandCompleted(HgAction, QString)),
85 this, SLOT(commandCompleted(HgAction, QString))); 85 this, SLOT(commandCompleted(HgAction, QString)));
86 connect(m_runner, SIGNAL(commandFailed(HgAction, QString, QString)), 86 connect(m_runner, SIGNAL(commandFailed(HgAction, QString, QString)),
87 this, SLOT(commandFailed(HgAction, QString, QString))); 87 this, SLOT(commandFailed(HgAction, QString, QString)));
88 connect(m_runner, SIGNAL(commandCancelled(HgAction)),
89 this, SLOT(commandCancelled(HgAction)));
88 statusBar()->addPermanentWidget(m_runner); 90 statusBar()->addPermanentWidget(m_runner);
89 91
90 setWindowTitle(tr("EasyMercurial")); 92 setWindowTitle(tr("EasyMercurial"));
91 93
92 m_remoteRepoPath = ""; 94 m_remoteRepoPath = "";
2526 updateRecentMenu(); 2528 updateRecentMenu();
2527 checkFilesystem(); 2529 checkFilesystem();
2528 } 2530 }
2529 } 2531 }
2530 2532
2533 void MainWindow::commandCancelled(HgAction cancelledAction)
2534 {
2535 // Originally I had this checking whether the cancelled action was
2536 // a network one and, if so, calling hgQueryPaths to update the
2537 // local view in case it had changed anything. But that doesn't
2538 // work properly -- because at this point, although the command
2539 // has been cancelled and a kill signal sent, it hasn't actually
2540 // exited yet. If we request another command now, it will go on
2541 // the stack and be associated with the failed exit forthcoming
2542 // from the cancelled command -- giving the user a disturbing
2543 // command-failed dialog
2544 }
2545
2531 void MainWindow::connectActions() 2546 void MainWindow::connectActions()
2532 { 2547 {
2533 connect(m_exitAct, SIGNAL(triggered()), this, SLOT(close())); 2548 connect(m_exitAct, SIGNAL(triggered()), this, SLOT(close()));
2534 connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about())); 2549 connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about()));
2535 connect(m_helpAct, SIGNAL(triggered()), this, SLOT(help())); 2550 connect(m_helpAct, SIGNAL(triggered()), this, SLOT(help()));