App: harmonize API of App::Application

* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
This commit is contained in:
wmayer
2021-11-04 10:50:09 +01:00
parent 095d859b14
commit f36126770c
23 changed files with 45 additions and 45 deletions

View File

@@ -418,7 +418,7 @@ Action * StdCmdDownloadOnlineHelp::createAction(void)
{
Action *pcAction;
QString exe = QString::fromLatin1(App::GetApplication().getExecutableName());
QString exe = QString::fromStdString(App::Application::getExecutableName());
pcAction = new Action(this,getMainWindow());
pcAction->setText(QCoreApplication::translate(
this->className(), getMenuText()));
@@ -437,7 +437,7 @@ Action * StdCmdDownloadOnlineHelp::createAction(void)
void StdCmdDownloadOnlineHelp::languageChange()
{
if (_pcAction) {
QString exe = QString::fromLatin1(App::GetApplication().getExecutableName());
QString exe = QString::fromStdString(App::Application::getExecutableName());
_pcAction->setText(QCoreApplication::translate(
this->className(), getMenuText()));
_pcAction->setToolTip(QCoreApplication::translate(
@@ -483,7 +483,7 @@ void StdCmdDownloadOnlineHelp::activated(int iMsg)
bool canStart = false;
// set output directory
QString path = QString::fromUtf8(App::GetApplication().getHomePath());
QString path = QString::fromStdString(App::Application::getHomePath());
path += QString::fromLatin1("/doc/");
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/OnlineHelp");
path = QString::fromUtf8(hURLGrp->GetASCII( "DownloadLocation", path.toLatin1() ).c_str());