Skip to content

Commit

Permalink
refactor: remove innclude guards, use pragma instead
Browse files Browse the repository at this point in the history
  • Loading branch information
arcan1s committed Mar 28, 2024
1 parent f27050a commit 0bcceef
Show file tree
Hide file tree
Showing 97 changed files with 186 additions and 551 deletions.
6 changes: 3 additions & 3 deletions sources/3rdparty/fontdialog/fontdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ CFontDialog::CFontDialog(QWidget *parent, bool needWeight, bool needItalic)
setLayout(mainGrid);

colorBox = new QComboBox(this);
connect(colorBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateColor(QString)));
connect(colorBox, &QComboBox::currentTextChanged, this, &CFontDialog::updateColor);
QStringList colorNames = QColor::colorNames();
int index = 0;
for (int i=0; i<colorNames.count(); i++) {
Expand All @@ -81,8 +81,8 @@ CFontDialog::CFontDialog(QWidget *parent, bool needWeight, bool needItalic)

buttons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
Qt::Horizontal, this);
QObject::connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
QObject::connect(buttons, SIGNAL(rejected()), this, SLOT(reject()));
QObject::connect(buttons, &QDialogButtonBox::accepted, this, &CFontDialog::accept);
QObject::connect(buttons, &QDialogButtonBox::rejected, this, &CFontDialog::reject);
mainGrid->addWidget(buttons, 1, 0, 1, 5);

italicBox->setHidden(!needItalic);
Expand Down
6 changes: 1 addition & 5 deletions sources/3rdparty/fontdialog/fontdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
* License along with this library. *
***************************************************************************/

#ifndef FONTDIALOG_H
#define FONTDIALOG_H
#pragma once

#include <QComboBox>
#include <QDialog>
Expand Down Expand Up @@ -72,6 +71,3 @@ private slots:
QSpinBox *sizeBox;
QSpinBox *weightBox;
};


#endif /* FONTDIALOG_H */
7 changes: 1 addition & 6 deletions sources/awdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWDEBUG_H
#define AWDEBUG_H
#pragma once

#include <QLoggingCategory>

Expand All @@ -42,6 +40,3 @@ Q_DECLARE_LOGGING_CATEGORY(LOG_DP)
Q_DECLARE_LOGGING_CATEGORY(LOG_ESM)
Q_DECLARE_LOGGING_CATEGORY(LOG_ESS)
Q_DECLARE_LOGGING_CATEGORY(LOG_LIB)


#endif /* AWDEBUG_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awabstractpairconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWABSTRACTPAIRCONFIG_H
#define AWABSTRACTPAIRCONFIG_H
#pragma once

#include <QDialog>

Expand Down Expand Up @@ -67,6 +65,3 @@ private slots:
[[nodiscard]] QPair<QStringList, QStringList> initKeys() const;
void updateDialog();
};


#endif /* AWABSTRACTPAIRCONFIG_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awabstractpairhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWABSTRACTPAIRHELPER_H
#define AWABSTRACTPAIRHELPER_H
#pragma once

#include <QHash>

Expand Down Expand Up @@ -46,6 +44,3 @@ class AWAbstractPairHelper
QString m_filePath;
QString m_section;
};


#endif /* AWABSTRACTPAIRHELPER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awabstractselector.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWABSTRACTSELECTOR_H
#define AWABSTRACTSELECTOR_H
#pragma once

#include <QWidget>

Expand All @@ -43,6 +41,3 @@ class AWAbstractSelector : public QWidget
private:
Ui::AWAbstractSelector *ui = nullptr;
};


#endif /* AWABSTRACTSELECTOR_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awactions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWACTIONS_H
#define AWACTIONS_H
#pragma once

#include <QMap>
#include <QObject>
Expand Down Expand Up @@ -47,6 +45,3 @@ public slots:
private:
AWUpdateHelper *m_updateHelper = nullptr;
};


#endif /* AWACTIONS_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awbugreporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWBUGREPORTER_H
#define AWBUGREPORTER_H
#pragma once

#include <QObject>

Expand Down Expand Up @@ -48,6 +46,3 @@ private slots:
private:
QString m_lastBugUrl;
};


#endif /* AWBUGREPORTER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awconfighelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWCONFIGHELPER_H
#define AWCONFIGHELPER_H
#pragma once

#include <QObject>
#include <QVariant>
Expand Down Expand Up @@ -52,6 +50,3 @@ class AWConfigHelper : public QObject
QString m_baseDir;
QStringList m_dirs = {"desktops", "quotes", "scripts", "upgrade", "weather", "formatters"};
};


#endif /* AWCONFIGHELPER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awcustomkeysconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWCUSTOMKEYSCONFIG_H
#define AWCUSTOMKEYSCONFIG_H
#pragma once

#include "awabstractpairconfig.h"

Expand All @@ -30,6 +28,3 @@ class AWCustomKeysConfig : public AWAbstractPairConfig
explicit AWCustomKeysConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList());
~AWCustomKeysConfig() override;
};


