X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fclickable.h;h=4c4facd4d1be58b14fe0e8407d527adddcc57deb;hb=c0d6dc0dec628f2e143e37ecc95cec45e636f8a5;hp=a57513faf3706733ca132d9853772a3ae7157262;hpb=92fc8c5b119111a35ab8423c3cbde5b2a022badf;p=quassel.git diff --git a/src/uisupport/clickable.h b/src/uisupport/clickable.h index a57513fa..4c4facd4 100644 --- a/src/uisupport/clickable.h +++ b/src/uisupport/clickable.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -34,7 +34,8 @@ class UISUPPORT_EXPORT Clickable { public: // Don't change these enums without also changing dependent methods! - enum Type { + enum Type + { Invalid = -1, Url = 0, Channel = 1, @@ -42,7 +43,9 @@ public: }; explicit inline Clickable(Type type = Invalid, quint16 start = 0, quint16 length = 0) - : _type(type), _start(start), _length(length) + : _type(type) + , _start(start) + , _length(length) {} inline Type type() const { return _type; } @@ -51,7 +54,7 @@ public: inline bool isValid() const { return _type != Invalid; } - void activate(NetworkId networkId, const QString &bufferName) const; + void activate(NetworkId networkId, const QString& bufferName) const; private: Type _type; @@ -59,11 +62,10 @@ private: quint16 _length; }; - class UISUPPORT_EXPORT ClickableList : public std::vector { public: - static ClickableList fromString(const QString &); + static ClickableList fromString(const QString&); Clickable atCursorPos(int idx); };