summaryrefslogtreecommitdiff
path: root/src/profile.h
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2018-12-20 14:33:08 -0600
committerGitHub <noreply@github.com>2018-12-20 14:33:08 -0600
commited67ac211306bee2067178ace1a0a7fbcd0bea1b (patch)
tree8fe31503ba20a436457c8c94d61f953b4aa067b4 /src/profile.h
parent2232bdfc779b8575c8374a723d4d02a2b41fb352 (diff)
parent9a33dc148054443cb0efd5916ff758fca5bc09e3 (diff)
Merge pull request #586 from ModOrganizer2/Develop
Release 2.1.6
Diffstat (limited to 'src/profile.h')
-rw-r--r--src/profile.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/src/profile.h b/src/profile.h
index 1fcad046..a9d68062 100644
--- a/src/profile.h
+++ b/src/profile.h
@@ -79,6 +79,13 @@ public:
~Profile();
/**
+ * Determines the default settings for the profile based on the current state of the profile's
+ * files. This function should remain backwards compatible as much as possible.
+ **/
+
+ void findProfileSettings(void);
+
+ /**
* @return true if this profile (still) exists on disc
*/
bool exists() const;
@@ -230,7 +237,7 @@ public:
* retrieve the number of mods for which this object has status information.
* This is usually the same as ModInfo::getNumMods() except between
* calls to ModInfo::updateFromDisc() and the Profile::refreshModStatus()
- *
+ *
* @return number of mods for which the profile has status information
**/
size_t numMods() const { return m_ModStatus.size(); }
@@ -247,7 +254,7 @@ public:
* @return the index of the mod
* @throw std::exception an exception is thrown if there is no mod with the specified priority
**/
- unsigned int modIndexByPriority(unsigned int priority) const;
+ unsigned int modIndexByPriority(int priority) const;
/**
* @brief enable or disable a mod
@@ -287,12 +294,16 @@ public:
void dumpModStatus() const;
- QVariant setting(const QString &section, const QString &name,
- const QVariant &fallback = QVariant());
+ QVariant setting(const QString &section, const QString &name = QString(),
+ const QVariant &fallback = QVariant()) const;
void storeSetting(const QString &section, const QString &name,
const QVariant &value);
- void removeSetting(const QString &section, const QString &name);
+ void storeSetting(const QString &name, const QVariant &value);
+ void removeSetting(const QString &section, const QString &name = QString());
+ void removeSetting(const QString &name);
+
+ int getPriorityMinimum() const;
signals:
@@ -347,7 +358,7 @@ private:
mutable QByteArray m_LastModlistHash;
std::vector<ModStatus> m_ModStatus;
- std::vector<unsigned int> m_ModIndexByPriority;
+ std::map<int, unsigned int> m_ModIndexByPriority;
unsigned int m_NumRegularMods;
MOBase::DelayedFileWriter m_ModListWriter;