Browse Source

refactor(style): use #pragma once rather than include guards

reviewable/pr6131/r2
Anthony Bilinski 5 years ago
parent
commit
8abd4e47e9
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C
  1. 5
      doc/coding_standards.md
  2. 5
      src/audio/audio.h
  3. 5
      src/audio/backend/alsink.h
  4. 5
      src/audio/backend/alsource.h
  5. 5
      src/audio/backend/openal.h
  6. 6
      src/audio/iaudiocontrol.h
  7. 5
      src/audio/iaudiosettings.h
  8. 5
      src/audio/iaudiosink.h
  9. 5
      src/audio/iaudiosource.h
  10. 5
      src/chatlog/chatline.h
  11. 5
      src/chatlog/chatlinecontent.h
  12. 5
      src/chatlog/chatlinecontentproxy.h
  13. 5
      src/chatlog/chatlog.h
  14. 5
      src/chatlog/chatmessage.h
  15. 5
      src/chatlog/content/broken.h
  16. 5
      src/chatlog/content/filetransferwidget.h
  17. 5
      src/chatlog/content/image.h
  18. 5
      src/chatlog/content/notificationicon.h
  19. 5
      src/chatlog/content/spinner.h
  20. 5
      src/chatlog/content/text.h
  21. 5
      src/chatlog/content/timestamp.h
  22. 5
      src/chatlog/customtextdocument.h
  23. 5
      src/chatlog/documentcache.h
  24. 5
      src/chatlog/pixmapcache.h
  25. 5
      src/chatlog/textformatter.h
  26. 6
      src/chatlog/toxfileprogress.h
  27. 5
      src/core/contactid.h
  28. 5
      src/core/core.h
  29. 5
      src/core/coreav.h
  30. 5
      src/core/corefile.h
  31. 5
      src/core/dhtserver.h
  32. 5
      src/core/groupid.h
  33. 6
      src/core/icorefriendmessagesender.h
  34. 5
      src/core/icoregroupmessagesender.h
  35. 5
      src/core/icoregroupquery.h
  36. 6
      src/core/icoreidhandler.h
  37. 5
      src/core/icoresettings.h
  38. 5
      src/core/receiptnum.h
  39. 5
      src/core/toxcall.h
  40. 5
      src/core/toxencrypt.h
  41. 5
      src/core/toxfile.h
  42. 5
      src/core/toxfilepause.h
  43. 5
      src/core/toxid.h
  44. 5
      src/core/toxlogger.h
  45. 5
      src/core/toxoptions.h
  46. 5
      src/core/toxpk.h
  47. 4
      src/core/toxstring.h
  48. 5
      src/friendlist.h
  49. 5
      src/grouplist.h
  50. 5
      src/ipc.h
  51. 5
      src/model/about/aboutfriend.h
  52. 5
      src/model/about/iaboutfriend.h
  53. 5
      src/model/chathistory.h
  54. 5
      src/model/chatlogitem.h
  55. 5
      src/model/chatroom/chatroom.h
  56. 5
      src/model/chatroom/friendchatroom.h
  57. 5
      src/model/chatroom/groupchatroom.h
  58. 5
      src/model/contact.h
  59. 5
      src/model/dialogs/idialogs.h
  60. 5
      src/model/dialogs/idialogsmanager.h
  61. 5
      src/model/friend.h
  62. 6
      src/model/friendmessagedispatcher.h
  63. 5
      src/model/group.h
  64. 5
      src/model/groupinvite.h
  65. 6
      src/model/groupmessagedispatcher.h
  66. 5
      src/model/ichatlog.h
  67. 5
      src/model/imessagedispatcher.h
  68. 5
      src/model/interface.h
  69. 5
      src/model/message.h
  70. 2
      src/model/profile/iprofileinfo.h
  71. 2
      src/model/profile/profileinfo.h
  72. 5
      src/model/sessionchatlog.h
  73. 5
      src/model/status.h
  74. 5
      src/model/toxclientstandards.h
  75. 5
      src/net/avatarbroadcaster.h
  76. 24
      src/net/bootstrapnodeupdater.h
  77. 5
      src/net/toxuri.h
  78. 3
      src/net/updatecheck.h
  79. 5
      src/nexus.h
  80. 5
      src/persistence/db/rawdatabase.h
  81. 5
      src/persistence/history.h
  82. 4
      src/persistence/ifriendsettings.h
  83. 5
      src/persistence/igroupsettings.h
  84. 5
      src/persistence/offlinemsgengine.h
  85. 5
      src/persistence/paths.h
  86. 5
      src/persistence/profile.h
  87. 5
      src/persistence/profilelocker.h
  88. 5
      src/persistence/serialize.h
  89. 5
      src/persistence/settings.h
  90. 5
      src/persistence/settingsserializer.h
  91. 5
      src/persistence/smileypack.h
  92. 5
      src/persistence/toxsave.h
  93. 7
      src/platform/autorun.h
  94. 5
      src/platform/camera/avfoundation.h
  95. 5
      src/platform/camera/directshow.h
  96. 5
      src/platform/camera/v4l2.h
  97. 7
      src/platform/capslock.h
  98. 5
      src/platform/desktop_notifications/desktopnotify.h
  99. 5
      src/platform/install_osx.h
  100. 5
      src/platform/posixsignalnotifier.h
  101. Some files were not shown because too many files have changed in this diff Show More

5
doc/coding_standards.md

