@@ -177,16 +177,35 @@ void MainWindow::constructMainMenu() {
177177 QAction *a;
178178
179179 m=menuBar ()->addMenu (tr (" &File" ));
180+
181+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
180182 m->addAction (QIcon (" :/icons/plugin.svg" ),tr (" &Open plugin" )+" ..." ,
181183 QKeySequence::Open,_sidebar,SLOT (openPlugin ()));
184+ #else
185+ m->addAction (QIcon (" :/icons/plugin.svg" ),tr (" &Open plugin" )+" ..." ,
186+ _sidebar,SLOT (openPlugin ()),QKeySequence::Open);
187+ #endif
188+
182189 m->addSeparator ();
190+
191+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
183192 m->addAction (QIcon (" :/icons/quit.svg" ),tr (" &Exit" ),
184193 QKeySequence::Quit,this ,SLOT (close ()));
194+ #else
195+ m->addAction (QIcon (" :/icons/quit.svg" ),tr (" &Exit" ),
196+ this ,SLOT (close ()),QKeySequence::Quit);
197+ #endif
185198
186199 m=menuBar ()->addMenu (tr (" &View" ));
187200
201+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
188202 a=m->addAction (tr (" Full screen mode" ),_fullScreenShortcut,this ,
189203 SLOT (menuViewFullScreen (bool )));
204+ #else
205+ a=m->addAction (tr (" Full screen mode" ),this ,
206+ SLOT (menuViewFullScreen (bool )),_fullScreenShortcut);
207+ #endif
208+
190209 a->setCheckable (true );
191210 a->setChecked (isFullScreen ());
192211 m->addSeparator ();
@@ -208,11 +227,25 @@ void MainWindow::constructMainMenu() {
208227 m=menuBar ()->addMenu (tr (" S&cripts" ));
209228 populateScriptsMenu (m,FString (Config::scriptsDir ().str ()));
210229 m->addSeparator ();
230+
231+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
211232 a=m->addAction (QIcon (" :/icons/run.svg" ),tr (" E&xecute" )+" ..." ,
212233 QKeySequence (" Ctrl+F5" ),this ,SLOT (menuLuaRunScriptFromFile ()));
234+ #else
235+ a=m->addAction (QIcon (" :/icons/run.svg" ),tr (" E&xecute" )+" ..." ,
236+ this ,SLOT (menuLuaRunScriptFromFile ()),QKeySequence (" Ctrl+F5" ));
237+ #endif
238+
213239 QObject::connect (&_lua,&LuaServerQt::statusChanged,a,&QAction::setDisabled);
240+
241+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
214242 a=m->addAction (QIcon (" :/icons/abort.svg" ),tr (" &Terminate" ),
215243 QKeySequence (" Shift+F5" ),this ,SLOT (menuLuaTerminateLuaScript ()));
244+ #else
245+ a=m->addAction (QIcon (" :/icons/abort.svg" ),tr (" &Terminate" ),
246+ this ,SLOT (menuLuaTerminateLuaScript ()),QKeySequence (" Shift+F5" ));
247+ #endif
248+
216249 a->setEnabled (false );
217250 QObject::connect (&_lua,&LuaServerQt::statusChanged,a,&QAction::setEnabled);
218251 m->addAction (QIcon (" :/icons/lua-logo-nolabel.svg" ),tr (" Statistics" ),
@@ -235,10 +268,19 @@ void MainWindow::constructMainMenu() {
235268 this ,SLOT (menuSettingsReset ()));
236269
237270 m=menuBar ()->addMenu (tr (" &Help" ));
271+
272+ #if QT_VERSION >= QT_VERSION_CHECK(6,3,0)
238273 m->addAction (QIcon (" :/icons/help.svg" ),tr (" User &manual" ),
239274 QKeySequence::HelpContents,this ,SLOT (menuHelpManual ()));
240275 m->addAction (QIcon (" :/icons/lua-logo-nolabel.svg" ),tr (" Lua &reference" ),
241276 QKeySequence (" Ctrl+L" ),this ,SLOT (menuHelpLuaHelp ()));
277+ #else
278+ m->addAction (QIcon (" :/icons/help.svg" ),tr (" User &manual" ),
279+ this ,SLOT (menuHelpManual ()),QKeySequence::HelpContents);
280+ m->addAction (QIcon (" :/icons/lua-logo-nolabel.svg" ),tr (" Lua &reference" ),
281+ this ,SLOT (menuHelpLuaHelp ()),QKeySequence (" Ctrl+L" ));
282+ #endif
283+
242284 m->addSeparator ();
243285 m->addAction (QIcon (" :/icons/appicon.svg" ),tr (" About SDM" ),
244286 this ,SLOT (menuHelpAbout ()));
0 commit comments