Commit 106e5190 authored by Laurent Montel's avatar Laurent Montel

Fix compile with strict compile flags

parent 32e54a7d
......@@ -4,7 +4,7 @@ project(itinerary VERSION 0.0.1)
find_package(ECM 5.38 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
include(ECMAddTests)
include(ECMGenerateHeaders)
include(ECMQtDeclareLoggingCategory)
......
......@@ -49,7 +49,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -30,7 +30,7 @@ class CacheTest : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -35,7 +35,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -35,7 +35,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -33,7 +33,7 @@ private:
}
}
private slots:
private Q_SLOTS:
void initTestCase()
{
QStandardPaths::setTestModeEnabled(true);
......
......@@ -29,7 +29,7 @@ using namespace KPublicTransport;
class PublicTransportManagerTest : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -49,7 +49,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
QStandardPaths::setTestModeEnabled(true);
......
......@@ -64,7 +64,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("TZ", "UTC");
......
......@@ -47,7 +47,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("LC_ALL", "en_US.utf-8");
......
......@@ -41,7 +41,7 @@ private:
return f.readAll();
}
private slots:
private Q_SLOTS:
void initTestCase()
{
qputenv("LC_ALL", "en_US.utf-8");
......
......@@ -33,7 +33,7 @@
class WeatherTest : public QObject
{
Q_OBJECT
private slots:
private Q_SLOTS:
void initTestCase()
{
QCoreApplication::setApplicationName(QStringLiteral("kde-itinerary-weatherunittest"));
......
......@@ -62,7 +62,7 @@ public:
bool hasClipboardContent() const;
signals:
Q_SIGNALS:
void clipboardContentChanged();
private:
......
......@@ -57,11 +57,11 @@ public:
Q_INVOKABLE QVariant arrival(const QString &resId);
Q_INVOKABLE QVariant departure(const QString &resId);
public slots:
public Q_SLOTS:
/** Checks all applicable elements for updates. */
void checkForUpdates();
signals:
Q_SIGNALS:
void arrivalUpdated(const QString &resId);
void departureUpdated(const QString &resId);
......
......@@ -52,7 +52,7 @@ public:
static QDateTime relevantDate(KPkPass::Pass *pass);
signals:
Q_SIGNALS:
void passAdded(const QString &passId);
void passUpdated(const QString &passId, const QStringList &changes);
void passRemoved(const QString &passId);
......
......@@ -48,7 +48,7 @@ public:
void importReservation(const QByteArray &data);
void importReservations(const QVector<QVariant> &resData);
signals:
Q_SIGNALS:
void reservationAdded(const QString &id);
void reservationUpdated(const QString &id);
void reservationRemoved(const QString &id);
......
......@@ -43,7 +43,7 @@ public:
bool allowInsecureServices() const;
void setAllowInsecureServices(bool allowInsecure);
signals:
Q_SIGNALS:
void weatherForecastEnabledChanged(bool enabled);
void homeCountryIsoCodeChanged(const QString &isoCode);
void queryLiveDataChanged(bool enabled);
......
......@@ -30,7 +30,7 @@ public:
explicit SolidBrightnessBackend(QObject *parent = nullptr);
virtual ~SolidBrightnessBackend();
virtual void maxBrightness();
void maxBrightness() override;
private:
OrgKdeSolidPowerManagementActionsBrightnessControlInterface *m_iface;
......
......@@ -99,7 +99,7 @@ public:
// for unit testing
void setCurrentDateTime(const QDateTime &dt);
signals:
Q_SIGNALS:
void todayRowChanged();
private:
......
......@@ -41,7 +41,7 @@ public:
static void clear(); // for testing only!
signals:
Q_SIGNALS:
void tripGroupAdded(const QString &id);
void tripGroupChanged(const QString &id);
void tripGroupRemoved(const QString &id);
......
......@@ -42,7 +42,7 @@ public:
// "override" from TimelineModel
int todayRow();
signals:
Q_SIGNALS:
void todayRowChanged();
private:
......
......@@ -551,7 +551,7 @@ void HafasMgateBackend::setLineModeMap(const QJsonObject& obj)
std::unordered_map<int, Line::Mode> modeMap;
for (auto it = obj.begin(); it != obj.end(); ++it) {
modeMap[it.key().toInt()] = static_cast<Line::Mode>(me.keyToValue(it.value().toString().toUtf8()));
modeMap[it.key().toInt()] = static_cast<Line::Mode>(me.keyToValue(it.value().toString().toUtf8().constData()));
}
m_parser.setLineModeMap(std::move(modeMap));
}
......
......@@ -114,7 +114,7 @@ static QVariant variantFromJson(const QJsonValue &v, int mt)
void Json::fromJson(const QMetaObject *mo, const QJsonObject &obj, void *elem)
{
for (auto it = obj.begin(); it != obj.end(); ++it) {
const auto idx = mo->indexOfProperty(it.key().toUtf8());
const auto idx = mo->indexOfProperty(it.key().toUtf8().constData());
if (idx < 0) {
continue;
}
......
......@@ -116,7 +116,7 @@ static void applyBackendOptions(AbstractBackend *backend, const QMetaObject *mo,
{
const auto opts = obj.value(QLatin1String("options")).toObject();
for (auto it = opts.begin(); it != opts.end(); ++it) {
const auto idx = mo->indexOfProperty(it.key().toUtf8());
const auto idx = mo->indexOfProperty(it.key().toUtf8().constData());
const auto mp = mo->property(idx);
if (it.value().isObject()) {
mp.writeOnGadget(backend, it.value().toObject());
......
......@@ -60,7 +60,7 @@ public:
*/
void setTestModeEnabled(bool testMode);
signals:
Q_SIGNALS:
/** Updated when new forecast data has been retrieved. */
void forecastUpdated();
......
......@@ -90,7 +90,7 @@ public:
QQmlEngine *engine = nullptr;
signals:
Q_SIGNALS:
void loadingChanged();
void errorMessageChanged();
......
......@@ -90,7 +90,7 @@ public:
QQmlEngine *engine = nullptr;
signals:
Q_SIGNALS:
void loadingChanged();
void errorMessageChanged();
......
......@@ -87,7 +87,7 @@ public:
QQmlEngine *engine = nullptr;
signals:
Q_SIGNALS:
void loadingChanged();
void errorMessageChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment