diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/MainWindow.cpp | 7 | ||||
-rw-r--r-- | gui/dialogs/SettingsDialog.cpp | 30 |
2 files changed, 20 insertions, 17 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index b4811579..7c61ca9d 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -1239,7 +1239,7 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session, connect(console, SIGNAL(isClosing()), this, SLOT(instanceEnded())); proc->setLogin(session); - proc->launch(); + proc->arm(); if (profiler) { @@ -1247,6 +1247,7 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session, if (!profiler->check(&error)) { QMessageBox::critical(this, tr("Error"), tr("Couldn't start profiler: %1").arg(error)); + proc->abort(); return; } BaseProfiler *profilerInstance = profiler->createProfiler(instance, this); @@ -1267,14 +1268,14 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session, msg.setIcon(QMessageBox::Information); msg.addButton(tr("Launch"), QMessageBox::AcceptRole); msg.exec(); - proc->write("launch\n"); + proc->launch(); }); profilerInstance->beginProfiling(proc); dialog.exec(); } else { - proc->write("launch\n"); + proc->launch(); } } diff --git a/gui/dialogs/SettingsDialog.cpp b/gui/dialogs/SettingsDialog.cpp index ba2052c6..7afb6565 100644 --- a/gui/dialogs/SettingsDialog.cpp +++ b/gui/dialogs/SettingsDialog.cpp @@ -528,14 +528,15 @@ void SettingsDialog::on_jprofilerPathBtn_clicked() } void SettingsDialog::on_jprofilerCheckBtn_clicked() { - if (!ui->jprofilerPathEdit->text().isEmpty()) + QString error; + if (!MMC->profilers()["jprofiler"]->check(ui->jprofilerPathEdit->text(), &error)) { - QString error; - if (!MMC->profilers()["jprofiler"]->check(ui->jprofilerPathEdit->text(), &error)) - { - QMessageBox::critical(this, tr("Error"), - tr("Error while checking JProfiler install:\n%1").arg(error)); - } + QMessageBox::critical(this, tr("Error"), + tr("Error while checking JProfiler install:\n%1").arg(error)); + } + else + { + QMessageBox::information(this, tr("OK"), tr("JProfiler setup seems to be OK")); } } @@ -553,13 +554,14 @@ void SettingsDialog::on_jvisualvmPathBtn_clicked() } void SettingsDialog::on_jvisualvmCheckBtn_clicked() { - if (!ui->jvisualvmPathEdit->text().isEmpty()) + QString error; + if (!MMC->profilers()["jvisualvm"]->check(ui->jvisualvmPathEdit->text(), &error)) { - QString error; - if (!MMC->profilers()["jvisualvm"]->check(ui->jvisualvmPathEdit->text(), &error)) - { - QMessageBox::critical(this, tr("Error"), - tr("Error while checking JVisualVM install:\n%1").arg(error)); - } + QMessageBox::critical(this, tr("Error"), + tr("Error while checking JVisualVM install:\n%1").arg(error)); + } + else + { + QMessageBox::information(this, tr("OK"), tr("JVisualVM setup seems to be OK")); } } |