Move helper functions to Utils::Gui namespace

This commit is contained in:
Chocobo1 2019-03-02 13:22:13 +08:00
parent 0f1fc7be9d
commit adbd34c795
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
21 changed files with 187 additions and 190 deletions

View file

@ -45,6 +45,10 @@
#include "base/utils/misc.h"
#include "base/utils/string.h"
#ifndef DISABLE_GUI
#include "gui/utils.h"
#endif
namespace
{
const int USAGE_INDENTATION = 4;
@ -580,7 +584,7 @@ void displayUsage(const QString &prgName)
#else
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prgName), QMessageBox::Ok);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.move(Utils::Gui::screenCenter(&msgBox));
msgBox.exec();
#endif
}