From 4edcced09634d7c9fbc389b6e5f02b15bc11af69 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Fri, 12 Jan 2018 05:28:19 +0100 Subject: [PATCH] Move symbols of libplasmaweatherprivate into Plasma namespace --- applets/weather/plugin/locationlistmodel.cpp | 8 ++++---- applets/weather/plugin/locationlistmodel.h | 5 +++-- applets/weather/weatherapplet.cpp | 4 ++-- applets/weather/weatherapplet.h | 2 +- libs/plasmaweather/weatherlocation.cpp | 4 ++++ libs/plasmaweather/weatherlocation.h | 4 ++++ libs/plasmaweather/weatherpopupapplet.cpp | 4 ++++ libs/plasmaweather/weatherpopupapplet.h | 3 +++ libs/plasmaweather/weathervalidator.cpp | 3 +++ libs/plasmaweather/weathervalidator.h | 4 ++++ 10 files changed, 32 insertions(+), 9 deletions(-) diff --git a/applets/weather/plugin/locationlistmodel.cpp b/applets/weather/plugin/locationlistmodel.cpp index 5248512f7..0cf9b97eb 100644 --- a/applets/weather/plugin/locationlistmodel.cpp +++ b/applets/weather/plugin/locationlistmodel.cpp @@ -120,9 +120,9 @@ void LocationListModel::searchLocations(const QString &searchString, const QStri //qDebug() << "ion: " << pluginInfo[0] << pluginInfo[1]; //d->ions.insert(pluginInfo[1], pluginInfo[0]); - WeatherValidator *validator = new WeatherValidator(this); - connect(validator, &WeatherValidator::error, this, &LocationListModel::validatorError); - connect(validator, &WeatherValidator::finished, this, &LocationListModel::addSources); + auto* validator = new Plasma::WeatherValidator(this); + connect(validator, &Plasma::WeatherValidator::error, this, &LocationListModel::validatorError); + connect(validator, &Plasma::WeatherValidator::finished, this, &LocationListModel::addSources); validator->setDataEngine(dataengine); validator->setIon(ionId); @@ -130,7 +130,7 @@ void LocationListModel::searchLocations(const QString &searchString, const QStri } } - for (WeatherValidator* validator : qAsConst(m_validators)) { + for (auto* validator : qAsConst(m_validators)) { validator->validate(m_searchString, true); } } diff --git a/applets/weather/plugin/locationlistmodel.h b/applets/weather/plugin/locationlistmodel.h index 9bbedcc4c..b02885df4 100644 --- a/applets/weather/plugin/locationlistmodel.h +++ b/applets/weather/plugin/locationlistmodel.h @@ -24,8 +24,9 @@ #include #include +namespace Plasma { class WeatherValidator; - +} class LocationItem { @@ -81,7 +82,7 @@ private: bool m_validatingInput; QString m_searchString; int m_checkedInCount; - QVector m_validators; + QVector m_validators; }; #endif // LOCATIONLISTMODEL_H diff --git a/applets/weather/weatherapplet.cpp b/applets/weather/weatherapplet.cpp index 0dfe87e45..bed4ccdc3 100644 --- a/applets/weather/weatherapplet.cpp +++ b/applets/weather/weatherapplet.cpp @@ -75,7 +75,7 @@ QString existingWeatherIconName(const QString &iconName) WeatherApplet::WeatherApplet(QObject *parent, const QVariantList &args) - : WeatherPopupApplet(parent, args) + : Plasma::WeatherPopupApplet(parent, args) { } @@ -83,7 +83,7 @@ void WeatherApplet::init() { resetPanelModel(); - WeatherPopupApplet::init(); + Plasma::WeatherPopupApplet::init(); } WeatherApplet::~WeatherApplet() diff --git a/applets/weather/weatherapplet.h b/applets/weather/weatherapplet.h index 6523c57c2..4f7696fc9 100644 --- a/applets/weather/weatherapplet.h +++ b/applets/weather/weatherapplet.h @@ -23,7 +23,7 @@ #include -class WeatherApplet : public WeatherPopupApplet +class WeatherApplet : public Plasma::WeatherPopupApplet { Q_OBJECT Q_PROPERTY(QVariantMap panelModel READ panelModel NOTIFY modelUpdated) diff --git a/libs/plasmaweather/weatherlocation.cpp b/libs/plasmaweather/weatherlocation.cpp index 1c6cb2b27..51fcf320b 100644 --- a/libs/plasmaweather/weatherlocation.cpp +++ b/libs/plasmaweather/weatherlocation.cpp @@ -21,6 +21,8 @@ #include "weathervalidator.h" +namespace Plasma { + class WeatherLocationPrivate { public: @@ -90,3 +92,5 @@ void WeatherLocation::dataUpdated(const QString &source, const Plasma::DataEngin emit finished(QString()); } + +} diff --git a/libs/plasmaweather/weatherlocation.h b/libs/plasmaweather/weatherlocation.h index 173105084..5b257511c 100644 --- a/libs/plasmaweather/weatherlocation.h +++ b/libs/plasmaweather/weatherlocation.h @@ -22,6 +22,8 @@ #include +namespace Plasma { + /** * @class WeatherLocation * @@ -60,4 +62,6 @@ private: const QScopedPointer d; }; +} + #endif diff --git a/libs/plasmaweather/weatherpopupapplet.cpp b/libs/plasmaweather/weatherpopupapplet.cpp index 7022c51ec..959b8ae5b 100644 --- a/libs/plasmaweather/weatherpopupapplet.cpp +++ b/libs/plasmaweather/weatherpopupapplet.cpp @@ -53,6 +53,8 @@ inline QString weather() { return QStringLiteral("weather"); } } } +namespace Plasma { + class WeatherPopupAppletPrivate { public: @@ -442,3 +444,5 @@ QString WeatherPopupApplet::conditionIcon() } return d->conditionIcon; } + +} diff --git a/libs/plasmaweather/weatherpopupapplet.h b/libs/plasmaweather/weatherpopupapplet.h index 24bf259f8..dcdcb8a0e 100644 --- a/libs/plasmaweather/weatherpopupapplet.h +++ b/libs/plasmaweather/weatherpopupapplet.h @@ -28,6 +28,7 @@ #include "plasmaweather_export.h" +namespace Plasma { /** * @class WeatherPopupApplet @@ -115,4 +116,6 @@ class PLASMAWEATHER_EXPORT WeatherPopupApplet : public Plasma::Applet, public Pl friend class WeatherPopupAppletPrivate; }; +} + #endif diff --git a/libs/plasmaweather/weathervalidator.cpp b/libs/plasmaweather/weathervalidator.cpp index f24237716..bf4144cad 100644 --- a/libs/plasmaweather/weathervalidator.cpp +++ b/libs/plasmaweather/weathervalidator.cpp @@ -22,6 +22,8 @@ #include #include +namespace Plasma { + class WeatherValidatorPrivate { public: @@ -136,3 +138,4 @@ void WeatherValidator::dataUpdated(const QString &source, const Plasma::DataEngi emit finished(locations); } +} diff --git a/libs/plasmaweather/weathervalidator.h b/libs/plasmaweather/weathervalidator.h index a64bce543..517751060 100644 --- a/libs/plasmaweather/weathervalidator.h +++ b/libs/plasmaweather/weathervalidator.h @@ -24,6 +24,8 @@ #include "plasmaweather_export.h" +namespace Plasma { + /** * @class WeatherValidator * @@ -90,4 +92,6 @@ private: const QScopedPointer d; }; +} + #endif -- GitLab