1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:15:32 +00:00

fixed merge conflicts

Merge branch 'saving' of https://github.com/zinnschlag/openmw into esxSelector

Conflicts:
	apps/launcher/datafilespage.cpp
	apps/launcher/settings/gamesettings.hpp
	components/contentselector/model/contentmodel.cpp
This commit is contained in:
graffy76 2013-11-02 09:31:23 -05:00
commit 8d12e2b99d
4 changed files with 47 additions and 25 deletions

View file

@ -262,19 +262,11 @@ bool Launcher::MainDialog::showFirstRunDialog()
// Add a new profile
if (msgBox.isChecked()) {
mLauncherSettings.setValue(QString("Profiles/currentprofile"), QString("Imported"));
mLauncherSettings.remove(QString("Profiles/Imported/content"));
mLauncherSettings.remove(QString("Profiles/Imported/master"));
mLauncherSettings.remove(QString("Profiles/Imported/plugin"));
QStringList masters = mGameSettings.values(QString("master"));
QStringList plugins = mGameSettings.values(QString("plugin"));
foreach (const QString &master, masters) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/master"), master);
}
foreach (const QString &plugin, plugins) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/plugin"), plugin);
QStringList contents = mGameSettings.values(QString("content"));
foreach (const QString &content, contents) {
mLauncherSettings.setMultiValue(QString("Profiles/Imported/content"), content);
}
}

View file

@ -139,13 +139,13 @@ bool Launcher::GameSettings::writeFile(QTextStream &stream)
while (i.hasPrevious()) {
i.previous();
if (i.key() == QLatin1String("master") || i.key() == QLatin1String("plugin"))
if (i.key() == QLatin1String("content"))
continue;
// Quote paths with spaces
if (i.key() == QLatin1String("data")
|| i.key() == QLatin1String("data-local")
|| i.key() == QLatin1String("resources"))
|| i.key() == QLatin1String("data-local")
|| i.key() == QLatin1String("resources"))
{
if (i.value().contains(QChar(' ')))
{
@ -161,15 +161,24 @@ bool Launcher::GameSettings::writeFile(QTextStream &stream)
}
QStringList masters = mSettings.values(QString("master"));
for (int i = masters.count(); i--;) {
stream << "content=" << masters.at(i) << "\n";
}
QStringList plugins = mSettings.values(QString("plugin"));
for (int i = plugins.count(); i--;) {
stream << "content=" << plugins.at(i) << "\n";
QStringList content = mSettings.values(QString("content"));
for (int i = content.count(); i--;) {
stream << "content=" << content.at(i) << "\n";
}
return true;
}
bool GameSettings::hasMaster()
{
bool result = false;
QStringList content = mSettings.values(QString("content"));
for (int i = 0; i < content.count(); ++i) {
if (content.at(i).contains(".omwgame") || content.at(i).contains(".esm")) {
result = true;
break;
}
}
return result;
}

View file

@ -8,8 +8,11 @@
#include <boost/filesystem/path.hpp>
namespace Files { typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;}
namespace Files
{
typedef std::vector<boost::filesystem::path> PathContainer;
struct ConfigurationManager;
}
namespace Launcher
{
@ -42,6 +45,12 @@ namespace Launcher
mSettings.remove(key);
}
inline QStringList getDataDirs() { return mDataDirs; }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; }
bool hasMaster();
inline QStringList getDataDirs() { return mDataDirs; }
inline void addDataDir(const QString &dir) { if(!dir.isEmpty()) mDataDirs.append(dir); }
inline QString getDataLocal() {return mDataLocal; }

View file

@ -565,9 +565,21 @@ ContentSelectorModel::ContentFileList ContentSelectorModel::ContentModel::checke
{
ContentFileList list;
// First search for game files and next addons,
// so we get more or less correct game files vs addons order.
foreach (EsmFile *file, mFiles)
{
<<<<<<< HEAD
if (isChecked(file->filePath()))
=======
if (isChecked(file->fileName()) && file->isGameFile())
list << file;
}
foreach (EsmFile *file, mFiles)
{
if (isChecked(file->fileName()) && !file->isGameFile())
>>>>>>> f5fbe7361fad698e8dd3330e9820a157800be8ae
list << file;
}