summaryrefslogtreecommitdiff
path: root/src/modinfo.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-06-28 14:21:10 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-07-02 10:10:20 -0400
commit41292e02bdebea8b09c2c11ee87221672e970cdf (patch)
treeae130b7767feedc07bf0a5790824a9508ba588d1 /src/modinfo.h
parentb4c26c516412b2f7270be02494b85be9cad0cadb (diff)
changed how the mod url works:
- it is now independent from the nexus mod url - it can be set in addition to having a valid mod id - both urls can be displayed in the context menu re-arranged some of the widgets on the nexus tab added a track button added a custom url checkbox and open in browser button added a max-width to the browser
Diffstat (limited to 'src/modinfo.h')
-rw-r--r--src/modinfo.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/src/modinfo.h b/src/modinfo.h
index f1d816fe..e395f45b 100644
--- a/src/modinfo.h
+++ b/src/modinfo.h
@@ -733,14 +733,31 @@ public:
virtual void doConflictCheck() const {}
/**
- * @brief set the URL for a mod
- */
- virtual void setURL(QString const &) {}
+ * @brief sets whether this mod uses a custom url
+ **/
+ virtual void setHasCustomURL(bool) {}
/**
- * @returns the URL for a mod
- */
- virtual QString getURL() const { return ""; }
+ * @brief returns whether this mod uses a custom url
+ **/
+ virtual bool hasCustomURL() const { return false; }
+
+ /**
+ * @brief sets the custom url
+ **/
+ virtual void setCustomURL(QString const &) {}
+
+ /**
+ * @brief returns the custom url
+ **/
+ virtual QString getCustomURL() const { return ""; }
+
+ /**
+ * 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.
+ **/
+ QUrl parseCustomURL() const;
signals: