Consistently use pragma once in all headers

This commit is contained in:
Tobias Fella
2021-02-04 23:14:54 +01:00
parent 546d17b1a2
commit 1cb6b3bbd6
18 changed files with 29 additions and 48 deletions

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef ACCOUNTLISTMODEL_H
#define ACCOUNTLISTMODEL_H #pragma once
#include "controller.h" #include "controller.h"
@@ -30,5 +30,3 @@ public:
private: private:
QVector<Connection *> m_connections; QVector<Connection *> m_connections;
}; };
#endif // ACCOUNTLISTMODEL_H

View File

@@ -2,6 +2,8 @@
// //
// SPDX-License-Identifier: GPl-3.0-or-later // SPDX-License-Identifier: GPl-3.0-or-later
#pragma once
#include <QObject> #include <QObject>
#include "connection.h" #include "connection.h"

View File

@@ -3,6 +3,7 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#pragma once #pragma once
#include <QObject> #include <QObject>

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef CONTROLLER_H
#define CONTROLLER_H #pragma once
#include <QApplication> #include <QApplication>
#include <QMediaPlayer> #include <QMediaPlayer>
@@ -131,5 +131,3 @@ class NeochatDeleteDeviceJob : public BaseJob
public: public:
explicit NeochatDeleteDeviceJob(const QString &deviceId, const Omittable<QJsonObject> &auth = none); explicit NeochatDeleteDeviceJob(const QString &deviceId, const Omittable<QJsonObject> &auth = none);
}; };
#endif // CONTROLLER_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef EMOJIMODEL_H
#define EMOJIMODEL_H #pragma once
#include <QObject> #include <QObject>
#include <QSettings> #include <QSettings>
@@ -86,5 +86,3 @@ private:
QSettings m_settings; QSettings m_settings;
}; };
#endif // EMOJIMODEL_H

View File

@@ -4,8 +4,7 @@
* SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL * SPDX-License-Identifier: LicenseRef-KDE-Accepted-LGPL
*/ */
#ifndef FILETYPESINGLETON_H #pragma once
#define FILETYPESINGLETON_H
#include <QObject> #include <QObject>
#include <qqml.h> #include <qqml.h>
@@ -59,5 +58,3 @@ private:
}; };
QML_DECLARE_TYPE(FileTypeSingleton) QML_DECLARE_TYPE(FileTypeSingleton)
#endif // MIMETYPESINGLETON_H

View File

@@ -4,8 +4,7 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef MatrixImageProvider_H
#define MatrixImageProvider_H
#pragma once #pragma once
#include <QQuickAsyncImageProvider> #include <QQuickAsyncImageProvider>
@@ -53,5 +52,3 @@ class MatrixImageProvider : public QQuickAsyncImageProvider
public: public:
QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override;
}; };
#endif // MatrixImageProvider_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef MESSAGEEVENTMODEL_H
#define MESSAGEEVENTMODEL_H #pragma once
#include <QAbstractListModel> #include <QAbstractListModel>
@@ -90,5 +90,3 @@ private:
Q_SIGNALS: Q_SIGNALS:
void roomChanged(); void roomChanged();
}; };
#endif // MESSAGEEVENTMODEL_H

View File

@@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de> * SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/ */
#pragma once #pragma once
#include <QSortFilterProxyModel> #include <QSortFilterProxyModel>

View File

@@ -3,6 +3,7 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#pragma once #pragma once
#include <events/encryptionevent.h> #include <events/encryptionevent.h>

View File

@@ -3,6 +3,7 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#pragma once #pragma once
#include <QObject> #include <QObject>

View File

@@ -3,6 +3,7 @@
* *
* SPDX-License-Identifier: GPL-2.0-or-later * SPDX-License-Identifier: GPL-2.0-or-later
*/ */
#pragma once #pragma once
#include <QImage> #include <QImage>

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef PUBLICROOMLISTMODEL_H
#define PUBLICROOMLISTMODEL_H #pragma once
#include <QAbstractListModel> #include <QAbstractListModel>
#include <QObject> #include <QObject>
@@ -83,5 +83,3 @@ Q_SIGNALS:
void keywordChanged(); void keywordChanged();
void hasMoreChanged(); void hasMoreChanged();
}; };
#endif // PUBLICROOMLISTMODEL_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef ROOMLISTMODEL_H
#define ROOMLISTMODEL_H #pragma once
#include "connection.h" #include "connection.h"
#include "events/roomevent.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 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); void newHighlight(const QString &_t1, const QString &_t2, const QString &_t3, const QString &_t4, const QString &_t5, const QImage &_t6);
}; };
#endif // ROOMLISTMODEL_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef TRAYICON_H
#define TRAYICON_H #pragma once
// Modified from mujx/nheko's TrayIcon. // Modified from mujx/nheko's TrayIcon.
@@ -24,5 +24,3 @@ public:
Q_SIGNALS: Q_SIGNALS:
void showWindow(); void showWindow();
}; };
#endif // TRAYICON_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef USERDIRECTORYLISTMODEL_H
#define USERDIRECTORYLISTMODEL_H #pragma once
#include <QAbstractListModel> #include <QAbstractListModel>
#include <QObject> #include <QObject>
@@ -71,5 +71,3 @@ Q_SIGNALS:
void keywordChanged(); void keywordChanged();
void limitedChanged(); void limitedChanged();
}; };
#endif // USERDIRECTORYLISTMODEL_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef USERLISTMODEL_H
#define USERLISTMODEL_H #pragma once
#include "room.h" #include "room.h"
@@ -76,5 +76,3 @@ private:
int findUserPos(Quotient::User *user) const; int findUserPos(Quotient::User *user) const;
[[nodiscard]] int findUserPos(const QString &username) const; [[nodiscard]] int findUserPos(const QString &username) const;
}; };
#endif // USERLISTMODEL_H

View File

@@ -3,8 +3,8 @@
* *
* SPDX-License-Identifier: GPL-3.0-only * SPDX-License-Identifier: GPL-3.0-only
*/ */
#ifndef Utils_H
#define Utils_H #pragma once
#include "room.h" #include "room.h"
#include "user.h" #include "user.h"
@@ -26,5 +26,3 @@ static const QRegularExpression codePillRegExp{"<pre><code[^>]*>(.*?)</code></pr
static const QRegularExpression userPillRegExp{"<a href=\"https://matrix.to/#/@.*?:.*?\">(.*?)</a>", QRegularExpression::DotMatchesEverythingOption}; static const QRegularExpression userPillRegExp{"<a href=\"https://matrix.to/#/@.*?:.*?\">(.*?)</a>", QRegularExpression::DotMatchesEverythingOption};
static const QRegularExpression strikethroughRegExp{"<del>(.*?)</del>", QRegularExpression::DotMatchesEverythingOption}; static const QRegularExpression strikethroughRegExp{"<del>(.*?)</del>", QRegularExpression::DotMatchesEverythingOption};
} // namespace utils } // namespace utils
#endif