mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 07:15:36 +00:00
Load correct config files in the wizard
This commit is contained in:
parent
f476301670
commit
322a378907
3 changed files with 5 additions and 7 deletions
|
@ -47,7 +47,7 @@ int main(int argc, char* argv[])
|
|||
|
||||
l10n::installQtTranslations(app, "wizard", resourcesPath);
|
||||
|
||||
Wizard::MainWizard wizard;
|
||||
Wizard::MainWizard wizard(std::move(configurationManager));
|
||||
|
||||
wizard.show();
|
||||
return app.exec();
|
||||
|
|
|
@ -26,9 +26,10 @@
|
|||
|
||||
using namespace Process;
|
||||
|
||||
Wizard::MainWizard::MainWizard(QWidget* parent)
|
||||
Wizard::MainWizard::MainWizard(Files::ConfigurationManager&& cfgMgr, QWidget* parent)
|
||||
: QWizard(parent)
|
||||
, mInstallations()
|
||||
, mCfgMgr(cfgMgr)
|
||||
, mError(false)
|
||||
, mGameSettings(mCfgMgr)
|
||||
{
|
||||
|
@ -172,10 +173,7 @@ void Wizard::MainWizard::setupGameSettings()
|
|||
file.close();
|
||||
|
||||
// Now the rest
|
||||
QStringList paths;
|
||||
paths.append(Files::getUserConfigPathQString(mCfgMgr));
|
||||
paths.append(QLatin1String("openmw.cfg"));
|
||||
paths.append(Files::getGlobalConfigPathQString(mCfgMgr));
|
||||
QStringList paths = Files::getActiveConfigPathsQString(mCfgMgr);
|
||||
|
||||
for (const QString& path2 : paths)
|
||||
{
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace Wizard
|
|||
Page_Conclusion
|
||||
};
|
||||
|
||||
MainWizard(QWidget* parent = nullptr);
|
||||
MainWizard(Files::ConfigurationManager&& cfgMgr, QWidget* parent = nullptr);
|
||||
~MainWizard() override;
|
||||
|
||||
bool findFiles(const QString& name, const QString& path);
|
||||
|
|
Loading…
Reference in a new issue