diff --git a/src/accountlistmodel.h b/src/accountlistmodel.h index fd9e17b95..e9a88b638 100644 --- a/src/accountlistmodel.h +++ b/src/accountlistmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef ACCOUNTLISTMODEL_H -#define ACCOUNTLISTMODEL_H + +#pragma once #include "controller.h" @@ -30,5 +30,3 @@ public: private: QVector m_connections; }; - -#endif // ACCOUNTLISTMODEL_H diff --git a/src/actionshandler.h b/src/actionshandler.h index 9df180920..97b29b45a 100644 --- a/src/actionshandler.h +++ b/src/actionshandler.h @@ -2,6 +2,8 @@ // // SPDX-License-Identifier: GPl-3.0-or-later +#pragma once + #include #include "connection.h" diff --git a/src/clipboard.h b/src/clipboard.h index d0ff2a0a2..f27d9507e 100644 --- a/src/clipboard.h +++ b/src/clipboard.h @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: GPL-3.0-only */ + #pragma once #include diff --git a/src/controller.h b/src/controller.h index 9b0ca0dae..a20b764ca 100644 --- a/src/controller.h +++ b/src/controller.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef CONTROLLER_H -#define CONTROLLER_H + +#pragma once #include #include @@ -131,5 +131,3 @@ class NeochatDeleteDeviceJob : public BaseJob public: explicit NeochatDeleteDeviceJob(const QString &deviceId, const Omittable &auth = none); }; - -#endif // CONTROLLER_H diff --git a/src/emojimodel.h b/src/emojimodel.h index 3cdcf6007..8f8437356 100644 --- a/src/emojimodel.h +++ b/src/emojimodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef EMOJIMODEL_H -#define EMOJIMODEL_H + +#pragma once #include #include @@ -86,5 +86,3 @@ private: QSettings m_settings; }; - -#endif // EMOJIMODEL_H diff --git a/src/filetypesingleton.h b/src/filetypesingleton.h index 0d98b8f15..ca1010c88 100644 --- a/src/filetypesingleton.h +++ b/src/filetypesingleton.h @@ -4,8 +4,7 @@ * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL */ -#ifndef FILETYPESINGLETON_H -#define FILETYPESINGLETON_H +#pragma once #include #include @@ -59,5 +58,3 @@ private: }; QML_DECLARE_TYPE(FileTypeSingleton) - -#endif // MIMETYPESINGLETON_H diff --git a/src/matriximageprovider.h b/src/matriximageprovider.h index f0c461c02..9db6012c0 100644 --- a/src/matriximageprovider.h +++ b/src/matriximageprovider.h @@ -4,8 +4,7 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef MatrixImageProvider_H -#define MatrixImageProvider_H + #pragma once #include @@ -53,5 +52,3 @@ class MatrixImageProvider : public QQuickAsyncImageProvider public: QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; }; - -#endif // MatrixImageProvider_H diff --git a/src/messageeventmodel.h b/src/messageeventmodel.h index 776640f9d..e1db33d4c 100644 --- a/src/messageeventmodel.h +++ b/src/messageeventmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef MESSAGEEVENTMODEL_H -#define MESSAGEEVENTMODEL_H + +#pragma once #include @@ -90,5 +90,3 @@ private: Q_SIGNALS: void roomChanged(); }; - -#endif // MESSAGEEVENTMODEL_H diff --git a/src/messagefiltermodel.h b/src/messagefiltermodel.h index 157e1a3fc..1120f42e9 100644 --- a/src/messagefiltermodel.h +++ b/src/messagefiltermodel.h @@ -2,6 +2,7 @@ * SPDX-FileCopyrightText: 2021 Nicolas Fella * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL */ + #pragma once #include diff --git a/src/neochatroom.h b/src/neochatroom.h index 06b09e865..b1a9372db 100644 --- a/src/neochatroom.h +++ b/src/neochatroom.h @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: GPL-3.0-only */ + #pragma once #include diff --git a/src/neochatuser.h b/src/neochatuser.h index d203abab8..66be84606 100644 --- a/src/neochatuser.h +++ b/src/neochatuser.h @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: GPL-3.0-only */ + #pragma once #include diff --git a/src/notificationsmanager.h b/src/notificationsmanager.h index d734fe11a..3aba6ebe9 100644 --- a/src/notificationsmanager.h +++ b/src/notificationsmanager.h @@ -3,6 +3,7 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ + #pragma once #include diff --git a/src/publicroomlistmodel.h b/src/publicroomlistmodel.h index c54f32bfe..b6a88303a 100644 --- a/src/publicroomlistmodel.h +++ b/src/publicroomlistmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef PUBLICROOMLISTMODEL_H -#define PUBLICROOMLISTMODEL_H + +#pragma once #include #include @@ -83,5 +83,3 @@ Q_SIGNALS: void keywordChanged(); void hasMoreChanged(); }; - -#endif // PUBLICROOMLISTMODEL_H diff --git a/src/roomlistmodel.h b/src/roomlistmodel.h index 2d0525436..a4b324456 100644 --- a/src/roomlistmodel.h +++ b/src/roomlistmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef ROOMLISTMODEL_H -#define ROOMLISTMODEL_H + +#pragma once #include "connection.h" #include "events/roomevent.h" @@ -107,5 +107,3 @@ Q_SIGNALS: void newMessage(const QString &_t1, const QString &_t2, const QString &_t3, const QString &_t4, const QString &_t5, const QImage &_t6); void newHighlight(const QString &_t1, const QString &_t2, const QString &_t3, const QString &_t4, const QString &_t5, const QImage &_t6); }; - -#endif // ROOMLISTMODEL_H diff --git a/src/trayicon.h b/src/trayicon.h index 857cdadc6..ce2b3d68d 100644 --- a/src/trayicon.h +++ b/src/trayicon.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef TRAYICON_H -#define TRAYICON_H + +#pragma once // Modified from mujx/nheko's TrayIcon. @@ -24,5 +24,3 @@ public: Q_SIGNALS: void showWindow(); }; - -#endif // TRAYICON_H diff --git a/src/userdirectorylistmodel.h b/src/userdirectorylistmodel.h index 9c5583a20..7a51b99ce 100644 --- a/src/userdirectorylistmodel.h +++ b/src/userdirectorylistmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef USERDIRECTORYLISTMODEL_H -#define USERDIRECTORYLISTMODEL_H + +#pragma once #include #include @@ -71,5 +71,3 @@ Q_SIGNALS: void keywordChanged(); void limitedChanged(); }; - -#endif // USERDIRECTORYLISTMODEL_H diff --git a/src/userlistmodel.h b/src/userlistmodel.h index a713b995a..65dc91138 100644 --- a/src/userlistmodel.h +++ b/src/userlistmodel.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef USERLISTMODEL_H -#define USERLISTMODEL_H + +#pragma once #include "room.h" @@ -76,5 +76,3 @@ private: int findUserPos(Quotient::User *user) const; [[nodiscard]] int findUserPos(const QString &username) const; }; - -#endif // USERLISTMODEL_H diff --git a/src/utils.h b/src/utils.h index 6e4c4a250..984c1a0a7 100644 --- a/src/utils.h +++ b/src/utils.h @@ -3,8 +3,8 @@ * * SPDX-License-Identifier: GPL-3.0-only */ -#ifndef Utils_H -#define Utils_H + +#pragma once #include "room.h" #include "user.h" @@ -26,5 +26,3 @@ static const QRegularExpression codePillRegExp{"
]*>(.*?)(.*?)", QRegularExpression::DotMatchesEverythingOption};
 static const QRegularExpression strikethroughRegExp{"(.*?)", QRegularExpression::DotMatchesEverythingOption};
 } // namespace utils
-
-#endif