X-Git-Url: https://vaikene.ee/gitweb/gitweb.cgi?a=blobdiff_plain;f=src%2Flibs%2FCommon%2Fapp.cpp;h=3956548f4e1656e1c1e7f44d343d0ab89fccec19;hb=4d81227da330c21c7aa0badc88bd5ad4467067fb;hp=6f289427a864d3c53b7703208499daae3991fa75;hpb=688e916955a6b848dbbae1f65ae85a73593ed680;p=evaf diff --git a/src/libs/Common/app.cpp b/src/libs/Common/app.cpp index 6f28942..3956548 100644 --- a/src/libs/Common/app.cpp +++ b/src/libs/Common/app.cpp @@ -32,7 +32,7 @@ using namespace eVaf::Common; iApp * iApp::instance() { - Internal::App singleton; + static Internal::App singleton; return &singleton; } @@ -95,6 +95,8 @@ bool App::init() else if (QRegExp("-[-]?lang(uage)?").exactMatch(arg.at(0)) && arg.size() > 1) mLanguage = arg.at(1); } + + return true; } QString const App::xmlFileName() const @@ -112,7 +114,7 @@ QString const App::xmlFileName() const name = mName + "_" + mLanguage.left(2) + ".xml"; fi.setFile(iEnv::instance()->etcDir() + name); if (fi.isReadable()) - mName = name; + mXmlFile = name; else // Fall-back to the generic name mXmlFile = mName + ".xml";