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:
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);
|
l10n::installQtTranslations(app, "wizard", resourcesPath);
|
||||||
|
|
||||||
Wizard::MainWizard wizard;
|
Wizard::MainWizard wizard(std::move(configurationManager));
|
||||||
|
|
||||||
wizard.show();
|
wizard.show();
|
||||||
return app.exec();
|
return app.exec();
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue