diff options
author | arawaaa <77910862+arawaaa@users.noreply.github.com> | 2021-12-27 17:35:28 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-27 17:35:28 -0600 |
commit | 7ec3ba834dd313c4408622da30e04cdc6f4cf7c7 (patch) | |
tree | 679d7dc5939a229ad46676cd1d7aeaea7a25abce /lib/uriresolver.h | |
parent | 17bf4d180297c7e87363e179b8afa79ddb15dca7 (diff) | |
parent | 674e984e459375974f619d0e778d43a2cc928dc3 (diff) | |
download | libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.tar.gz libquotient-7ec3ba834dd313c4408622da30e04cdc6f4cf7c7.zip |
Merge branch 'dev' into pinned
Diffstat (limited to 'lib/uriresolver.h')
-rw-r--r-- | lib/uriresolver.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/uriresolver.h b/lib/uriresolver.h index f290e58b..ff97324a 100644 --- a/lib/uriresolver.h +++ b/lib/uriresolver.h @@ -42,23 +42,29 @@ public: UriResolveResult visitResource(Connection* account, const Uri& uri); protected: + virtual ~UriResolverBase() = 0; + /// Called by visitResource() when the passed URI identifies a Matrix user /*! * \return IncorrectAction if the action is not correct or not supported; * UriResolved if it is accepted; other values are disallowed */ - virtual UriResolveResult visitUser(User* user, const QString& action) + virtual UriResolveResult visitUser(User* user [[maybe_unused]], + const QString& action [[maybe_unused]]) { return IncorrectAction; } /// Called by visitResource() when the passed URI identifies a room or /// an event in a room - virtual void visitRoom(Room* room, const QString& eventId) {} + virtual void visitRoom(Room* room [[maybe_unused]], + const QString& eventId [[maybe_unused]]) + {} /// Called by visitResource() when the passed URI has `action() == "join"` /// and identifies a room that the user defined by the Connection argument /// is not a member of - virtual void joinRoom(Connection* account, const QString& roomAliasOrId, - const QStringList& viaServers = {}) + virtual void joinRoom(Connection* account [[maybe_unused]], + const QString& roomAliasOrId [[maybe_unused]], + const QStringList& viaServers [[maybe_unused]] = {}) {} /// Called by visitResource() when the passed URI has `type() == NonMatrix` /*! @@ -67,7 +73,10 @@ protected: * `return QDesktopServices::openUrl(url);` but it's strongly advised to * ask for a user confirmation beforehand. */ - virtual bool visitNonMatrix(const QUrl& url) { return false; } + virtual bool visitNonMatrix(const QUrl& url [[maybe_unused]]) + { + return false; + } }; /*! \brief Resolve the resource and invoke an action on it, via function objects |