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