1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-29 03:36:40 +00:00

Load correct config files in the wizard

This commit is contained in:
AnyOldName3 2024-02-28 00:49:15 +00:00
parent f476301670
commit 322a378907
3 changed files with 5 additions and 7 deletions

View file

@ -47,7 +47,7 @@ int main(int argc, char* argv[])
l10n::installQtTranslations(app, "wizard", resourcesPath); l10n::installQtTranslations(app, "wizard", resourcesPath);
Wizard::MainWizard wizard; Wizard::MainWizard wizard(std::move(configurationManager));
wizard.show(); wizard.show();
return app.exec(); return app.exec();

View file

@ -26,9 +26,10 @@
using namespace Process; using namespace Process;
Wizard::MainWizard::MainWizard(QWidget* parent) Wizard::MainWizard::MainWizard(Files::ConfigurationManager&& cfgMgr, QWidget* parent)
: QWizard(parent) : QWizard(parent)
, mInstallations() , mInstallations()
, mCfgMgr(cfgMgr)
, mError(false) , mError(false)
, mGameSettings(mCfgMgr) , mGameSettings(mCfgMgr)
{ {
@ -172,10 +173,7 @@ void Wizard::MainWizard::setupGameSettings()
file.close(); file.close();
// Now the rest // Now the rest
QStringList paths; QStringList paths = Files::getActiveConfigPathsQString(mCfgMgr);
paths.append(Files::getUserConfigPathQString(mCfgMgr));
paths.append(QLatin1String("openmw.cfg"));
paths.append(Files::getGlobalConfigPathQString(mCfgMgr));
for (const QString& path2 : paths) for (const QString& path2 : paths)
{ {

View file

@ -45,7 +45,7 @@ namespace Wizard
Page_Conclusion Page_Conclusion
}; };
MainWizard(QWidget* parent = nullptr); MainWizard(Files::ConfigurationManager&& cfgMgr, QWidget* parent = nullptr);
~MainWizard() override; ~MainWizard() override;
bool findFiles(const QString& name, const QString& path); bool findFiles(const QString& name, const QString& path);