Fix stuff. Make sure different ways of aborting profiling work.
This commit is contained in:
@@ -1256,6 +1256,7 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session,
|
||||
dialog.setMaximum(0);
|
||||
dialog.setValue(0);
|
||||
dialog.setLabelText(tr("Waiting for profiler..."));
|
||||
connect(&dialog, &QDialog::rejected, profilerInstance, &BaseProfiler::abortProfiling);
|
||||
dialog.show();
|
||||
connect(profilerInstance, &BaseProfiler::readyToLaunch, [&dialog, this](const QString &message)
|
||||
{
|
||||
@@ -1270,6 +1271,17 @@ void MainWindow::launchInstance(BaseInstance *instance, AuthSessionPtr session,
|
||||
msg.exec();
|
||||
proc->launch();
|
||||
});
|
||||
connect(profilerInstance, &BaseProfiler::abortLaunch, [&dialog, this](const QString &message)
|
||||
{
|
||||
dialog.accept();
|
||||
QMessageBox msg;
|
||||
msg.setText(tr("Couldn't start the profiler: %1").arg(message));
|
||||
msg.setWindowTitle(tr("Error"));
|
||||
msg.setIcon(QMessageBox::Critical);
|
||||
msg.addButton(QMessageBox::Ok);
|
||||
msg.exec();
|
||||
proc->abort();
|
||||
});
|
||||
profilerInstance->beginProfiling(proc);
|
||||
dialog.exec();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<iconset resource="../../graphics.qrc">
|
||||
<normaloff>:/icons/toolbar/settings</normaloff>:/icons/toolbar/settings</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
@@ -33,7 +33,7 @@
|
||||
<enum>QTabWidget::Rounded</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>5</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="featuresTab">
|
||||
<attribute name="title">
|
||||
@@ -980,7 +980,9 @@
|
||||
<tabstop>postExitCmdTextBox</tabstop>
|
||||
<tabstop>settingsTabs</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../graphics.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
||||
Reference in New Issue
Block a user