Commit f0285f29 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent f4cd8126
...@@ -1351,16 +1351,17 @@ bool ActionManager::handleCommandLine(const QStringList &args) ...@@ -1351,16 +1351,17 @@ bool ActionManager::handleCommandLine(const QStringList &args)
mainWindow->topLevelWidget()->show(); mainWindow->topLevelWidget()->show();
// Check for import, merge or ask // Check for import, merge or ask
const QStringList argList = parser.positionalArguments();
if (parser.isSet(QStringLiteral("import"))) { if (parser.isSet(QStringLiteral("import"))) {
for (const QString &url : parser.positionalArguments()) { for (const QString &url : argList) {
importURL(QUrl::fromUserInput(url), /*merge=*/false); importURL(QUrl::fromUserInput(url), /*merge=*/false);
} }
} else if (parser.isSet(QStringLiteral("merge"))) { } else if (parser.isSet(QStringLiteral("merge"))) {
for (const QString &url : parser.positionalArguments()) { for (const QString &url : argList) {
importURL(QUrl::fromUserInput(url), /*merge=*/true); importURL(QUrl::fromUserInput(url), /*merge=*/true);
} }
} else { } else {
for (const QString &url : parser.positionalArguments()) { for (const QString &url : argList) {
mainWindow->actionManager()->importCalendar(QUrl::fromUserInput(url)); mainWindow->actionManager()->importCalendar(QUrl::fromUserInput(url));
} }
} }
......
...@@ -342,8 +342,8 @@ QDate CalendarView::activeDate(bool fallbackToToday) ...@@ -342,8 +342,8 @@ QDate CalendarView::activeDate(bool fallbackToToday)
// Try the view's selectedIncidenceDates() // Try the view's selectedIncidenceDates()
if (!curView->selectedIncidenceDates().isEmpty()) { if (!curView->selectedIncidenceDates().isEmpty()) {
if (curView->selectedIncidenceDates().first().isValid()) { if (curView->selectedIncidenceDates().constFirst().isValid()) {
return curView->selectedIncidenceDates().first(); return curView->selectedIncidenceDates().constFirst();
} }
} }
} }
...@@ -352,7 +352,7 @@ QDate CalendarView::activeDate(bool fallbackToToday) ...@@ -352,7 +352,7 @@ QDate CalendarView::activeDate(bool fallbackToToday)
if (fallbackToToday) { if (fallbackToToday) {
return QDate::currentDate(); return QDate::currentDate();
} else { } else {
return mDateNavigator->selectedDates().first(); return mDateNavigator->selectedDates().constFirst();
} }
} }
......
...@@ -80,6 +80,7 @@ using namespace KOrg; ...@@ -80,6 +80,7 @@ using namespace KOrg;
class CalendarViewExtension : public QWidget class CalendarViewExtension : public QWidget
{ {
Q_OBJECT
public: public:
explicit CalendarViewExtension(QWidget *parent) : QWidget(parent) {} explicit CalendarViewExtension(QWidget *parent) : QWidget(parent) {}
......
...@@ -34,6 +34,7 @@ namespace KOrg ...@@ -34,6 +34,7 @@ namespace KOrg
class Part : public KParts::Part class Part : public KParts::Part
{ {
Q_OBJECT
public: public:
static int interfaceVersion() static int interfaceVersion()
{ {
......
...@@ -31,6 +31,7 @@ class KAboutData; ...@@ -31,6 +31,7 @@ class KAboutData;
class SpecialdatesPlugin : public KontactInterface::Plugin class SpecialdatesPlugin : public KontactInterface::Plugin
{ {
Q_OBJECT
public: public:
SpecialdatesPlugin(KontactInterface::Core *core, const QVariantList &); SpecialdatesPlugin(KontactInterface::Core *core, const QVariantList &);
~SpecialdatesPlugin(); ~SpecialdatesPlugin();
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
class KORGANIZER_CORE_EXPORT KOPrefs : public KOPrefsBase class KORGANIZER_CORE_EXPORT KOPrefs : public KOPrefsBase
{ {
Q_OBJECT
public: public:
virtual ~KOPrefs(); virtual ~KOPrefs();
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
class MyDesignerFields : public KCMDesignerFields class MyDesignerFields : public KCMDesignerFields
{ {
Q_OBJECT
public: public:
MyDesignerFields() : KCMDesignerFields(Q_NULLPTR) {} MyDesignerFields() : KCMDesignerFields(Q_NULLPTR) {}
QString localUiDir() Q_DECL_OVERRIDE { QString localUiDir() Q_DECL_OVERRIDE {
...@@ -63,3 +64,6 @@ int main(int argc, char **argv) ...@@ -63,3 +64,6 @@ int main(int argc, char **argv)
app.exec(); app.exec();
delete kcm; delete kcm;
} }
#include "testkcmdesignerfields.moc"
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