Mark classes as final where possible

pull/1215/head
Nicolas Werner 2 years ago
parent 00cc9a09a5
commit af699eb83e
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 4
      src/AliasEditModel.h
  2. 2
      src/AvatarProvider.h
  3. 4
      src/BlurhashProvider.h
  4. 2
      src/Cache_p.h
  5. 2
      src/ChatPage.h
  6. 2
      src/Clipboard.h
  7. 2
      src/ColorImageProvider.h
  8. 2
      src/CombinedImagePackModel.h
  9. 2
      src/CompletionProxyModel.h
  10. 2
      src/ImagePackListModel.h
  11. 4
      src/InviteesModel.h
  12. 4
      src/JdenticonProvider.h
  13. 2
      src/MainWindow.h
  14. 4
      src/MemberList.h
  15. 4
      src/MxcImageProvider.h
  16. 8
      src/PowerlevelsEditModels.h
  17. 4
      src/ReadReceiptsModel.h
  18. 2
      src/RoomsModel.h
  19. 2
      src/SSOHandler.h
  20. 2
      src/SingleImagePackModel.h
  21. 4
      src/TrayIcon.h
  22. 4
      src/UserSettingsPage.h
  23. 2
      src/UsersModel.h
  24. 2
      src/dbus/NhekoDBusApi.h
  25. 2
      src/dbus/NhekoDBusBackend.h
  26. 2
      src/dialogs/FallbackAuth.h
  27. 2
      src/dialogs/ReCaptcha.h
  28. 2
      src/dock/Dock.h
  29. 2
      src/encryption/DeviceVerificationFlow.h
  30. 2
      src/encryption/SelfVerificationStatus.h
  31. 2
      src/encryption/VerificationManager.h
  32. 2
      src/notifications/Manager.h
  33. 4
      src/timeline/CommunitiesModel.h
  34. 2
      src/timeline/DelegateChooser.h
  35. 2
      src/timeline/EventStore.h
  36. 6
      src/timeline/InputBar.h
  37. 2
      src/timeline/Permissions.h
  38. 2
      src/timeline/PresenceEmitter.h
  39. 4
      src/timeline/RoomlistModel.h
  40. 2
      src/timeline/TimelineModel.h
  41. 2
      src/timeline/TimelineViewManager.h
  42. 2
      src/ui/NhekoGlobalObject.h
  43. 6
      src/ui/RoomSettings.h
  44. 4
      src/ui/RoomSummary.h
  45. 2
      src/ui/Theme.h
  46. 2
      src/ui/ThemeManager.h
  47. 2
      src/ui/UIA.h
  48. 6
      src/ui/UserProfile.h
  49. 2
      src/voip/CallDevices.h
  50. 2
      src/voip/CallManager.h
  51. 2
      src/voip/WebRTCSession.h

@ -11,7 +11,7 @@
#include "CacheStructs.h"
class FetchPublishedAliasesJob : public QObject
class FetchPublishedAliasesJob final : public QObject
{
Q_OBJECT
@ -26,7 +26,7 @@ signals:
void advertizedAliasesFetched(std::vector<std::string> aliases);
};
class AliasEditingModel : public QAbstractListModel
class AliasEditingModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(bool canAdvertize READ canAdvertize CONSTANT)

