summaryrefslogtreecommitdiffstats
path: root/gui/dialogs
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-16 00:10:45 +0100
commit7ceb2cacb129d5924087f616cfc0b949689ed4fe (patch)
tree0bf4136e72a4d6bd56bbaf434fbddced719b01cd /gui/dialogs
parent8219dbf612f4e6f603d304348fc388e364602f98 (diff)
downloadMultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.gz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.lz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.tar.xz
MultiMC-7ceb2cacb129d5924087f616cfc0b949689ed4fe.zip
Fix a few bugs in profilers.
* Legacy was launching before the profiler. * Some clarity changes. * Report problem with empty strings as profiler paths.
Diffstat (limited to 'gui/dialogs')
-rw-r--r--gui/dialogs/SettingsDialog.cpp30
1 files changed, 16 insertions, 14 deletions
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"));
}
}