Commit 46fc4898 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warnings

parent 0cfb501d
Pipeline #78530 passed with stage
in 9 minutes and 45 seconds
......@@ -73,7 +73,7 @@ Q_SIGNALS:
void selected(const QVector<QDate>& dates);
void newAlarm(EditAlarmDlg::Type);
void newAlarmFromTemplate(const KAEvent&);
void newAlarmFromTemplate(const KAlarmCal::KAEvent&);
protected:
bool event(QEvent*) override;
......
......@@ -1059,7 +1059,7 @@ void editNewAlarm(EditAlarmDlg::Type type, QWidget* parent)
{
editNewAlarm(type, QDate(), parent);
}
void editNewAlarm(EditAlarmDlg::Type type, const QDate& startDate, QWidget* parent)
void editNewAlarm(EditAlarmDlg::Type type, QDate startDate, QWidget* parent)
{
EditAlarmDlg* editDlg = EditAlarmDlg::create(false, type, parent);
if (editDlg)
......@@ -1118,7 +1118,7 @@ void editNewAlarm(const KAEvent& preset, const QDate& startDate, QWidget* parent
/******************************************************************************
* Common code for editNewAlarm() variants.
*/
void execNewAlarmDlg(EditAlarmDlg* editDlg, const QDate& startDate)
void execNewAlarmDlg(EditAlarmDlg* editDlg, QDate startDate)
{
if (startDate.isValid())
{
......@@ -1872,7 +1872,7 @@ bool convertTimeString(const QByteArray& timeString, KADateTime& dateTime, const
* "UTC". If no time zone is specified, it defaults to the local time zone.
* If 'defaultDt' is valid, it supplies the time spec and default date.
*/
KADateTime applyTimeZone(const QString& tzstring, const QDate& date, const QTime& time,
KADateTime applyTimeZone(const QString& tzstring, QDate date, QTime time,
bool haveTime, const KADateTime& defaultDt)
{
bool error = false;
......
......@@ -75,7 +75,7 @@ MainWindow* displayMainWindowSelected(const QString& eventId);
bool editNewAlarm(const QString& templateName, QWidget* parent = nullptr);
void editNewAlarm(EditAlarmDlg::Type, QWidget* parent = nullptr);
void editNewAlarm(EditAlarmDlg::Type, const QDate& startDate, QWidget* parent = nullptr);
void editNewAlarm(EditAlarmDlg::Type, QDate startDate, QWidget* parent = nullptr);
void editNewAlarm(KAEvent::SubAction, QWidget* parent = nullptr, const AlarmText* = nullptr);
void editNewAlarm(const KAEvent& preset, QWidget* parent = nullptr);
void editNewAlarm(const KAEvent& preset, const QDate& startDate, QWidget* parent = nullptr);
......@@ -86,7 +86,7 @@ void viewAlarm(const KAEvent&, QWidget* parent = nullptr);
void editNewTemplate(EditAlarmDlg::Type, QWidget* parent = nullptr);
void editNewTemplate(const KAEvent& preset, QWidget* parent = nullptr);
void editTemplate(KAEvent&, QWidget* parent = nullptr);
void execNewAlarmDlg(EditAlarmDlg*, const QDate& startDate = QDate());
void execNewAlarmDlg(EditAlarmDlg*, QDate startDate = QDate());
/** Create a "New From Template" QAction */
KToggleAction* createAlarmEnableAction(QObject* parent);
QAction* createStopPlayAction(QObject* parent);
......@@ -309,7 +309,7 @@ bool setRtcWakeTime(unsigned triggerTime, QWidget* parent);
bool convertTimeString(const QByteArray& timeString, KADateTime& dateTime,
const KADateTime& defaultDt = KADateTime(), bool allowTZ = true);
KADateTime applyTimeZone(const QString& tzstring, const QDate& date, const QTime& time,
KADateTime applyTimeZone(const QString& tzstring, QDate date, QTime time,
bool haveTime, const KADateTime& defaultDt = KADateTime());
#ifndef NDEBUG
......
......@@ -116,7 +116,7 @@ public Q_SLOTS:
void processQueue();
void setAlarmsEnabled(bool);
void purgeNewArchivedDefault(const Resource&);
void atLoginEventAdded(const KAEvent&);
void atLoginEventAdded(const KAlarmCal::KAEvent&);
void notifyAudioStopped() { notifyAudioPlaying(false); }
void stopAudio();
void spreadWindows(bool);
......@@ -140,7 +140,7 @@ private Q_SLOTS:
void changeStartOfDay();
void slotWorkTimeChanged(const QTime& start, const QTime& end, const QBitArray& days);
void slotHolidaysChanged(const KHolidays::HolidayRegion&);
void slotFeb29TypeChanged(Feb29Type);
void slotFeb29TypeChanged(KAlarmApp::Feb29Type);
void slotResourcesTimeout();
void slotResourcesCreated();
void slotEditAlarmById();
......
......@@ -330,7 +330,7 @@ void Preferences::holidaysChange(const QString& regionCode)
Q_EMIT mInstance->holidaysChanged(holidays());
}
void Preferences::setStartOfDay(const QTime& t)
void Preferences::setStartOfDay(QTime t)
{
if (t != self()->mBase_StartOfDay.time())
{
......
......@@ -56,12 +56,12 @@ public:
static const KHolidays::HolidayRegion& holidays();
static void setHolidayRegion(const QString& regionCode);
static QTime startOfDay() { return self()->mBase_StartOfDay.time(); }
static void setStartOfDay(const QTime&);
static void setStartOfDay(QTime);
static QTime workDayStart() { return self()->mBase_WorkDayStart.time(); }
static QTime workDayEnd() { return self()->mBase_WorkDayEnd.time(); }
static QBitArray workDays();
static void setWorkDayStart(const QTime& t) { self()->setBase_WorkDayStart(QDateTime(QDate(1900,1,1), t)); }
static void setWorkDayEnd(const QTime& t) { self()->setBase_WorkDayEnd(QDateTime(QDate(1900,1,1), t)); }
static void setWorkDayStart(QTime t) { self()->setBase_WorkDayStart(QDateTime(QDate(1900,1,1), t)); }
static void setWorkDayEnd(QTime t) { self()->setBase_WorkDayEnd(QDateTime(QDate(1900,1,1), t)); }
static void setWorkDays(const QBitArray&);
static bool quitWarn() { return mUsingDefaults ? self()->base_QuitWarn() : notifying(QUIT_WARN); }
static void setQuitWarn(bool yes) { setNotify(QUIT_WARN, yes); }
......
......@@ -155,9 +155,9 @@ protected:
private Q_SLOTS:
void slotResourceSettingsChanged(Resource&, ResourceType::Changes);
void slotResourceRemoved(ResourceId);
void slotEventUpdated(Resource&, const KAEvent&);
void slotEventsRemoved(Resource&, const QList<KAEvent>&);
void slotResourceRemoved(KAlarmCal::ResourceId);
void slotEventUpdated(Resource&, const KAlarmCal::KAEvent&);
void slotEventsRemoved(Resource&, const QList<KAlarmCal::KAEvent>&);
private:
static AlarmListModel* mAllInstance;
......
......@@ -66,7 +66,7 @@ public:
static bool modifyEvent(const EventId& oldEventId, KAEvent& newEvent);
static KAEvent updateEvent(const KAEvent&, bool saveIfReadOnly = true);
static bool deleteEvent(const KAEvent&, Resource&, bool save = false);
static void purgeEvents(const QVector<KAEvent>&);
static void purgeEvents(const QVector<KAlarmCal::KAEvent>&);
static ResourcesCalendar* instance() { return mInstance; }
Q_SIGNALS:
......@@ -78,9 +78,9 @@ private Q_SLOTS:
void slotResourceSettingsChanged(Resource&, ResourceType::Changes);
void slotResourcesPopulated();
void slotResourceAdded(Resource&);
void slotEventsAdded(Resource&, const QList<KAEvent>&);
void slotEventsToBeRemoved(Resource&, const QList<KAEvent>&);
void slotEventUpdated(Resource&, const KAEvent&);
void slotEventsAdded(Resource&, const QList<KAlarmCal::KAEvent>&);
void slotEventsToBeRemoved(Resource&, const QList<KAlarmCal::KAEvent>&);
void slotEventUpdated(Resource&, const KAlarmCal::KAEvent&);
private:
ResourcesCalendar();
static CalEvent::Type deleteEventInternal(const KAlarmCal::KAEvent&, Resource&, bool deleteFromResource = true);
......
......@@ -19,7 +19,7 @@ class RtcWakeAction : public QObject
RtcWakeAction();
public Q_SLOTS:
ActionReply settimer(const QVariantMap& args);
KAuth::ActionReply settimer(const QVariantMap& args);
};
......
Supports Markdown
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