aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-16 20:03:49 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2021-07-16 22:09:26 +0200
commit0cb9a462945b1a9dd30979e9b97415dff16816e0 (patch)
tree39a4a9b7afd7d5528f5ff53ab79b66c19c623715 /lib
parent9a5fa623c17f5644da7cdb459ade86bc8e1cdbf3 (diff)
downloadlibquotient-0cb9a462945b1a9dd30979e9b97415dff16816e0.tar.gz
libquotient-0cb9a462945b1a9dd30979e9b97415dff16816e0.zip
UriResolver: fix clang-tidy warnings
Diffstat (limited to 'lib')
-rw-r--r--lib/uriresolver.cpp2
-rw-r--r--lib/uriresolver.h19
2 files changed, 16 insertions, 5 deletions
diff --git a/lib/uriresolver.cpp b/lib/uriresolver.cpp
index 287e0552..681e3842 100644
--- a/lib/uriresolver.cpp
+++ b/lib/uriresolver.cpp
@@ -8,6 +8,8 @@
using namespace Quotient;
+UriResolverBase::~UriResolverBase() = default;
+
UriResolveResult UriResolverBase::visitResource(Connection* account,
const Uri& uri)
{
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