mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 03:45:45 -04:00
Qt: Show dialog on startup for settings version mismatch
For the QMessageBox to appear, error reporting is performed again after main window creation.
This commit is contained in:
@ -55,6 +55,8 @@ int main(int argc, char* argv[])
|
||||
window->startupUpdateCheck();
|
||||
}
|
||||
|
||||
window->reportSettingsVersionMismatchString();
|
||||
|
||||
int result = app.exec();
|
||||
|
||||
window.reset();
|
||||
|
@ -1088,6 +1088,13 @@ void MainWindow::startupUpdateCheck()
|
||||
checkForUpdates(false);
|
||||
}
|
||||
|
||||
void MainWindow::reportSettingsVersionMismatchString()
|
||||
{
|
||||
const QString mismatch_str = QString::fromStdString(m_host_interface->GetSettingsVersionMismatchString());
|
||||
if (!mismatch_str.isEmpty())
|
||||
reportError(mismatch_str);
|
||||
}
|
||||
|
||||
void MainWindow::updateDebugMenuVisibility()
|
||||
{
|
||||
const bool visible = m_host_interface->GetBoolSettingValue("Main", "ShowDebugMenu", false);
|
||||
|
@ -30,6 +30,10 @@ public:
|
||||
/// Performs update check if enabled in settings.
|
||||
void startupUpdateCheck();
|
||||
|
||||
/// Reports m_host_interface's settings version mismatch string. Does nothing if string is empty (no settings version
|
||||
/// mismatch detected).
|
||||
void reportSettingsVersionMismatchString();
|
||||
|
||||
public Q_SLOTS:
|
||||
/// Updates debug menu visibility (hides if disabled).
|
||||
void updateDebugMenuVisibility();
|
||||
|
Reference in New Issue
Block a user