summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2020-10-09 20:32:26 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2020-10-09 20:32:26 +0200
commit9d7d55918c065d5d7f615cbd89e20ab7227f54ff (patch)
treee75dfc6c59c3c55c3098998d2f33172406a38ba9 /src/modinfo.h
parent35b4aa1024bb6904846c36cdbbb638b3e6031cda (diff)
Add IModInterface::setUrl and remove IInstallationManager::setURL.
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index 0533d9fe..7223cece 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -790,6 +790,19 @@ public: // Methods after this do not come from IModInterface:
virtual void setCustomURL(QString const&) {}
/**
+ * @brief Sets the URL for this mod.
+ *
+ * In practice, this is a shortcut for setHasCustomURL followed by
+ * setCustomURL.
+ *
+ * @param url The new URL.
+ */
+ void setUrl(QString const& url) override {
+ setHasCustomURL(true);
+ setCustomURL(url);
+ }
+
+ /**
* If hasCustomURL() is true and getCustomURL() is not empty, tries to parse
* the url using QUrl::fromUserInput() and returns it. Otherwise, returns an
* empty QUrl.