ScreenRecorder: Fix "show dialog or settings" logic

If the user selects "Record Screen" while the ffmpeg/ffprobe are not
set, the ScreenRecorder settings are shown. The ScreenRecorder dialog
did open up after the settings page, even if the user just pressed OK
without setting the tools.

With this change, not the settings page return value determines whether
to show the ScreenRecorder dialog, but rather a second check if the
tools are set/registered.

Change-Id: I35b8f4e3afe7ea5e6834fcff74ce8f73d3a115b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Alessandro Portale
2024-03-14 12:40:44 +01:00
parent f8cf71e4ba
commit 9606f81bc8

View File

@@ -135,9 +135,11 @@ public:
private: private:
void showDialogOrSettings() void showDialogOrSettings()
{ {
if (!Internal::settings().toolsRegistered() && if (!Internal::settings().toolsRegistered()) {
!Core::ICore::showOptionsDialog(Constants::TOOLSSETTINGSPAGE_ID)) { // Show options if ffmpeg/ffprobe are neither autodetected nor manually set
return; Core::ICore::showOptionsDialog(Constants::TOOLSSETTINGSPAGE_ID);
if (!Internal::settings().toolsRegistered())
return; // User did not set ffmpeg/ffprobe
} }
ScreenRecorderDialog::showDialog(); ScreenRecorderDialog::showDialog();