void App::exit(int exitCode) { if ( wasClosed() ) return; QCoreApplication::exit(exitCode); m_exitCode = exitCode; m_closed = true; }
int App::exec() { if ( wasClosed() ) { m_app->processEvents(); return m_exitCode; } return m_app->exec(); }
void ClipboardClient::onDisconnected() { if ( wasClosed() ) return; log( tr("Connection lost!"), LogError ); exit(1); }
void MediumModeWindow::checkTableAvailable() { if(!DataFileMgr::hasNoErrorTrue("Multifacile.xml", "MediumMode", _multiple)) { _chronometre->stop(); CustomMessageBox(CannotDoThisTable, this, _multiple).exec(); emit wasClosed(); } }
void MediumModeWindow::initButtons() { _quitter = new QPushButton(tr("Retour")); _quitter->setParent(this); _quitter->setFixedSize(70, 40); _quitter->move(490, 490); _quitter->setObjectName("Quitter"); _corriger = new QPushButton(tr("Corriger")); _corriger->setParent(this); _corriger->setFixedSize(80, 40); _corriger->move(400, 490); _corriger->setObjectName("Corriger"); connect(_corriger, SIGNAL(clicked()), this, SLOT(correct())); connect(_quitter, SIGNAL(clicked()), this, SIGNAL(wasClosed())); }
void MainWindow::createProject() { project = new Project(groups, this); { connect(ui->actionReloadProject, SIGNAL(triggered()), SLOT(tryReloadProject())); connect(ui->actionClose, SIGNAL(triggered()), SLOT(tryCloseProject())); } { connect(ui->actionLoadProject, SIGNAL(triggered()), project, SLOT(load())); connect(ui->actionSaveProject, SIGNAL(triggered()), project, SLOT(save())); connect(ui->actionSaveAs, SIGNAL(triggered()), project, SLOT(saveAs())); connect(ui->actionCopyProFileTo, SIGNAL(triggered()), project, SLOT(forKojnevAlexandrNikolayevich())); connect(ui->actionLoadVersionThree, SIGNAL(triggered()), project, SLOT(forDeminValeriyNikolayevich())); } { connect(project, SIGNAL(wasReplaced(QString)), SLOT(setWindowTitle(QString))); connect(project, SIGNAL(wasClosed()), SLOT(restoreWindowTitle())); connect(project, SIGNAL(beginReading()), SLOT(beginWaiting())); connect(project, SIGNAL(endReading()), SLOT(endWaiting())); } { connect(project, SIGNAL(wasReplaced(QString)), groups, SLOT(setInitialLoadingPath(QString))); } }