@ -316,7 +316,7 @@ foo& g(); @@ -316,7 +316,7 @@ foo& g();
void f()
{
foo::bar(); // OK: no object necessary
foo::bar(); // OK: no object necessary
g().bar(); // Not OK: g() can cause side effects
}
```
@ -378,6 +378,8 @@ Newlines can be present between includes to indicate logical grouping, however @@ -378,6 +378,8 @@ Newlines can be present between includes to indicate logical grouping, however
be wary that clang-format does not sort includes properly this way, electing to
sort each group individually according to the criteria defined above.
Use `#pragma once` rather than include guards in header files. It reduces duplication and avoids a potential cause of bugs.
The following example demonstrates the above include rules:
```c++
@ -572,4 +574,3 @@ For more info, see: @@ -572,4 +574,3 @@ For more info, see:
[String concatenation with QStringBuilder]: https://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/
[Latin-1]: https://en.wikipedia.org/wiki/ISO/IEC_8859-1
[CppCoreGuidelines]: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#main

5
src/audio/audio.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef AUDIO_H
#define AUDIO_H
#pragma once
#include <memory>
@ -30,5 +29,3 @@ class Audio @@ -30,5 +29,3 @@ class Audio
public:
static std::unique_ptr<IAudioControl> makeAudio(IAudioSettings& settings);
};
#endif // AUDIO_H

5
src/audio/backend/alsink.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ALSINK_H
#define ALSINK_H
#pragma once
#include <QMutex>
#include <QObject>
@ -58,5 +57,3 @@ private: @@ -58,5 +57,3 @@ private:
bool killed = false;
mutable QMutex killLock;
};
#endif // ALSINK_H

5
src/audio/backend/alsource.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ALSOURCE_H
#define ALSOURCE_H
#pragma once
#include "src/audio/iaudiosource.h"
#include <QMutex>
@ -45,5 +44,3 @@ private: @@ -45,5 +44,3 @@ private:
bool killed = false;
mutable QMutex killLock;
};
#endif // ALSOURCE_H

5
src/audio/backend/openal.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef OPENAL_H
#define OPENAL_H
#pragma once
#include "src/audio/iaudiocontrol.h"
#include "src/audio/backend/alsink.h"
@ -164,5 +163,3 @@ protected: @@ -164,5 +163,3 @@ protected:
const qreal maxInThreshold = 0.4;
int16_t* inputBuffer = nullptr;
};
#endif // OPENAL_H

6
src/audio/iaudiocontrol.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IAUDIOCONTROL_H
#define IAUDIOCONTROL_H
#pragma once
#include <QObject>
#include <QStringList>
@ -146,6 +145,3 @@ protected: @@ -146,6 +145,3 @@ protected:
AUDIO_FRAME_DURATION * AUDIO_SAMPLE_RATE / 1000;
uint32_t AUDIO_FRAME_SAMPLE_COUNT_TOTAL = 0;
};
#endif // IAUDIOCONTROL_H

5
src/audio/iaudiosettings.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_AUDIO_SETTINGS_H
#define I_AUDIO_SETTINGS_H
#pragma once
#include "src/model/interface.h"
@ -69,5 +68,3 @@ public: @@ -69,5 +68,3 @@ public:
DECLARE_SIGNAL(audioBitrateChanged, int bitrate);
DECLARE_SIGNAL(enableTestSoundChanged, bool newValue);
};
#endif // I_AUDIO_SETTINGS_H

5
src/audio/iaudiosink.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IAUDIOSINK_H
#define IAUDIOSINK_H
#pragma once
#include <cassert>
@ -110,5 +109,3 @@ signals: @@ -110,5 +109,3 @@ signals:
DECLARE_SIGNAL(finishedPlaying);
DECLARE_SIGNAL(invalidated);
};
#endif // IAUDIOSINK_H

5
src/audio/iaudiosource.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IAUDIOSOURCE_H
#define IAUDIOSOURCE_H
#pragma once
#include <QObject>
@ -44,5 +43,3 @@ signals: @@ -44,5 +43,3 @@ signals:
void volumeAvailable(float value);
void invalidated();
};
#endif // IAUDIOSOURCE_H

5
src/chatlog/chatline.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATLINE_H
#define CHATLINE_H
#pragma once
#include <QPointF>
#include <QRectF>
@ -116,5 +115,3 @@ private: @@ -116,5 +115,3 @@ private:
QRectF bbox;
bool isVisible = false;
};
#endif // CHATLINE_H

5
src/chatlog/chatlinecontent.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATLINECONTENT_H
#define CHATLINECONTENT_H
#pragma once
#include <QGraphicsItem>
@ -69,5 +68,3 @@ private: @@ -69,5 +68,3 @@ private:
int row = -1;
int col = -1;
};
#endif // CHATLINECONTENT_H

5
src/chatlog/chatlinecontentproxy.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATLINECONTENTPROXY_H
#define CHATLINECONTENTPROXY_H
#pragma once
#include "chatlinecontent.h"
#include <QGraphicsProxyWidget>
@ -58,5 +57,3 @@ private: @@ -58,5 +57,3 @@ private:
int widthMin;
const ChatLineContentProxyType widgetType;
};
#endif // CHATLINECONTENTPROXY_H

5
src/chatlog/chatlog.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATLOG_H
#define CHATLOG_H
#pragma once
#include <QDateTime>
#include <QGraphicsView>
@ -189,5 +188,3 @@ private: @@ -189,5 +188,3 @@ private:
int numRemove{0};
const int maxMessages{300};
};
#endif // CHATLOG_H

5
src/chatlog/chatmessage.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHATMESSAGE_H
#define CHATMESSAGE_H
#pragma once
#include "chatline.h"
#include "src/core/toxfile.h"
@ -73,5 +72,3 @@ protected: @@ -73,5 +72,3 @@ protected:
private:
bool action = false;
};
#endif // CHATMESSAGE_H

5
src/chatlog/content/broken.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BROKEN_H
#define BROKEN_H
#pragma once
#include "../chatlinecontent.h"
@ -41,5 +40,3 @@ private: @@ -41,5 +40,3 @@ private:
QPixmap pmap;
QSize size;
};
#endif // BROKEN_H

5
src/chatlog/content/filetransferwidget.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FILETRANSFERWIDGET_H
#define FILETRANSFERWIDGET_H
#pragma once
#include <QTime>
#include <QWidget>
@ -109,5 +108,3 @@ private: @@ -109,5 +108,3 @@ private:
LeftBottom = 8
};
};
#endif // FILETRANSFERWIDGET_H

5
src/chatlog/content/image.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMAGE_H
#define IMAGE_H
#pragma once
#include "../chatlinecontent.h"
@ -39,5 +38,3 @@ private: @@ -39,5 +38,3 @@ private:
QSize size;
QPixmap pmap;
};
#endif // IMAGE_H

5
src/chatlog/content/notificationicon.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NOTIFICATIONICON_H
#define NOTIFICATIONICON_H
#pragma once
#include "../chatlinecontent.h"
@ -51,5 +50,3 @@ private: @@ -51,5 +50,3 @@ private:
qreal dotWidth = 0.2;
qreal alpha = 0.0;
};
#endif // NOTIFICATIONICON_H

5
src/chatlog/content/spinner.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SPINNER_H
#define SPINNER_H
#pragma once
#include "../chatlinecontent.h"
@ -52,5 +51,3 @@ private: @@ -52,5 +51,3 @@ private:
qreal alpha = 0.0;
QVariantAnimation* blendAnimation;
};
#endif // SPINNER_H

5
src/chatlog/content/text.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TEXT_H
#define TEXT_H
#pragma once
#include "../chatlinecontent.h"
#include "src/widget/style.h"
@ -115,5 +114,3 @@ private: @@ -115,5 +114,3 @@ private:
QTextCursor selectCursor;
std::pair<int, int> selectPoint{0, 0};
};
#endif // TEXT_H

5
src/chatlog/content/timestamp.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TIMESTAMP_H
#define TIMESTAMP_H
#pragma once
#include "text.h"
#include <QDateTime>
@ -39,5 +38,3 @@ protected: @@ -39,5 +38,3 @@ protected:
private:
QDateTime time;
};
#endif // TIMESTAMP_H

5
src/chatlog/customtextdocument.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CUSTOMTEXTDOCUMENT_H
#define CUSTOMTEXTDOCUMENT_H
#pragma once
#include <QTextDocument>
#include <QList>
@ -39,5 +38,3 @@ protected: @@ -39,5 +38,3 @@ protected:
private:
QList<std::shared_ptr<QIcon>> emoticonIcons;
};
#endif // CUSTOMTEXTDOCUMENT_H

5
src/chatlog/documentcache.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOCUMENTCACHE_H
#define DOCUMENTCACHE_H
#pragma once
#include <QStack>
@ -41,5 +40,3 @@ private: @@ -41,5 +40,3 @@ private:
private:
QStack<QTextDocument*> documents;
};
#endif // DOCUMENTCACHE_H

5
src/chatlog/pixmapcache.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICONCACHE_H
#define ICONCACHE_H
#pragma once
#include <QHash>
#include <QIcon>
@ -40,5 +39,3 @@ protected: @@ -40,5 +39,3 @@ protected:
private:
QHash<QString, QIcon> cache;
};
#endif // ICONCACHE_H

5
src/chatlog/textformatter.h

@ -17,13 +17,10 @@ @@ -17,13 +17,10 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TEXTFORMATTER_H
#define TEXTFORMATTER_H
#pragma once
#include <QString>
QString highlightURI(const QString& message);
QString applyMarkdown(const QString& message, bool showFormattingSymbols);
#endif // TEXTFORMATTER_H

6
src/chatlog/toxfileprogress.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXFILEPROGRESS_H
#define TOXFILEPROGRESS_H
#pragma once
#include <QTime>
@ -48,6 +47,3 @@ private: @@ -48,6 +47,3 @@ private:
double timeLeftSeconds;
double progress;
};
#endif // TOXFILEPROGRESS_H

5
src/core/contactid.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONTACTID_H
#define CONTACTID_H
#pragma once
#include <QByteArray>
#include <QString>
@ -53,5 +52,3 @@ inline uint qHash(const ContactId& id) @@ -53,5 +52,3 @@ inline uint qHash(const ContactId& id)
}
using ContactIdPtr = std::shared_ptr<const ContactId>;
#endif // CONTACTID_H

5
src/core/core.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CORE_HPP
#define CORE_HPP
#pragma once
#include "groupid.h"
#include "icorefriendmessagesender.h"
@ -253,5 +252,3 @@ private: @@ -253,5 +252,3 @@ private:
std::unique_ptr<QThread> coreThread;
};
#endif // CORE_HPP

5
src/core/coreav.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef COREAV_H
#define COREAV_H
#pragma once
#include "src/core/toxcall.h"
#include <QObject>
@ -158,5 +157,3 @@ private: @@ -158,5 +157,3 @@ private:
*/
QMutex& coreLock;
};
#endif // COREAV_H

5
src/core/corefile.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef COREFILE_H
#define COREFILE_H
#pragma once
#include <tox/tox.h>
@ -109,5 +108,3 @@ private: @@ -109,5 +108,3 @@ private:
Tox* tox;
QMutex* coreLoopLock = nullptr;
};
#endif // COREFILE_H

5
src/core/dhtserver.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DHT_SERVER_H
#define DHT_SERVER_H
#pragma once
#include <QString>
@ -32,5 +31,3 @@ struct DhtServer @@ -32,5 +31,3 @@ struct DhtServer
bool operator==(const DhtServer& other) const;
bool operator!=(const DhtServer& other) const;
};
#endif // DHT_SERVER_H

5
src/core/groupid.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUPID_H
#define GROUPID_H
#pragma once
#include "src/core/contactid.h"
#include <QByteArray>
@ -33,5 +32,3 @@ public: @@ -33,5 +32,3 @@ public:
explicit GroupId(const uint8_t* rawId);
int getSize() const override;
};
#endif // GROUPID_H

6
src/core/icorefriendmessagesender.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICORE_FRIEND_MESSAGE_SENDER_H
#define ICORE_FRIEND_MESSAGE_SENDER_H
#pragma once
#include "receiptnum.h"
@ -32,6 +31,3 @@ public: @@ -32,6 +31,3 @@ public:
virtual bool sendAction(uint32_t friendId, const QString& action, ReceiptNum& receipt) = 0;
virtual bool sendMessage(uint32_t friendId, const QString& message, ReceiptNum& receipt) = 0;
};
#endif /* ICORE_FRIEND_MESSAGE_SENDER_H */

5
src/core/icoregroupmessagesender.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICORE_GROUP_MESSAGE_SENDER_H
#define ICORE_GROUP_MESSAGE_SENDER_H
#pragma once
#include <QString>
@ -29,5 +28,3 @@ public: @@ -29,5 +28,3 @@ public:
virtual void sendGroupAction(int groupId, const QString& message) = 0;
virtual void sendGroupMessage(int groupId, const QString& message) = 0;
};
#endif /*ICORE_GROUP_MESSAGE_SENDER_H*/

5
src/core/icoregroupquery.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICORE_GROUP_QUERY_H
#define ICORE_GROUP_QUERY_H
#pragma once
#include "groupid.h"
#include "toxpk.h"
@ -40,5 +39,3 @@ public: @@ -40,5 +39,3 @@ public:
virtual QStringList getGroupPeerNames(int groupId) const = 0;
virtual bool getGroupAvEnabled(int groupId) const = 0;
};
#endif /*ICORE_GROUP_QUERY_H*/

6
src/core/icoreidhandler.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICORE_ID_HANDLER_H
#define ICORE_ID_HANDLER_H
#pragma once
#include "toxid.h"
#include "toxpk.h"
@ -32,6 +31,3 @@ public: @@ -32,6 +31,3 @@ public:
virtual ToxPk getSelfPublicKey() const = 0;
virtual QString getUsername() const = 0;
};
#endif /*ICORE_ID_HANDLER_H*/

5
src/core/icoresettings.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_CORE_SETTINGS_H
#define I_CORE_SETTINGS_H
#pragma once
#include "src/model/interface.h"
@ -64,5 +63,3 @@ public: @@ -64,5 +63,3 @@ public:
DECLARE_SIGNAL(proxyAddressChanged, const QString& address);
DECLARE_SIGNAL(proxyPortChanged, quint16 port);
};
#endif // I_CORE_SETTINGS_H

5
src/core/receiptnum.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RECEIPT_NUM_H
#define RECEIPT_NUM_H
#pragma once
#include "src/util/strongtype.h"
@ -27,5 +26,3 @@ @@ -27,5 +26,3 @@
using ReceiptNum = NamedType<uint32_t, struct ReceiptNumTag, Orderable>;
Q_DECLARE_METATYPE(ReceiptNum)
#endif /* RECEIPT_NUM_H */

5
src/core/toxcall.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXCALL_H
#define TOXCALL_H
#pragma once
#include "src/audio/iaudiocontrol.h"
#include "src/audio/iaudiosink.h"
@ -141,5 +140,3 @@ private slots: @@ -141,5 +140,3 @@ private slots:
void onAudioSourceInvalidated();
void onAudioSinkInvalidated(ToxPk peerId);
};
#endif // TOXCALL_H

5
src/core/toxencrypt.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXENCRYPT_H
#define TOXENCRYPT_H
#pragma once
#include <QByteArray>
#include <QString>
@ -51,5 +50,3 @@ private: @@ -51,5 +50,3 @@ private:
private:
Tox_Pass_Key* passKey = nullptr;
};
#endif // TOXENCRYPT_H

5
src/core/toxfile.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CORESTRUCTS_H
#define CORESTRUCTS_H
#pragma once
#include "src/core/toxfilepause.h"
@ -76,5 +75,3 @@ struct ToxFile @@ -76,5 +75,3 @@ struct ToxFile
std::shared_ptr<QCryptographicHash> hashGenerator = std::make_shared<QCryptographicHash>(QCryptographicHash::Sha256);
ToxFilePause pauseStatus;
};
#endif // CORESTRUCTS_H

5
src/core/toxfilepause.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOX_FILE_PAUSE_H
#define TOX_FILE_PAUSE_H
#pragma once
class ToxFilePause
{
@ -72,5 +71,3 @@ private: @@ -72,5 +71,3 @@ private:
bool localPauseState = false;
bool remotePauseState = false;
};
#endif // TOX_FILE_PAUSE_H

5
src/core/toxid.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef TOXID_H
#define TOXID_H
#pragma once
#include "toxpk.h"
@ -60,5 +59,3 @@ public: @@ -60,5 +59,3 @@ public:
private:
QByteArray toxId;
};
#endif // TOXID_H

5
src/core/toxlogger.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXLOGGER_H
#define TOXLOGGER_H
#pragma once
#include <tox/tox.h>
@ -28,5 +27,3 @@ namespace ToxLogger { @@ -28,5 +27,3 @@ namespace ToxLogger {
void onLogMessage(Tox *tox, Tox_Log_Level level, const char *file, uint32_t line,
const char *func, const char *message, void *user_data);
}
#endif // TOXLOGGER_H

5
src/core/toxoptions.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXOPTIONS_H
#define TOXOPTIONS_H
#pragma once
#include <QByteArray>
@ -46,5 +45,3 @@ private: @@ -46,5 +45,3 @@ private:
Tox_Options* options = nullptr;
QByteArray proxyAddrData;
};
#endif // TOXOPTIONS_H

5
src/core/toxpk.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXPK_H
#define TOXPK_H
#pragma once
#include "src/core/contactid.h"
#include <QByteArray>
@ -33,5 +32,3 @@ public: @@ -33,5 +32,3 @@ public:
explicit ToxPk(const uint8_t* rawId);
int getSize() const override;
};
#endif // TOXPK_H

4
src/core/toxstring.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXSTRING_H
#define TOXSTRING_H
#pragma once
#include <QByteArray>
#include <QString>
@ -40,4 +39,3 @@ public: @@ -40,4 +39,3 @@ public:
private:
QByteArray string;
};
#endif // TOXSTRING_H

5
src/friendlist.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FRIENDLIST_H
#define FRIENDLIST_H
#pragma once
#include <cstdint>
@ -46,5 +45,3 @@ private: @@ -46,5 +45,3 @@ private:
static QHash<ToxPk, Friend*> friendList;
static QHash<uint32_t, ToxPk> id2key;
};
#endif // FRIENDLIST_H

5
src/grouplist.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUPLIST_H
#define GROUPLIST_H
#pragma once
#include "src/core/groupid.h"
@ -43,5 +42,3 @@ private: @@ -43,5 +42,3 @@ private:
static QHash<const GroupId, Group*> groupList;
static QHash<uint32_t, GroupId> id2key;
};
#endif // GROUPLIST_H

5
src/ipc.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef IPC_H
#define IPC_H
#pragma once
#include <QMap>
#include <QObject>
@ -91,5 +90,3 @@ private: @@ -91,5 +90,3 @@ private:
QSharedMemory globalMemory;
QMap<QString, IPCEventHandler> eventHandlers;
};
#endif // IPC_H

5
src/model/about/aboutfriend.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ABOUT_FRIEND_H
#define ABOUT_FRIEND_H
#pragma once
#include "iaboutfriend.h"
#include "src/model/interface.h"
@ -72,5 +71,3 @@ private: @@ -72,5 +71,3 @@ private:
const Friend* const f;
IFriendSettings* const settings;
};
#endif // ABOUT_FRIEND_H

5
src/model/about/iaboutfriend.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_ABOUT_FRIEND_H
#define I_ABOUT_FRIEND_H
#pragma once
#include "src/model/interface.h"
#include "src/persistence/ifriendsettings.h"
@ -62,5 +61,3 @@ public: @@ -62,5 +61,3 @@ public:
DECLARE_SIGNAL(autoAcceptCallChanged, IFriendSettings::AutoAcceptCallFlags);
DECLARE_SIGNAL(autoGroupInviteChanged, bool);
};
#endif // I_ABOUT_FRIEND_H

5
src/model/chathistory.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHAT_HISTORY_H
#define CHAT_HISTORY_H
#pragma once
#include "ichatlog.h"
#include "sessionchatlog.h"
@ -76,5 +75,3 @@ private: @@ -76,5 +75,3 @@ private:
// callback it will end up in this map
QMap<DispatchedMessageId, RowId> dispatchedMessageRowIdMap;
};
#endif /*CHAT_HISTORY_H*/

5
src/model/chatlogitem.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CHAT_LOG_ITEM_H
#define CHAT_LOG_ITEM_H
#pragma once
#include "src/core/toxfile.h"
#include "src/core/toxpk.h"
@ -72,5 +71,3 @@ private: @@ -72,5 +71,3 @@ private:
ContentPtr content;
};
#endif /*CHAT_LOG_ITEM_H*/

5
src/model/chatroom/chatroom.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MODEL_CHATROOM_H
#define MODEL_CHATROOM_H
#pragma once
#include "src/model/contact.h"
@ -27,5 +26,3 @@ class Chatroom @@ -27,5 +26,3 @@ class Chatroom
public:
virtual Contact* getContact() = 0;
};
#endif /* MODEL_CHATROOM_H */

5
src/model/chatroom/friendchatroom.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FRIEND_CHATROOM_H
#define FRIEND_CHATROOM_H
#pragma once
#include "chatroom.h"
@ -87,5 +86,3 @@ private: @@ -87,5 +86,3 @@ private:
Friend* frnd{nullptr};
IDialogsManager* dialogsManager{nullptr};
};
#endif // FRIEND_H

5
src/model/chatroom/groupchatroom.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUP_CHATROOM_H
#define GROUP_CHATROOM_H
#pragma once
#include "chatroom.h"
@ -52,5 +51,3 @@ private: @@ -52,5 +51,3 @@ private:
Group* group{nullptr};
IDialogsManager* dialogsManager{nullptr};
};
#endif /* GROUP_CHATROOM_H */

5
src/model/contact.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONTACT_H
#define CONTACT_H
#pragma once
#include "src/core/contactid.h"
#include <QObject>
@ -42,5 +41,3 @@ public: @@ -42,5 +41,3 @@ public:
signals:
void displayedNameChanged(const QString& newName);
};
#endif // CONTACT_H

5
src/model/dialogs/idialogs.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_DIALOGS_H
#define I_DIALOGS_H
#pragma once
class ContactId;
class GroupId;
@ -36,5 +35,3 @@ public: @@ -36,5 +35,3 @@ public:
virtual int chatroomCount() const = 0;
};
#endif // I_DIALOGS_H

5
src/model/dialogs/idialogsmanager.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_DIALOGS_MANAGER
#define I_DIALOGS_MANAGER
#pragma once
#include "idialogs.h"
@ -32,5 +31,3 @@ public: @@ -32,5 +31,3 @@ public:
virtual IDialogs* getFriendDialogs(const ToxPk& friendPk) const = 0;
virtual IDialogs* getGroupDialogs(const GroupId& groupId) const = 0;
};
#endif // I_DIALOGS_MANAGER

5
src/model/friend.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FRIEND_H
#define FRIEND_H
#pragma once
#include "contact.h"
#include "src/core/core.h"
@ -74,5 +73,3 @@ private: @@ -74,5 +73,3 @@ private:
bool hasNewEvents;
Status::Status friendStatus;
};
#endif // FRIEND_H

6
src/model/friendmessagedispatcher.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FRIEND_MESSAGE_DISPATCHER_H
#define FRIEND_MESSAGE_DISPATCHER_H
#pragma once
#include "src/core/icorefriendmessagesender.h"
#include "src/model/friend.h"
@ -54,6 +53,3 @@ private: @@ -54,6 +53,3 @@ private:
OfflineMsgEngine offlineMsgEngine;
MessageProcessor processor;
};
#endif /* IMESSAGE_DISPATCHER_H */

5
src/model/group.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUP_H
#define GROUP_H
#pragma once
#include "contact.h"
@ -86,5 +85,3 @@ private: @@ -86,5 +85,3 @@ private:
const GroupId groupId;
bool avGroupchat;
};
#endif // GROUP_H

5
src/model/groupinvite.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUPINVITE_H
#define GROUPINVITE_H
#pragma once
#include <QByteArray>
#include <QDateTime>
@ -42,5 +41,3 @@ private: @@ -42,5 +41,3 @@ private:
QByteArray invite;
QDateTime date;
};
#endif // GROUPINVITE_H

6
src/model/groupmessagedispatcher.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GROUP_MESSAGE_DISPATCHER_H
#define GROUP_MESSAGE_DISPATCHER_H
#pragma once
#include "src/core/icoregroupmessagesender.h"
#include "src/core/icoreidhandler.h"
@ -53,6 +52,3 @@ private: @@ -53,6 +52,3 @@ private:
const IGroupSettings& groupSettings;
DispatchedMessageId nextMessageId{0};
};
#endif /* IMESSAGE_DISPATCHER_H */

5
src/model/ichatlog.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ICHAT_LOG_H
#define ICHAT_LOG_H
#pragma once
#include "message.h"
#include "src/core/core.h"
@ -141,5 +140,3 @@ public: @@ -141,5 +140,3 @@ public:
signals:
void itemUpdated(ChatLogIdx idx);
};
#endif /*ICHAT_LOG_H*/

5
src/model/imessagedispatcher.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IMESSAGE_DISPATCHER_H
#define IMESSAGE_DISPATCHER_H
#pragma once
#include "src/model/friend.h"
#include "src/model/message.h"
@ -64,5 +63,3 @@ signals: @@ -64,5 +63,3 @@ signals:
*/
void messageComplete(DispatchedMessageId id);
};
#endif /* IMESSAGE_DISPATCHER_H */

5
src/model/interface.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INTERFACE_H
#define INTERFACE_H
#pragma once
#include <QMetaObject>
@ -70,5 +69,3 @@ @@ -70,5 +69,3 @@
QMetaObject::Connection connectTo_##name(QObject *receiver, Slot_##name slot) const override { \
return connect(this, &classname::name, receiver, slot); \
}
#endif // INTERFACE_H

5
src/model/message.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MESSAGE_H
#define MESSAGE_H
#pragma once
#include <QDateTime>
#include <QRegularExpression>
@ -114,5 +113,3 @@ private: @@ -114,5 +113,3 @@ private:
bool detectingMentions = false;
const SharedParams& sharedParams;
};
#endif /*MESSAGE_H*/

2
src/model/profile/iprofileinfo.h

@ -17,6 +17,8 @@ @@ -17,6 +17,8 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "src/model/interface.h"
#include <QObject>

2
src/model/profile/profileinfo.h

@ -17,6 +17,8 @@ @@ -17,6 +17,8 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QObject>
#include "src/model/interface.h"
#include "src/core/toxpk.h"

5
src/model/sessionchatlog.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SESSION_CHAT_LOG_H
#define SESSION_CHAT_LOG_H
#pragma once
#include "ichatlog.h"
#include "imessagedispatcher.h"
@ -89,5 +88,3 @@ private: @@ -89,5 +88,3 @@ private:
*/
QMap<DispatchedMessageId, ChatLogIdx> outgoingMessages;
};
#endif /*SESSION_CHAT_LOG_H*/

5
src/model/status.h

@ -20,8 +20,7 @@ @@ -20,8 +20,7 @@
#include <QString>
#include <QPixmap>
#ifndef STATUS_H
#define STATUS_H
#pragma once
namespace Status
{
@ -40,5 +39,3 @@ namespace Status @@ -40,5 +39,3 @@ namespace Status
QString getAssetSuffix(Status status);
bool isOnline(Status status);
}
#endif // STATUS_H

5
src/model/toxclientstandards.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXCLIENTSTANDARDS_H
#define TOXCLIENTSTANDARDS_H
#pragma once
#include <cstdint>
@ -31,5 +30,3 @@ namespace ToxClientStandards @@ -31,5 +30,3 @@ namespace ToxClientStandards
return fileSize <= MaxAvatarSize;
}
} // ToxClientStandards
#endif // TOXCLIENTSTANDARDS_H

5
src/net/avatarbroadcaster.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef AVATARBROADCASTER_H
#define AVATARBROADCASTER_H
#pragma once
#include <QByteArray>
#include <QMap>
@ -38,5 +37,3 @@ private: @@ -38,5 +37,3 @@ private:
static QByteArray avatarData;
static QMap<uint32_t, bool> friendsSentTo;
};
#endif // AVATARBROADCASTER_H

24
src/net/bootstrapnodeupdater.h

@ -1,5 +1,23 @@ @@ -1,5 +1,23 @@
#ifndef BOOTSTRAPNODEUPDATER_H
#define BOOTSTRAPNODEUPDATER_H
/*
Copyright © 2018-2020 by The qTox Project Contributors
This file is part of qTox, a Qt-based graphical interface for Tox.
qTox is libre software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
qTox is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QList>
#include <QNetworkAccessManager>
@ -32,5 +50,3 @@ private: @@ -32,5 +50,3 @@ private:
QNetworkProxy proxy;
QNetworkAccessManager nam;
};
#endif // BOOTSTRAPNODEUPDATER_H

5
src/net/toxuri.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef TOXURI_H
#define TOXURI_H
#pragma once
#include <QDialog>
@ -39,5 +38,3 @@ public: @@ -39,5 +38,3 @@ public:
private:
QPlainTextEdit* messageEdit;
};
#endif // TOXURI_H

3
src/net/updatecheck.h

@ -16,6 +16,9 @@ @@ -16,6 +16,9 @@
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <QNetworkAccessManager>
#include <QObject>
#include <QTimer>

5
src/nexus.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef NEXUS_H
#define NEXUS_H
#pragma once
#include <QObject>
@ -106,5 +105,3 @@ private: @@ -106,5 +105,3 @@ private:
std::unique_ptr<IAudioControl> audioControl;
QCommandLineParser* parser = nullptr;
};
#endif // NEXUS_H

5
src/persistence/db/rawdatabase.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RAWDATABASE_H
#define RAWDATABASE_H
#pragma once
#include "src/util/strongtype.h"
@ -177,5 +176,3 @@ private: @@ -177,5 +176,3 @@ private:
QByteArray currentSalt;
QString currentHexKey;
};
#endif // RAWDATABASE_H

5
src/persistence/history.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef HISTORY_H
#define HISTORY_H
#pragma once
#include <QDateTime>
#include <QHash>
@ -220,5 +219,3 @@ private: @@ -220,5 +219,3 @@ private:
// This needs to be a shared pointer to avoid callback lifetime issues
QHash<QString, FileInfo> fileInfos;
};
#endif // HISTORY_H

4
src/persistence/ifriendsettings.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef I_FRIEND_SETTINGS_H
#define I_FRIEND_SETTINGS_H
#pragma once
#include "src/model/interface.h"
@ -73,4 +72,3 @@ signals: @@ -73,4 +72,3 @@ signals:
};
Q_DECLARE_OPERATORS_FOR_FLAGS(IFriendSettings::AutoAcceptCallFlags)
#endif // I_FRIEND_SETTINGS_H

5
src/persistence/igroupsettings.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef IGROUP_SETTINGS_H
#define IGROUP_SETTINGS_H
#pragma once
#include <QStringList>
@ -31,5 +30,3 @@ public: @@ -31,5 +30,3 @@ public:
virtual bool getGroupAlwaysNotify() const = 0;
virtual void setGroupAlwaysNotify(bool newValue) = 0;
};
#endif /*IGROUP_SETTINGS_H*/

5
src/persistence/offlinemsgengine.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OFFLINEMSGENGINE_H
#define OFFLINEMSGENGINE_H
#pragma once
#include "src/chatlog/chatmessage.h"
#include "src/core/core.h"
@ -70,5 +69,3 @@ private: @@ -70,5 +69,3 @@ private:
QMap<ReceiptNum, OfflineMessage> sentMessages;
QVector<OfflineMessage> unsentMessages;
};
#endif // OFFLINEMSGENGINE_H

5
src/persistence/paths.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PATHS_H
#define PATHS_H
#pragma once
#include <QString>
#include <QStringList>
@ -50,5 +49,3 @@ private: @@ -50,5 +49,3 @@ private:
QString basePath{};
bool portable = false;
};
#endif // PATHS_H

5
src/persistence/profile.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef PROFILE_H
#define PROFILE_H
#pragma once
#include "src/core/core.h"
#include "src/core/toxencrypt.h"
@ -118,5 +117,3 @@ private: @@ -118,5 +117,3 @@ private:
bool encrypted = false;
static QStringList profiles;
};
#endif // PROFILE_H

5
src/persistence/profilelocker.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef PROFILELOCKER_H
#define PROFILELOCKER_H
#pragma once
#include <QLockFile>
#include <memory>
@ -45,5 +44,3 @@ private: @@ -45,5 +44,3 @@ private:
static std::unique_ptr<QLockFile> lockfile;
static QString curLockName;
};
#endif // PROFILELOCKER_H

5
src/persistence/serialize.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef SERIALIZE_H
#define SERIALIZE_H
#pragma once
#include <QByteArray>
#include <QString>
@ -32,5 +31,3 @@ size_t dataToVUint(const QByteArray& data); @@ -32,5 +31,3 @@ size_t dataToVUint(const QByteArray& data);
unsigned getVUint32Size(QByteArray data);
QByteArray vintToData(int num);
QByteArray vuintToData(size_t num);
#endif // SERIALIZE_H

5
src/persistence/settings.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SETTINGS_HPP
#define SETTINGS_HPP
#pragma once
#include "src/audio/iaudiosettings.h"
#include "src/core/icoresettings.h"
@ -708,5 +707,3 @@ private: @@ -708,5 +707,3 @@ private:
static const QString globalSettingsFile;
static QThread* settingsThread;
};
#endif // SETTINGS_HPP

5
src/persistence/settingsserializer.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SETTINGSSERIALIZER_H
#define SETTINGSSERIALIZER_H
#pragma once
#include "src/core/toxencrypt.h"
@ -111,5 +110,3 @@ private: @@ -111,5 +110,3 @@ private:
QVector<Value> values;
static const char magic[];
};
#endif // SETTINGSSERIALIZER_H

5
src/persistence/smileypack.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SMILEYPACK_H
#define SMILEYPACK_H
#pragma once
#include <QIcon>
#include <QMap>
@ -63,5 +62,3 @@ private: @@ -63,5 +62,3 @@ private:
QRegularExpression smilify;
mutable QMutex loadingMutex;
};
#endif // SMILEYPACK_H

5
src/persistence/toxsave.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOXSAVE_H
#define TOXSAVE_H
#pragma once
class QString;
class QByteArray;
@ -27,5 +26,3 @@ bool handleToxSave(const QString& path); @@ -27,5 +26,3 @@ bool handleToxSave(const QString& path);
// Internals
bool toxSaveEventHandler(const QByteArray& eventData);
#endif

7
src/platform/autorun.h

@ -17,10 +17,9 @@ @@ -17,10 +17,9 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef QTOX_PLATFORM_EXT
#pragma once
#ifndef PLATFORM_AUTORUN_H
#define PLATFORM_AUTORUN_H
#ifdef QTOX_PLATFORM_EXT
namespace Platform {
@ -28,6 +27,4 @@ bool setAutorun(bool on); @@ -28,6 +27,4 @@ bool setAutorun(bool on);
bool getAutorun();
}
#endif // PLATFORM_AUTORUN_H
#endif // QTOX_PLATFORM_EXT

5
src/platform/camera/avfoundation.h

@ -16,8 +16,7 @@ @@ -16,8 +16,7 @@
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef AVFOUNDATION_H
#define AVFOUNDATION_H
#pragma once
#include "src/video/videomode.h"
#include <QPair>
@ -34,5 +33,3 @@ const QString CAPTURE_SCREEN{"Capture screen"}; @@ -34,5 +33,3 @@ const QString CAPTURE_SCREEN{"Capture screen"};
QVector<VideoMode> getDeviceModes(QString devName);
QVector<QPair<QString, QString>> getDeviceList();
}
#endif // AVFOUNDATION_H

5
src/platform/camera/directshow.h

@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
*/
#ifndef DIRECTSHOW_H
#define DIRECTSHOW_H
#pragma once
#include "src/video/videomode.h"
#include <QPair>
@ -34,5 +33,3 @@ namespace DirectShow { @@ -34,5 +33,3 @@ namespace DirectShow {
QVector<QPair<QString, QString>> getDeviceList();
QVector<VideoMode> getDeviceModes(QString devName);
}
#endif // DIRECTSHOW_H

5
src/platform/camera/v4l2.h

@ -16,8 +16,7 @@ @@ -16,8 +16,7 @@
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef V4L2_H
#define V4L2_H
#pragma once
#include "src/video/videomode.h"
#include <QPair>
@ -34,5 +33,3 @@ QVector<QPair<QString, QString>> getDeviceList(); @@ -34,5 +33,3 @@ QVector<QPair<QString, QString>> getDeviceList();
QString getPixelFormatString(uint32_t pixel_format);
bool betterPixelFormat(uint32_t a, uint32_t b);
}
#endif // V4L2_H

7
src/platform/capslock.h

@ -17,16 +17,13 @@ @@ -17,16 +17,13 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef QTOX_PLATFORM_EXT
#pragma once
#ifndef PLATFORM_CAPSLOCK_H
#define PLATFORM_CAPSLOCK_H
#ifdef QTOX_PLATFORM_EXT
namespace Platform {
bool capsLockEnabled();
}
#endif // PLATFORM_CAPSLOCK_H
#endif // QTOX_PLATFORM_EXT

5
src/platform/desktop_notifications/desktopnotify.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DESKTOPNOTIFY_H
#define DESKTOPNOTIFY_H
#pragma once
#if DESKTOP_NOTIFICATIONS
#include <libsnore/snore.h>
@ -54,5 +53,3 @@ private: @@ -54,5 +53,3 @@ private:
Snore::Icon snoreIcon;
};
#endif // DESKTOP_NOTIFICATIONS
#endif // DESKTOPNOTIFY_H

5
src/platform/install_osx.h

@ -16,8 +16,7 @@ @@ -16,8 +16,7 @@
You should have received a copy of the GNU General Public License
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INSTALLOSX_H
#define INSTALLOSX_H
#pragma once
#include <QtCore/qsystemdetection.h>
@ -33,5 +32,3 @@ static constexpr int EXIT_UPDATE_MACX_FAIL = 216; @@ -33,5 +32,3 @@ static constexpr int EXIT_UPDATE_MACX_FAIL = 216;
void moveToAppFolder();
void migrateProfiles();
}
#endif // INSTALLOSX_H

5
src/platform/posixsignalnotifier.h

@ -17,8 +17,7 @@ @@ -17,8 +17,7 @@
along with qTox. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef POSIXSIGNALNOTIFIER_H
#define POSIXSIGNALNOTIFIER_H
#pragma once
#include <QObject>
@ -49,5 +48,3 @@ private: @@ -49,5 +48,3 @@ private:
private:
QSocketNotifier* notifier{nullptr};
};
#endif // POSIXSIGNALNOTIFIER_H

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save