mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
fix some found warning
This commit is contained in:
parent
e9beea2d7a
commit
09a3c32d0c
@ -2,11 +2,11 @@
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: false
|
||||
AlignConsecutiveAssignments: None
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: Inline
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
|
@ -61,7 +61,7 @@ QStringList AWAbstractPairHelper::values() const
|
||||
QSet<QString> AWAbstractPairHelper::valuesSet() const
|
||||
{
|
||||
auto values = m_pairs.values();
|
||||
return QSet(values.cbegin(), values.cend());
|
||||
return {values.cbegin(), values.cend()};
|
||||
}
|
||||
|
||||
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
Q_INVOKABLE void sendBugReport(const QString &_title, const QString &_body);
|
||||
|
||||
signals:
|
||||
void replyReceived(const int _number, const QString &_url);
|
||||
void replyReceived(int _number, const QString &_url);
|
||||
|
||||
private slots:
|
||||
void issueReplyRecieved(QNetworkReply *_reply);
|
||||
|
@ -74,5 +74,5 @@ QStringList AWCustomKeysHelper::leftKeys()
|
||||
|
||||
QStringList AWCustomKeysHelper::rightKeys()
|
||||
{
|
||||
return QStringList();
|
||||
return {};
|
||||
}
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include <Plasma/DataContainer>
|
||||
|
||||
#include "awdebug.h"
|
||||
#include "awkeys.h"
|
||||
|
||||
|
||||
AWDataEngineAggregator::AWDataEngineAggregator(QObject *_parent)
|
||||
|
@ -38,7 +38,7 @@ AWDBusAdaptor::~AWDBusAdaptor()
|
||||
}
|
||||
|
||||
|
||||
QStringList AWDBusAdaptor::ActiveServices() const
|
||||
QStringList AWDBusAdaptor::ActiveServices()
|
||||
{
|
||||
QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(QDBus::BlockWithGui, "ListNames");
|
||||
if (listServices.arguments().isEmpty()) {
|
||||
|
@ -37,11 +37,11 @@ public:
|
||||
|
||||
public slots:
|
||||
// get methods
|
||||
QStringList ActiveServices() const;
|
||||
QString Info(const QString &key) const;
|
||||
QStringList Keys(const QString ®exp) const;
|
||||
QString Value(const QString &key) const;
|
||||
qlonglong WhoAmI() const;
|
||||
[[nodiscard]] static QStringList ActiveServices();
|
||||
[[nodiscard]] QString Info(const QString &key) const;
|
||||
[[nodiscard]] QStringList Keys(const QString ®exp) const;
|
||||
[[nodiscard]] QString Value(const QString &key) const;
|
||||
[[nodiscard]] qlonglong WhoAmI() const;
|
||||
// set methods
|
||||
void SetLogLevel(const QString &what, int level);
|
||||
void SetLogLevel(const QString &what, const QString &level, bool enabled);
|
||||
|
@ -102,7 +102,7 @@ void AWFormatterHelper::editPairs()
|
||||
|
||||
QStringList AWFormatterHelper::leftKeys()
|
||||
{
|
||||
return QStringList();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "awkeyoperations.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QJSEngine>
|
||||
#include <QRegExp>
|
||||
#include <QThread>
|
||||
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
public slots:
|
||||
void dataUpdated(const QString &_sourceName, const Plasma::DataEngine::Data &_data);
|
||||
// dummy method required by DataEngine connections
|
||||
static void modelChanged(QString, QAbstractItemModel *){};
|
||||
static void modelChanged(const QString &, QAbstractItemModel *){};
|
||||
|
||||
signals:
|
||||
void dropSourceFromDataengine(const QString &_source);
|
||||
|
@ -79,7 +79,7 @@ public slots:
|
||||
virtual void readConfiguration();
|
||||
virtual QVariantHash run() = 0;
|
||||
virtual int showConfiguration(const QVariant &_args) = 0;
|
||||
virtual bool tryDelete() const;
|
||||
[[nodiscard]] virtual bool tryDelete() const;
|
||||
virtual void writeConfiguration() const;
|
||||
|
||||
private slots:
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
void editItem();
|
||||
QString getName();
|
||||
virtual void initItems() = 0;
|
||||
AbstractExtItem *itemFromWidget() const;
|
||||
[[nodiscard]] AbstractExtItem *itemFromWidget() const;
|
||||
void repaintList() const;
|
||||
[[nodiscard]] int uniqNumber() const;
|
||||
// get methods
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
{
|
||||
return dynamic_cast<AbstractExtItem *>(parent())->tag(_type);
|
||||
};
|
||||
virtual QUrl url() const = 0;
|
||||
[[nodiscard]] virtual QUrl url() const = 0;
|
||||
};
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void readConfiguration() override;
|
||||
QVariantHash run() override { return QVariantHash(); };
|
||||
QVariantHash run() override { return {}; };
|
||||
void writeConfiguration() const override;
|
||||
|
||||
private:
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include <KI18n/KLocalizedString>
|
||||
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
#include <QTextCodec>
|
||||
|
||||
|
@ -100,7 +100,7 @@ QString GraphicalItem::image(const QVariant &value)
|
||||
|
||||
m_scene->clear();
|
||||
int scale[2] = {1, 1};
|
||||
float converted = m_helper->getPercents(value.toFloat(), minValue(), maxValue());
|
||||
float converted = GraphicalItemHelper::getPercents(value.toFloat(), minValue(), maxValue());
|
||||
|
||||
// paint
|
||||
switch (m_type) {
|
||||
@ -457,12 +457,12 @@ int GraphicalItem::showConfiguration(const QVariant &_args)
|
||||
ui->doubleSpinBox_max->setValue(maxValue());
|
||||
ui->doubleSpinBox_min->setValue(minValue());
|
||||
ui->spinBox_count->setValue(count());
|
||||
if (m_helper->isColor(activeColor()))
|
||||
if (GraphicalItemHelper::isColor(activeColor()))
|
||||
ui->comboBox_activeImageType->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_activeImageType->setCurrentIndex(1);
|
||||
ui->lineEdit_activeColor->setText(activeColor());
|
||||
if (m_helper->isColor(inactiveColor()))
|
||||
if (GraphicalItemHelper::isColor(inactiveColor()))
|
||||
ui->comboBox_inactiveImageType->setCurrentIndex(0);
|
||||
else
|
||||
ui->comboBox_inactiveImageType->setCurrentIndex(1);
|
||||
@ -539,7 +539,7 @@ void GraphicalItem::changeColor()
|
||||
|
||||
QString outputColor;
|
||||
if (state == 0) {
|
||||
QColor color = m_helper->stringToColor(lineEdit->text());
|
||||
QColor color = GraphicalItemHelper::stringToColor(lineEdit->text());
|
||||
QColor newColor = QColorDialog::getColor(color, this, i18n("Select color"), QColorDialog::ShowAlphaChannel);
|
||||
if (!newColor.isValid())
|
||||
return;
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void readConfiguration() override;
|
||||
QVariantHash run() override { return QVariantHash(); };
|
||||
QVariantHash run() override { return {}; };
|
||||
int showConfiguration(const QVariant &_args) override;
|
||||
void writeConfiguration() const override;
|
||||
|
||||
|
@ -135,7 +135,7 @@ QList<int> QCronScheduler::QCronField::toList()
|
||||
{
|
||||
// error checking
|
||||
if ((minValue == -1) || (maxValue == -1))
|
||||
return QList<int>();
|
||||
return {};
|
||||
|
||||
QList<int> output;
|
||||
for (auto &i = minValue; i <= maxValue; ++i) {
|
||||
|
@ -57,7 +57,7 @@ QVariantHash YahooWeatherProvider::parse(const QVariantMap &_json) const
|
||||
QVariantMap jsonMap = _json["query"].toMap();
|
||||
if (jsonMap["count"].toInt() != 1) {
|
||||
qCWarning(LOG_LIB) << "Found data count" << _json["count"].toInt() << "is not 1";
|
||||
return QVariantHash();
|
||||
return {};
|
||||
}
|
||||
QVariantMap results = jsonMap["results"].toMap()["channel"].toMap();
|
||||
QVariantMap item = results["item"].toMap();
|
||||
|
@ -1,5 +1,6 @@
|
||||
exec_program(
|
||||
"sed -n '1,/^Ver/ p' CHANGELOG 2> /dev/null | grep -v '^Ver' | tr '\n' '@'"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
execute_process(
|
||||
COMMAND "sed -n '1,/^Ver/ p' CHANGELOG 2> /dev/null | grep -v '^Ver' | tr '\n' '@'"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE PROJECT_CHANGELOG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
exec_program(
|
||||
"git"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
ARGS "log" "-1" "--format=\"%h\""
|
||||
execute_process(
|
||||
COMMAND git log -1 --format=%h
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE COMMIT_SHA
|
||||
RETURN_VALUE GIT_RETURN
|
||||
RESULT_VARIABLE GIT_RETURN
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
if (${GIT_RETURN} EQUAL "0")
|
||||
|
@ -59,7 +59,7 @@ QVariant DesktopSource::data(const QString &_source)
|
||||
return m_vdi->numberOfDesktops();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,4 +47,4 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif /* TESTJSONFORMATTER_Hl */
|
||||
#endif /* TESTJSONFORMATTER_H */
|
||||
|
Loading…
Reference in New Issue
Block a user