@ -11,7 +11,7 @@
using AvatarCallback = std::function<void(QPixmap)>;
class AvatarProxy : public QObject
class AvatarProxy final : public QObject
{
Q_OBJECT

@ -11,7 +11,7 @@
#include <QImage>
#include <QThreadPool>
class BlurhashRunnable
class BlurhashRunnable final
: public QObject
, public QRunnable
{
@ -33,7 +33,7 @@ private:
QSize m_requestedSize;
};
class BlurhashResponse : public QQuickImageResponse
class BlurhashResponse final : public QQuickImageResponse
{
public:
BlurhashResponse(const QString &id, const QSize &requestedSize)

@ -33,7 +33,7 @@ namespace mtx::responses {
struct Messages;
}
class Cache : public QObject
class Cache final : public QObject
{
Q_OBJECT

@ -48,7 +48,7 @@ struct Rooms;
using SecretsToDecrypt = std::map<std::string, mtx::secret_storage::AesHmacSha2EncryptedData>;
class ChatPage : public QObject
class ChatPage final : public QObject
{
Q_OBJECT

@ -8,7 +8,7 @@
#include <QObject>
#include <QString>
class Clipboard : public QObject
class Clipboard final : public QObject
{
Q_OBJECT
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)

@ -5,7 +5,7 @@
#include <QQuickImageProvider>
class ColorImageProvider : public QQuickImageProvider
class ColorImageProvider final : public QQuickImageProvider
{
public:
ColorImageProvider()

@ -9,7 +9,7 @@
#include <mtx/events/mscs/image_packs.hpp>
class CombinedImagePackModel : public QAbstractListModel
class CombinedImagePackModel final : public QAbstractListModel
{
Q_OBJECT
public:

@ -156,7 +156,7 @@ struct trie
}
};
class CompletionProxyModel : public QAbstractProxyModel
class CompletionProxyModel final : public QAbstractProxyModel
{
Q_OBJECT
Q_PROPERTY(QString searchString READ searchString WRITE setSearchString NOTIFY newSearchString)

@ -10,7 +10,7 @@
#include <QSharedPointer>
class SingleImagePackModel;
class ImagePackListModel : public QAbstractListModel
class ImagePackListModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(bool containsAccountPack READ containsAccountPack CONSTANT)

@ -9,7 +9,7 @@
#include <QAbstractListModel>
#include <QVector>
class Invitee : public QObject
class Invitee final : public QObject
{
Q_OBJECT
@ -27,7 +27,7 @@ private:
friend class InviteesModel;
};
class InviteesModel : public QAbstractListModel
class InviteesModel final : public QAbstractListModel
{
Q_OBJECT

@ -14,7 +14,7 @@
#include "jdenticoninterface.h"
class JdenticonRunnable
class JdenticonRunnable final
: public QObject
, public QRunnable
{
@ -34,7 +34,7 @@ private:
QSize m_requestedSize;
};
class JdenticonResponse : public QQuickImageResponse
class JdenticonResponse final : public QQuickImageResponse
{
public:
JdenticonResponse(const QString &key, bool crop, double radius, const QSize &requestedSize);

@ -39,7 +39,7 @@ class MemberList;
class ReCaptcha;
}
class MainWindow : public QQuickView
class MainWindow final : public QQuickView
{
Q_OBJECT

@ -12,7 +12,7 @@
#include "CacheStructs.h"
class MemberListBackend : public QAbstractListModel
class MemberListBackend final : public QAbstractListModel
{
Q_OBJECT
@ -77,7 +77,7 @@ private:
friend class MemberList;
};
class MemberList : public QSortFilterProxyModel
class MemberList final : public QSortFilterProxyModel
{
Q_OBJECT

@ -14,7 +14,7 @@
#include <mtx/common.hpp>
class MxcImageRunnable : public QObject
class MxcImageRunnable final : public QObject
{
Q_OBJECT
@ -38,7 +38,7 @@ public:
bool m_crop;
double m_radius;
};
class MxcImageResponse : public QQuickImageResponse
class MxcImageResponse final : public QQuickImageResponse
{
public:
MxcImageResponse(const QString &id, bool crop, double radius, const QSize &requestedSize)

@ -11,7 +11,7 @@
#include "CacheStructs.h"
class PowerlevelsTypeListModel : public QAbstractListModel
class PowerlevelsTypeListModel final : public QAbstractListModel
{
Q_OBJECT
@ -68,7 +68,7 @@ public:
mtx::events::state::PowerLevels powerLevels_;
};
class PowerlevelsUserListModel : public QAbstractListModel
class PowerlevelsUserListModel final : public QAbstractListModel
{
Q_OBJECT
@ -122,7 +122,7 @@ public:
mtx::events::state::PowerLevels powerLevels_;
};
class PowerlevelsSpacesListModel : public QAbstractListModel
class PowerlevelsSpacesListModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(bool applyToChildren READ applyToChildren WRITE setApplyToChildren NOTIFY
@ -192,7 +192,7 @@ public:
bool applyToChildren_ = true, overwriteDiverged_ = false;
};
class PowerlevelEditingModels : public QObject
class PowerlevelEditingModels final : public QObject
{
Q_OBJECT

@ -12,7 +12,7 @@
#include <QSortFilterProxyModel>
#include <QString>
class ReadReceiptsModel : public QAbstractListModel
class ReadReceiptsModel final : public QAbstractListModel
{
Q_OBJECT
@ -51,7 +51,7 @@ private:
QVector<QPair<QString, QDateTime>> readReceipts_;
};
class ReadReceiptsProxy : public QSortFilterProxyModel
class ReadReceiptsProxy final : public QSortFilterProxyModel
{
Q_OBJECT

@ -10,7 +10,7 @@
#include <QAbstractListModel>
#include <QString>
class RoomsModel : public QAbstractListModel
class RoomsModel final : public QAbstractListModel
{
public:
enum Roles

@ -8,7 +8,7 @@
#include <QObject>
#include <string>
class SSOHandler : public QObject
class SSOHandler final : public QObject
{
Q_OBJECT

@ -13,7 +13,7 @@
#include "CacheStructs.h"
class SingleImagePackModel : public QAbstractListModel
class SingleImagePackModel final : public QAbstractListModel
{
Q_OBJECT

@ -14,7 +14,7 @@
class QAction;
class QPainter;
class MsgCountComposedIcon : public QIconEngine
class MsgCountComposedIcon final : public QIconEngine
{
public:
MsgCountComposedIcon(const QString &filename);
@ -36,7 +36,7 @@ private:
QIcon icon_;
};
class TrayIcon : public QSystemTrayIcon
class TrayIcon final : public QSystemTrayIcon
{
Q_OBJECT
public:

@ -26,7 +26,7 @@ constexpr int OptionMargin = 6;
constexpr int LayoutTopMargin = 50;
constexpr int LayoutBottomMargin = LayoutTopMargin;
class UserSettings : public QObject
class UserSettings final : public QObject
{
Q_OBJECT
@ -393,7 +393,7 @@ private:
static QSharedPointer<UserSettings> instance_;
};
class UserSettingsModel : public QAbstractListModel
class UserSettingsModel final : public QAbstractListModel
{
Q_OBJECT

@ -7,7 +7,7 @@
#include <QAbstractListModel>
class UsersModel : public QAbstractListModel
class UsersModel final : public QAbstractListModel
{
public:
enum Roles

@ -25,7 +25,7 @@ const QVersionNumber dbusApiVersion{1, 0, 0};
bool
apiVersionIsCompatible(const QVersionNumber &clientAppVersion);
class RoomInfoItem : public QObject
class RoomInfoItem final : public QObject
{
Q_OBJECT

@ -13,7 +13,7 @@
class RoomlistModel;
class NhekoDBusBackend : public QObject
class NhekoDBusBackend final : public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "im.nheko.Nheko")

@ -12,7 +12,7 @@ class QLabel;
namespace dialogs {
class FallbackAuth : public QWidget
class FallbackAuth final : public QWidget
{
Q_OBJECT

@ -11,7 +11,7 @@ class QPushButton;
namespace dialogs {
class ReCaptcha : public QWidget
class ReCaptcha final : public QWidget
{
Q_OBJECT

@ -10,7 +10,7 @@
#include <QtDBus/QDBusInterface>
#endif
class Dock : public QObject
class Dock final : public QObject
{
Q_OBJECT
public:

@ -61,7 +61,7 @@ using sas_ptr = std::unique_ptr<mtx::crypto::SAS>;
* We are the bigger mxid and deviceid (since we discard our start message). <- GLARE RESOLUTION
*/
// clang-format on
class DeviceVerificationFlow : public QObject
class DeviceVerificationFlow final : public QObject
{
Q_OBJECT
Q_PROPERTY(QString state READ state NOTIFY stateChanged)

@ -7,7 +7,7 @@
#include <QObject>
class SelfVerificationStatus : public QObject
class SelfVerificationStatus final : public QObject
{
Q_OBJECT

@ -18,7 +18,7 @@ class TimelineModel;
class TimelineViewManager;
class RoomlistModel;
class VerificationManager : public QObject
class VerificationManager final : public QObject
{
Q_OBJECT

@ -28,7 +28,7 @@ operator==(const roomEventId &a, const roomEventId &b)
return a.roomId == b.roomId && a.eventId == b.eventId;
}
class NotificationsManager : public QObject
class NotificationsManager final : public QObject
{
Q_OBJECT
public:

@ -19,7 +19,7 @@
class CommunitiesModel;
class FilteredCommunitiesModel : public QSortFilterProxyModel
class FilteredCommunitiesModel final : public QSortFilterProxyModel
{
Q_OBJECT
@ -71,7 +71,7 @@ public:
bool canEditParent = false, canEditChild = false;
};
class CommunitiesModel : public QAbstractListModel
class CommunitiesModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(QString currentTagId READ currentTagId WRITE setCurrentTagId NOTIFY

@ -69,7 +69,7 @@ signals:
void childChanged();
private:
struct DelegateIncubator : public QQmlIncubator
struct DelegateIncubator final : public QQmlIncubator
{
DelegateIncubator(DelegateChooser &parent)
: QQmlIncubator(QQmlIncubator::AsynchronousIfNested)

@ -19,7 +19,7 @@
#include "Reaction.h"
#include "encryption/Olm.h"
class EventStore : public QObject
class EventStore final : public QObject
{
Q_OBJECT

@ -41,7 +41,7 @@ enum class MarkdownOverride
OFF,
};
class InputVideoSurface : public QAbstractVideoSurface
class InputVideoSurface final : public QAbstractVideoSurface
{
Q_OBJECT
@ -60,7 +60,7 @@ signals:
void newImage(QImage img);
};
class MediaUpload : public QObject
class MediaUpload final : public QObject
{
Q_OBJECT
Q_PROPERTY(int mediaType READ type NOTIFY mediaTypeChanged)
@ -168,7 +168,7 @@ public:
bool encrypt_;
};
class InputBar : public QObject
class InputBar final : public QObject
{
Q_OBJECT
Q_PROPERTY(bool uploading READ uploading NOTIFY uploadingChanged)

@ -11,7 +11,7 @@
class TimelineModel;
class Permissions : public QObject
class Permissions final : public QObject
{
Q_OBJECT

@ -12,7 +12,7 @@
#include <mtx/events.hpp>
#include <mtx/events/presence.hpp>
class PresenceEmitter : public QObject
class PresenceEmitter final : public QObject
{
Q_OBJECT

@ -46,7 +46,7 @@ public:
bool isInvite_ = false;
};
class RoomlistModel : public QAbstractListModel
class RoomlistModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(
@ -152,7 +152,7 @@ private:
friend class FilteredRoomlistModel;
};
class FilteredRoomlistModel : public QSortFilterProxyModel
class FilteredRoomlistModel final : public QSortFilterProxyModel
{
Q_OBJECT
Q_PROPERTY(

@ -171,7 +171,7 @@ struct DecryptionResult
class TimelineViewManager;
class TimelineModel : public QAbstractListModel
class TimelineModel final : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged)

@ -34,7 +34,7 @@ namespace mtx::responses {
struct Sync;
}
class TimelineViewManager : public QObject
class TimelineViewManager final : public QObject
{
Q_OBJECT

@ -16,7 +16,7 @@
#include "Theme.h"
#include "UserProfile.h"
class Nheko : public QObject
class Nheko final : public QObject
{
Q_OBJECT

@ -19,7 +19,7 @@
/// Convenience class which connects events emmited from threads
/// outside of main with the UI code.
class ThreadProxy : public QObject
class ThreadProxy final : public QObject
{
Q_OBJECT
@ -32,7 +32,7 @@ signals:
class RoomSettings;
class RoomSettingsAllowedRoomsModel : public QAbstractListModel
class RoomSettingsAllowedRoomsModel final : public QAbstractListModel
{
Q_OBJECT
@ -67,7 +67,7 @@ private:
RoomSettings *settings;
};
class RoomSettings : public QObject
class RoomSettings final : public QObject
{
Q_OBJECT
Q_PROPERTY(QString roomId READ roomId CONSTANT)

@ -10,7 +10,7 @@
#include <mtx/responses/public_rooms.hpp>
class RoomSummaryProxy : public QObject
class RoomSummaryProxy final : public QObject
{
Q_OBJECT
@ -21,7 +21,7 @@ signals:
void failed();
};
class RoomSummary : public QObject
class RoomSummary final : public QObject
{
Q_OBJECT

@ -8,7 +8,7 @@
#include <QColor>
#include <QPalette>
class Theme : public QPalette
class Theme final : public QPalette
{
Q_GADGET
Q_PROPERTY(QColor sidebarBackground READ sidebarBackground CONSTANT)

@ -7,7 +7,7 @@
#include <QCommonStyle>
class ThemeManager : public QCommonStyle
class ThemeManager final : public QCommonStyle
{
Q_OBJECT

@ -9,7 +9,7 @@
#include <mtxclient/http/client.hpp>
class UIA : public QObject
class UIA final : public QObject
{
Q_OBJECT

@ -32,7 +32,7 @@ Q_ENUM_NS(Status)
class DeviceVerificationFlow;
class TimelineViewManager;
class UserProfileFetchProxy : public QObject
class UserProfileFetchProxy final : public QObject
{
Q_OBJECT
@ -83,7 +83,7 @@ public:
qlonglong lastTs;
};
class DeviceInfoModel : public QAbstractListModel
class DeviceInfoModel final : public QAbstractListModel
{
Q_OBJECT
public:
@ -120,7 +120,7 @@ private:
friend class UserProfile;
};
class UserProfile : public QObject
class UserProfile final : public QObject
{
Q_OBJECT
Q_PROPERTY(QString displayName READ displayName NOTIFY displayNameChanged)

@ -13,7 +13,7 @@
typedef struct _GstDevice GstDevice;
class CallDevices : public QObject
class CallDevices final : public QObject
{
Q_OBJECT

@ -25,7 +25,7 @@ struct TurnServer;
class QUrl;
class CallManager : public QObject
class CallManager final : public QObject
{
Q_OBJECT
Q_PROPERTY(bool haveCallInvite READ haveCallInvite NOTIFY newInviteState)

@ -42,7 +42,7 @@ enum class State
Q_ENUM_NS(State)
}
class WebRTCSession : public QObject
class WebRTCSession final : public QObject
{
Q_OBJECT

Loading…
Cancel
Save