2424#include < QTimer>
2525#include < QSysInfo>
2626#include < QBuffer>
27+ #include < QActionGroup>
2728
2829// Function to check and sort priority of apps
2930struct CheckPriority {
@@ -779,8 +780,8 @@ void AppLoader::AppsSearch(bool install_requirements){
779780 }
780781
781782 // Sort actions for the menu and the toolbar
782- qSort (menuActions.begin (), menuActions.end (), CheckPriority ());
783- qSort (toolbarActions.begin (), toolbarActions.end (), CheckPriority ());
783+ std::sort (menuActions.begin (), menuActions.end (), CheckPriority ());
784+ std::sort (toolbarActions.begin (), toolbarActions.end (), CheckPriority ());
784785
785786 // Add menu actions to the menu
786787 for (int i=0 ; i<menuActions.length (); i++){
@@ -795,17 +796,17 @@ void AppLoader::AppsSearch(bool install_requirements){
795796
796797 // Sort all actions
797798 if (ListActions.length () > 1 ){
798- qSort (ListActions.begin (), ListActions.end (), CheckPriority ());
799+ std::sort (ListActions.begin (), ListActions.end (), CheckPriority ());
799800 }
800801
801802 // Sort menus
802803 if (ListMenus.length () > 1 ){
803- qSort (ListMenus.begin (), ListMenus.end (), CheckPriority ());
804+ std::sort (ListMenus.begin (), ListMenus.end (), CheckPriority ());
804805 }
805806
806807 // Sort toolbars
807808 if (ListToolbars.length () > 1 ){
808- qSort (ListToolbars.begin (), ListToolbars.end (), CheckPriority ());
809+ std::sort (ListToolbars.begin (), ListToolbars.end (), CheckPriority ());
809810 }
810811
811812 // Append Apps directories to RoboDK's PYTHONPATH
@@ -1012,8 +1013,7 @@ void AppLoader::onRunScript(){
10121013 if (action->isCheckable ()){
10131014 if (action->isChecked ()){
10141015 // make sure we uncheck the action if the process ends or stops
1015- connect (proc, static_cast <void (QProcess::*)(int )>(&QProcess::finished), proc, [action]() {
1016-
1016+ connect (proc, QOverload<int , QProcess::ExitStatus>::of (&QProcess::finished), proc, [action]() {
10171017 QActionGroup *grp = action->actionGroup ();
10181018 if (grp != nullptr && grp->checkedAction () == action){
10191019 emit grp->triggered (action); // important to reset the group lastaction static variable
0 commit comments