refactor: remove innclude guards, use pragma instead

This commit is contained in:
2024-03-28 03:05:26 +02:00
parent f27050afbc
commit 0bcceefd47
97 changed files with 186 additions and 551 deletions

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef AWTESTLIBRARY_H
#define AWTESTLIBRARY_H
#pragma once
#include <QPair>
#include <QStringList>
@ -34,6 +32,3 @@ QString randomString(const int _min = 1, const int _max = 100);
QStringList randomStringList(const int _max = 100);
QStringList randomSelect(const QStringList &_available);
} // namespace AWTestLibrary
#endif /* AWTESTLIBRARY_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTABSTRACTEXTITEM_H
#define TESTABSTRACTEXTITEM_H
#pragma once
#include <QObject>
@ -49,6 +47,3 @@ private:
QString fileName;
QString writeFileName;
};
#endif /* TESTABSTRACTEXTITEM_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTABSTRACTFORMATTER_H
#define TESTABSTRACTFORMATTER_H
#pragma once
#include <QObject>
@ -40,6 +38,3 @@ private slots:
private:
AWNoFormatter *formatter = nullptr;
};
#endif /* TESTABSTRACTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWBUGREPORTER_H
#define TESTAWBUGREPORTER_H
#pragma once
#include <QObject>
@ -40,6 +38,3 @@ private:
AWBugReporter *plugin = nullptr;
QStringList data;
};
#endif /* TESTAWBUGREPORTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWCONFIGHELPER_H
#define TESTAWCONFIGHELPER_H
#pragma once
#include <QObject>
#include <QQmlPropertyMap>
@ -47,6 +45,3 @@ private:
QQmlPropertyMap map;
QVariantMap deConfig;
};
#endif /* TESTAWCONFIGHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWKEYCACHE_H
#define TESTAWKEYCACHE_H
#pragma once
#include <QObject>
@ -34,6 +32,3 @@ private slots:
private:
};
#endif /* TESTAWKEYCACHE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWKEYS_H
#define TESTAWKEYS_H
#pragma once
#include <QObject>
@ -47,6 +45,3 @@ private:
QString pattern;
int interval = 1000;
};
#endif /* TESTAWKEYS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWPATTERNFUNCTIONS_H
#define TESTAWPATTERNFUNCTIONS_H
#pragma once
#include <QObject>
@ -38,6 +36,3 @@ private slots:
private:
};
#endif /* TESTAWPATTERNFUNCTIONS_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWTELEMETRYHANDLER_H
#define TESTAWTELEMETRYHANDLER_H
#pragma once
#include <QObject>
@ -46,6 +44,3 @@ private:
QString telemetryStatus = "saved";
QString telemetryValidGroup = "awwidgetconfig";
};
#endif /* TESTAWTELEMETRYHANDLER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTAWUPDATEHELPER_H
#define TESTAWUPDATEHELPER_H
#pragma once
#include <QObject>
@ -38,6 +36,3 @@ private slots:
private:
AWUpdateHelper *plugin = nullptr;
};
#endif /* TESTAWUPDATEHELPER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTBATTERYSOURCE_H
#define TESTBATTERYSOURCE_H
#pragma once
#include <QObject>
#include <QPair>
@ -42,6 +40,3 @@ private:
QString acpiPath = "/sys/class/power_supply/";
QPair<int, int> battery = QPair<int, int>(0, 100);
};
#endif /* TESTBATTERYSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTDATETIMEFORMATTER_H
#define TESTDATETIMEFORMATTER_H
#pragma once
#include <QObject>
@ -41,6 +39,3 @@ private:
AWDateTimeFormatter *formatter = nullptr;
QString format;
};
#endif /* TESTDATETIMEFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTDESKTOPSOURCE_H
#define TESTDESKTOPSOURCE_H
#pragma once
#include <QObject>
@ -39,6 +37,3 @@ private slots:
private:
DesktopSource *source = nullptr;
};
#endif /* TESTDESKTOPSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTDPPLUGIN_H
#define TESTDPPLUGIN_H
#pragma once
#include <QObject>
@ -44,6 +42,3 @@ private:
bool m_isKwinActive = false;
QString pattern = "$";
};
#endif /* TESTDPPLUGIN_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTEXTITEMAGGREGATOR_H
#define TESTEXTITEMAGGREGATOR_H
#pragma once
#include <QObject>
@ -40,6 +38,3 @@ private:
ExtItemAggregator<AWNoFormatter> *aggregator = nullptr;
QString type = "tmp";
};
#endif /* TESTEXTITEMAGGREGATOR_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTEXTQUOTES_H
#define TESTEXTQUOTES_H
#pragma once
#include <QObject>
#include <QVariant>
@ -47,6 +45,3 @@ private:
// we assume that price will not be differ more than in 2 times
QPair<double, double> price = QPair<double, double>(0.0, 2.0);
};
#endif /* TESTEXTQUOTES_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTEXTSCRIPT_H
#define TESTEXTSCRIPT_H
#pragma once
#include <QObject>
@ -42,6 +40,3 @@ private:
ExtScript *extScript = nullptr;
QString randomString;
};
#endif /* TESTEXTSCRIPT_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTEXTUPGRADE_H
#define TESTEXTUPGRADE_H
#pragma once
#include <QObject>
@ -44,6 +42,3 @@ private:
QString cmd;
QStringList randomStrings;
};
#endif /* TESTEXTUPGRADE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTEXTWEATHER_H
#define TESTEXTWEATHER_H
#pragma once
#include <QObject>
#include <QPair>
@ -52,6 +50,3 @@ private:
// dont know about temperature, but I suppose it will be between -40 and 40
QPair<float, float> temp = QPair<float, float>(-40.0f, 40.0f);
};
#endif /* TESTEXTWEATHER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTFLOATFORMATTER_H
#define TESTFLOATFORMATTER_H
#pragma once
#include <QObject>
@ -47,6 +45,3 @@ private:
void doRandom();
AWFloatFormatter *formatter = nullptr;
};
#endif /* TESTFLOATFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTJSONFORMATTER_H
#define TESTJSONFORMATTER_H
#pragma once
#include <QObject>
#include <QVariant>
@ -45,6 +43,3 @@ private:
QString path;
QString value;
};
#endif /* TESTJSONFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTLISTFORMATTER_H
#define TESTLISTFORMATTER_H
#pragma once
#include <QObject>
@ -43,6 +41,3 @@ private:
AWListFormatter *formatter = nullptr;
QString separator;
};
#endif /* TESTLISTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTNETWORKSOURCE_H
#define TESTNETWORKSOURCE_H
#pragma once
#include <QObject>
@ -39,6 +37,3 @@ private slots:
private:
NetworkSource *source = nullptr;
};
#endif /* TESTNETWORKSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTNOFORMATTER_H
#define TESTNOFORMATTER_H
#pragma once
#include <QObject>
@ -40,6 +38,3 @@ private slots:
private:
AWNoFormatter *formatter = nullptr;
};
#endif /* TESTNOFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTPLAYERSOURCE_H
#define TESTPLAYERSOURCE_H
#pragma once
#include <QObject>
@ -44,6 +42,3 @@ private:
QString mpdAddress = "localhost";
int mpdPort = 6600;
};
#endif /* TESTPLAYERSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTPROCESSESSOURCE_H
#define TESTPROCESSESSOURCE_H
#pragma once
#include <QObject>
@ -39,6 +37,3 @@ private slots:
private:
ProcessesSource *source = nullptr;
};
#endif /* TESTPROCESSESSOURCE_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTSCRIPTFORMATTER_H
#define TESTSCRIPTFORMATTER_H
#pragma once
#include <QObject>
@ -45,6 +43,3 @@ private:
QString codeWithReturn = QString("%1; return output;").arg(code);
QString fullCode = QString("(function(value) { %1 })").arg(codeWithReturn);
};
#endif /* TESTSCRIPTFORMATTER_H */

View File

@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/
#ifndef TESTSTRINGFORMATTER_H
#define TESTSTRINGFORMATTER_H
#pragma once
#include <QObject>
@ -43,6 +41,3 @@ private:
void doRandom();
AWStringFormatter *formatter = nullptr;
};
#endif /* TESTSTRINGFORMATTER_H */