aboutsummaryrefslogtreecommitdiff
path: root/logic/OneSixLibrary.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-01 19:37:16 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-01 19:37:16 +0100
commit1936bd181f57a554ce0dd757ffe9419100eb47f4 (patch)
treea22660979335746b930c88f353b4e29f1bbe9a2a /logic/OneSixLibrary.h
parentb4b6091372310f4a811180cffde3ea5611881e6c (diff)
parent8637cce4333aaf56a231d5fab866b0e770436783 (diff)
downloadPrismLauncher-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar.gz
PrismLauncher-1936bd181f57a554ce0dd757ffe9419100eb47f4.tar.bz2
PrismLauncher-1936bd181f57a554ce0dd757ffe9419100eb47f4.zip
Merge branch 'feature_derpstances' of https://github.com/02JanDal/MultiMC5 into feature_derpstances
Conflicts: gui/dialogs/OneSixModEditDialog.cpp logic/OneSixUpdate.cpp
Diffstat (limited to 'logic/OneSixLibrary.h')
-rw-r--r--logic/OneSixLibrary.h32
1 files changed, 17 insertions, 15 deletions
diff --git a/logic/OneSixLibrary.h b/logic/OneSixLibrary.h
index 227cdbef..5384015a 100644
--- a/logic/OneSixLibrary.h
+++ b/logic/OneSixLibrary.h
@@ -63,7 +63,7 @@ public:
public:
/// Constructor
- OneSixLibrary(QString name)
+ OneSixLibrary(const QString &name)
{
m_name = name;
}
@@ -84,48 +84,50 @@ public:
void finalize();
/// Set the library composite name
- void setName(QString name);
+ void setName(const QString &name);
/// get a decent-looking name
- QString name()
+ QString name() const
{
return m_decentname;
}
/// get a decent-looking version
- QString version()
+ QString version() const
{
return m_decentversion;
}
/// what kind of library is it? (for display)
- QString type()
+ QString type() const
{
return m_decenttype;
}
/// Set the url base for downloads
- void setBaseUrl(QString base_url);
+ void setBaseUrl(const QString &base_url);
/// Call this to mark the library as 'native' (it's a zip archive with DLLs)
void setIsNative();
/// Attach a name suffix to the specified OS native
- void addNative(OpSys os, QString suffix);
+ void addNative(OpSys os, const QString &suffix);
+ /// Clears all suffixes
+ void clearSuffixes();
/// Set the load rules
void setRules(QList<std::shared_ptr<Rule>> rules);
/// Returns true if the library should be loaded (or extracted, in case of natives)
- bool isActive();
+ bool isActive() const;
/// Returns true if the library is native
- bool isNative();
+ bool isNative() const;
/// Get the URL to download the library from
- QString downloadUrl();
+ QString downloadUrl() const;
/// Get the relative path where the library should be saved
- QString storagePath();
+ QString storagePath() const;
/// set an absolute URL for the library. This is an MMC extension.
- void setAbsoluteUrl(QString absolute_url);
- QString absoluteUrl();
+ void setAbsoluteUrl(const QString &absolute_url);
+ QString absoluteUrl() const;
/// set a hint about how to treat the library. This is an MMC extension.
- void setHint(QString hint);
- QString hint();
+ void setHint(const QString &hint);
+ QString hint() const;
bool extractTo(QString target_dir);
bool filesExist();