add more #ifdefs

This commit is contained in:
Ryan Cao 2022-05-24 16:18:02 +08:00
parent 0426149580
commit 9673dac22b
No known key found for this signature in database
GPG Key ID: 528A2C1B6656B97F
2 changed files with 5 additions and 0 deletions

View File

@ -871,9 +871,11 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
m_mcedit.reset(new MCEditTool(m_settings));
}
#ifdef Q_OS_MACOS
connect(this, &Application::clickedOnDock, [this]() {
this->showMainWindow();
});
#endif
connect(this, &Application::aboutToQuit, [this](){
if(m_instances)

View File

@ -182,7 +182,10 @@ signals:
void updateAllowedChanged(bool status);
void globalSettingsAboutToOpen();
void globalSettingsClosed();
#ifdef Q_OS_MACOS
void clickedOnDock();
#endif
public slots:
bool launch(