#endif /* AWCUSTOMKEYSCONFIG_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awcustomkeyshelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWCUSTOMKEYSHELPER_H
#define AWCUSTOMKEYSHELPER_H
#pragma once

#include <QObject>

Expand All @@ -42,6 +40,3 @@ class AWCustomKeysHelper : public QObject, public AWAbstractPairHelper

private:
};


#endif /* AWCUSTOMKEYSHELPER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awdataaggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWTOOLTIP_H
#define AWTOOLTIP_H
#pragma once

#include <QObject>
#include <QVariant>
Expand Down Expand Up @@ -68,6 +66,3 @@ public slots:
bool m_enablePopup = false;
QStringList requiredKeys;
};


#endif /* AWTOOLTIP_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awdataenginemapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWDATAENGINEMAPPER_H
#define AWDATAENGINEMAPPER_H
#pragma once

#include <ksysguard/formatter/Unit.h>

Expand Down Expand Up @@ -50,6 +48,3 @@ class AWDataEngineMapper : public QObject
QHash<QString, AWKeysAggregator::FormatterType> m_formatter;
QMultiHash<QString, QString> m_map;
};


#endif /* AWDATAENGINEMAPPER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awdbusadaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWDBUSADAPTOR_H
#define AWDBUSADAPTOR_H
#pragma once

#include <QDBusAbstractAdaptor>

Expand Down Expand Up @@ -50,6 +48,3 @@ public slots:
AWKeys *m_plugin = nullptr;
QStringList m_logLevels = {"debug", "info", "warning", "critical"};
};


#endif /* AWDBUSADAPTOR_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awesomewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWPLUGIN_H
#define AWPLUGIN_H
#pragma once

#include <QQmlExtensionPlugin>

Expand All @@ -30,6 +28,3 @@ class AWPlugin : public QQmlExtensionPlugin
public:
void registerTypes(const char *uri) override;
};


#endif /* AWPLUGIN_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awformatterconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWFORMATTERCONFIG_H
#define AWFORMATTERCONFIG_H
#pragma once

#include "awabstractpairconfig.h"

Expand All @@ -30,6 +28,3 @@ class AWFormatterConfig : public AWAbstractPairConfig
explicit AWFormatterConfig(QWidget *_parent = nullptr, const QStringList &_keys = QStringList());
~AWFormatterConfig() override;
};


#endif /* AWFORMATTERCONFIG_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awformatterhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWFORMATTERHELPER_H
#define AWFORMATTERHELPER_H
#pragma once

#include "abstractextitemaggregator.h"
#include "awabstractformatter.h"
Expand Down Expand Up @@ -56,6 +54,3 @@ public slots:
QHash<QString, AWAbstractFormatter *> m_formatters;
QHash<QString, AWAbstractFormatter *> m_formattersClasses;
};


#endif /* AWFORMATTERHELPER_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awkeycache.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWKEYCACHE_H
#define AWKEYCACHE_H
#pragma once

#include <QHash>
#include <QString>
Expand All @@ -31,6 +29,3 @@ QStringList getRequiredKeys(const QStringList &_keys, const QStringList &_bars,
const QStringList &_userKeys, const QStringList &_allKeys);
QHash<QString, QStringList> loadKeysFromCache();
} // namespace AWKeyCache


#endif /* AWKEYCACHE_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awkeyoperations.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWKEYOPERATIONS_H
#define AWKEYOPERATIONS_H
#pragma once

#include <QObject>

Expand Down Expand Up @@ -78,6 +76,3 @@ public slots:
QHash<QString, QStringList> m_devices;
QString m_pattern;
};


#endif /* AWKEYOPERATIONS_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awkeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWKEYS_H
#define AWKEYS_H
#pragma once

#include <QMutex>
#include <QObject>
Expand Down Expand Up @@ -90,6 +88,3 @@ private slots:
QThreadPool *m_threadPool = nullptr;
QMutex m_mutex;
};


#endif /* AWKEYS_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awkeysaggregator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWKEYSAGGREGATOR_H
#define AWKEYSAGGREGATOR_H
#pragma once

#include <ksysguard/formatter/Unit.h>

Expand Down Expand Up @@ -103,6 +101,3 @@ public slots:
QString m_tempUnits;
bool m_translate = false;
};


#endif /* AWKEYSAGGREGATOR_H */
7 changes: 1 addition & 6 deletions sources/awesome-widget/plugin/awpairconfigfactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
* along with awesome-widgets. If not, see http://www.gnu.org/licenses/ *
***************************************************************************/


#ifndef AWPAIRCONFIGFACTORY_H
#define AWPAIRCONFIGFACTORY_H
#pragma once

#include <QObject>

Expand All @@ -34,6 +32,3 @@ class AWPairConfigFactory : public QObject

private:
};


#endif /* AWPAIRCONFIGFACTORY_H */
Loading

0 comments on commit 0bcceef

Please sign in to comment.