Commit 47b9cf18 authored by Linus Jahn's avatar Linus Jahn Committed by Jonah Brüchert

Use #pragma once in all of our header files

There seems to be no reason to stick to the old header guards.

I didn't change the header files from qxmpp-exts or hsluv-c since those
projects don't use #pragma once.
parent c73cf9bd
Pipeline #25317 passed with stages
in 19 minutes and 55 seconds
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AVATARFILESTORAGE_H
#define AVATARFILESTORAGE_H
#pragma once
#include <QObject>
#include <QString>
......@@ -104,5 +103,3 @@ private:
QMap<QString, QString> jidAvatarMap;
};
#endif // AVATARFILESTORAGE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BITSOFBINARYIMAGEPROVIDER_H
#define BITSOFBINARYIMAGEPROVIDER_H
#pragma once
// Qt
#include <QQuickImageProvider>
......@@ -86,5 +85,3 @@ private:
QMutex m_cacheMutex;
QVector<QXmppBitsOfBinaryData> m_cache;
};
#endif // BITSOFBINARYIMAGEPROVIDER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CLIENTWORKER_H
#define CLIENTWORKER_H
#pragma once
// Qt
#include <QObject>
......@@ -301,5 +300,3 @@ private:
QString m_passwordToBeSetOnNextConnect;
QString m_displayNameToBeSetOnNextConnect;
};
#endif // CLIENTWORKER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CREDENTIALSGENERATOR_H
#define CREDENTIALSGENERATOR_H
#pragma once
#include <QObject>
......@@ -69,5 +68,3 @@ public:
*/
Q_INVOKABLE static QString generatePassword(unsigned int length);
};
#endif // CREDENTIALSGENERATOR_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CREDENTIALSVALIDATOR_H
#define CREDENTIALSVALIDATOR_H
#pragma once
#include <QObject>
......@@ -71,5 +70,3 @@ public:
*/
Q_INVOKABLE static bool isPasswordValid(const QString &password);
};
#endif // CREDENTIALSVALIDATOR_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATAFORMMODEL_H
#define DATAFORMMODEL_H
#pragma once
#include <QAbstractListModel>
#include <QHash>
......@@ -91,5 +90,3 @@ protected:
private:
QString mediaSourceUri(const QXmppDataForm::Field &field) const;
};
#endif // DATAFORMMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DATABASE_H
#define DATABASE_H
#pragma once
#include <QObject>
#include <QSqlDatabase>
......@@ -124,5 +123,3 @@ private:
int m_transactions = 0;
};
#endif // DATABASE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DISCOVERYMANAGER_H
#define DISCOVERYMANAGER_H
#pragma once
#include <QObject>
#include <QXmppClient.h>
......@@ -67,5 +66,3 @@ private:
QXmppClient *client;
QXmppDiscoveryManager *manager;
};
#endif // DISCOVERYMANAGER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOWNLOADMANAGER_H
#define DOWNLOADMANAGER_H
#pragma once
#include <QObject>
#include <QFile>
......@@ -114,5 +113,3 @@ private:
QMap<QString, DownloadJob*> downloads;
};
#endif // DOWNLOADMANAGER_H
#ifndef EMOJIMODEL_H
#define EMOJIMODEL_H
#pragma once
#include <QAbstractListModel>
#include <QSortFilterProxyModel>
......@@ -97,5 +96,3 @@ private:
};
Q_DECLARE_METATYPE(Emoji)
#endif // EMOJIMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef KAIDAN_H
#define KAIDAN_H
#pragma once
// Qt
#include <QColor>
......@@ -473,5 +472,3 @@ private:
static Kaidan *s_instance;
};
#endif
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LOGHANDLER_H
#define LOGHANDLER_H
#pragma once
#include <QObject>
#include <QXmppLogger.h>
......@@ -67,5 +66,3 @@ private:
QXmppClient *client;
bool enabled = false;
};
#endif // LOGHANDLER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGE_H
#define MESSAGE_H
#pragma once
#include <QXmppMessage.h>
#include "Enums.h"
......@@ -141,5 +140,3 @@ private:
*/
QString m_errorText;
};
#endif // MESSAGE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGEDB_H
#define MESSAGEDB_H
#pragma once
#include "Enums.h"
#include "Message.h"
......@@ -163,5 +162,3 @@ public slots:
private:
static MessageDb *s_instance;
};
#endif // MESSAGEDB_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGEHANDLER_H
#define MESSAGEHANDLER_H
#pragma once
// Qt
#include <QObject>
......@@ -95,5 +94,3 @@ private:
MessageModel *model;
QXmppCarbonManager *carbonManager;
};
#endif // MESSAGEHANDLER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGEMODEL_H
#define MESSAGEMODEL_H
#pragma once
#include <QAbstractListModel>
#include "Message.h"
......@@ -147,5 +146,3 @@ private:
QString m_currentChatJid;
bool m_fetchedAll = false;
};
#endif // MESSAGEMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NOTIFICATIONS_H
#define NOTIFICATIONS_H
#pragma once
class QString;
......@@ -45,5 +44,3 @@ public:
*/
static void sendMessageNotification(const QString &senderJid, const QString &senderName, const QString &message);
};
#endif // NOTIFICATIONS_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PRESENCECACHE_H
#define PRESENCECACHE_H
#pragma once
#include <QObject>
#include <QMap>
......@@ -76,5 +75,3 @@ signals:
private:
QMap<QString, QMap<QString, QXmppPresence>> presences;
};
#endif // PRESENCECACHE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QMLUTILS_H
#define QMLUTILS_H
#pragma once
#include <QObject>
#include <QUrl>
......@@ -174,5 +173,3 @@ private:
*/
static QString processMsgFormatting(const QStringList &words, bool isFirst = true);
};
#endif // QMLUTILS_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QRCODEDECODER_H
#define QRCODEDECODER_H
#pragma once
#include <QObject>
......@@ -72,5 +71,3 @@ public slots:
*/
void decodeImage(const QImage &image);
};
#endif // QRCODEDECODER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QRCODEGENERATOR_H
#define QRCODEGENERATOR_H
#pragma once
#include <QObject>
......@@ -80,5 +79,3 @@ private:
*/
static void createColorTable(QImage &blackAndWhiteImage);
};
#endif // QRCODEGENERATOR_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QRCODESCANNERFILTER_H
#define QRCODESCANNERFILTER_H
#pragma once
#include <QObject>
#include <QAbstractVideoFilter>
......@@ -127,5 +126,3 @@ public:
private:
QrCodeScannerFilter *m_filter;
};
#endif // QRCODESCANNERFILTER_H
......@@ -44,8 +44,7 @@
* limitations under the License.
*/
#ifndef QRCODEVIDEOFRAME_H
#define QRCODEVIDEOFRAME_H
#pragma once
#include <QByteArray>
#include <QSize>
......@@ -100,5 +99,3 @@ private:
QSize m_size;
QVideoFrame::PixelFormat m_pixelFormat;
};
#endif // QRCODEVIDEOFRAME_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REGISTRATIONDATAFORMFILTERMODEL_H
#define REGISTRATIONDATAFORMFILTERMODEL_H
#pragma once
#include <QSortFilterProxyModel>
......@@ -50,5 +49,3 @@ public:
private:
QVector<int> m_filteredRows;
};
#endif // REGISTRATIONDATAFORMFILTERMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REGISTRATIONDATAFORMMODEL_H
#define REGISTRATIONDATAFORMMODEL_H
#pragma once
#include "DataFormModel.h"
// Qt
......@@ -80,5 +79,3 @@ private:
bool m_isFakeForm = false;
QList<QString> filteredDataFormFields;
};
#endif // REGISTRATIONDATAFORMMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef REGISTRATIONMANAGER_H
#define REGISTRATIONMANAGER_H
#pragma once
// Kaidan
class ClientWorker;
......@@ -154,5 +153,3 @@ private:
RegistrationDataFormModel *m_dataFormModel;
QVector<QXmppBitsOfBinaryContentId> m_contentIdsToRemove;
};
#endif // REGISTRATIONMANAGER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ROSTERDB_H
#define ROSTERDB_H
#pragma once
// C++
#include <functional>
......@@ -84,5 +83,3 @@ private:
static RosterDb *s_instance;
};
#endif // ROSTERDB_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ROSTERFILTERPROXYMODEL_H
#define ROSTERFILTERPROXYMODEL_H
#pragma once
#include <QSortFilterProxyModel>
......@@ -42,5 +41,3 @@ public:
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
};
#endif // ROSTERFILTERPROXYMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ROSTERITEM_H
#define ROSTERITEM_H
#pragma once
#include <QDateTime>
#include "QXmppRosterIq.h"
......@@ -95,5 +94,3 @@ private:
*/
QString m_lastMessage;
};
#endif // ROSTERITEM_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ROSTERMANAGER_H
#define ROSTERMANAGER_H
#pragma once
// Qt
#include <QObject>
......@@ -73,5 +72,3 @@ private:
QXmppRosterManager *m_manager;
QString m_currentChatJid;
};
#endif // ROSTERMANAGER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ROSTERMODEL_H
#define ROSTERMODEL_H
#pragma once
#include <QAbstractListModel>
#include <QVector>
......@@ -101,5 +100,3 @@ private:
RosterDb *rosterDb;
QVector<RosterItem> m_items;
};
#endif // ROSTERMODEL_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SERVERFEATURESCACHE_H
#define SERVERFEATURESCACHE_H
#pragma once
#include <QObject>
#include <QMutex>
......@@ -78,5 +77,3 @@ private:
bool m_inBandRegistrationSupported = false;
bool m_httpUploadSupported = false;
};
#endif // SERVERFEATURESCACHE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SERVERLISTITEM_H
#define SERVERLISTITEM_H
#pragma once
#include <QLocale>
#include <QSharedDataPointer>
......@@ -92,5 +91,3 @@ public:
private:
QSharedDataPointer<ServerListItemPrivate> d;
};
#endif // SERVERLISTITEM_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SERVERLISTMODEL_H
#define SERVERLISTMODEL_H
#pragma once
#include <QAbstractListModel>
#include <QVector>
......@@ -76,5 +75,3 @@ private:
QVector<ServerListItem> m_items;
};
#endif // SERVERLISTMODEL_H
......@@ -20,8 +20,7 @@
* SOFTWARE.
*/
#ifndef STATUSBAR_H
#define STATUSBAR_H
#pragma once
#include <QObject>
#include <QColor>
......@@ -43,5 +42,3 @@ public:
private:
QColor m_color;
};
#endif // STATUSBAR_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRANSFERCACHE_H
#define TRANSFERCACHE_H
#pragma once
#include <QObject>
#include <QMap>
......@@ -111,5 +110,3 @@ private:
mutable QMutex mutex;
};
#endif // TRANSFERCACHE_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UPLOADMANAGER_H
#define UPLOADMANAGER_H
#pragma once
// QXmpp
#include "qxmpp-exts/QXmppUploadManager.h"
......@@ -83,5 +82,3 @@ private:
QMap<int, Message*> messages;
};
#endif // UPLOADMANAGER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UTILS_H
#define UTILS_H
#pragma once
template <class Key, class T> class QMap;
class QSqlDatabase;
......@@ -116,5 +115,3 @@ public:
const QString &key,
const QVariant &val);
};
#endif // UTILS_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VCARDMANAGER_H
#define VCARDMANAGER_H
#pragma once
#include <QObject>
#include <QString>
......@@ -92,5 +91,3 @@ private:
AvatarFileStorage *avatarStorage;
QString m_nicknameToBeSetAfterFetchingCurrentVCard;
};
#endif // VCARDMANAGER_H
......@@ -28,8 +28,7 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VCARDMODEL_H
#define VCARDMODEL_H
#pragma once
#include <QAbstractListModel>
#include <QXmppVCardIq.h>
......@@ -83,5 +82,3 @@ private:
QVector<Item> m_vCard;
QString m_jid;
};
#endif // VCARDMODEL_H
......@@ -28,6 +28,8 @@
* along with Kaidan. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
// This file imports static plugin classes for static plugins
#include <QtPlugin>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment