Commit 37d9a6ed authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT + const'ify method + remove return value

when unused
parent 32fbc310
Pipeline #78993 passed with stage
in 26 minutes and 14 seconds
......@@ -1151,7 +1151,7 @@ void KMKernel::init()
connect(Akonadi::ServerManager::self(), &Akonadi::ServerManager::stateChanged, this, &KMKernel::akonadiStateChanged);
}
bool KMKernel::doSessionManagement()
void KMKernel::doSessionManagement()
{
// Do session management
if (qApp->isSessionRestored()) {
......@@ -1163,9 +1163,7 @@ bool KMKernel::doSessionManagement()
}
++n;
}
return true; // we were restored by SM
}
return false; // no, we were not restored
}
bool KMKernel::firstInstance() const
......@@ -1484,7 +1482,7 @@ bool KMKernel::selectFolder(const QString &folder)
return false;
}
KMMainWidget *KMKernel::getKMMainWidget()
KMMainWidget *KMKernel::getKMMainWidget() const
{
// This could definitely use a speadup
const QWidgetList l = QApplication::topLevelWidgets();
......@@ -1561,7 +1559,7 @@ bool KMKernel::canQueryClose()
return mUnityServiceManager->canQueryClose();
}
Akonadi::Collection KMKernel::currentCollection()
Akonadi::Collection KMKernel::currentCollection() const
{
KMMainWidget *widget = getKMMainWidget();
Akonadi::Collection col;
......
......@@ -382,8 +382,8 @@ public:
void closeAllKMailWindows();
void cleanup();
void quit();
bool doSessionManagement();
bool firstInstance() const;
void doSessionManagement();
Q_REQUIRED_RESULT bool firstInstance() const;
void setFirstInstance(bool value);
void action(bool mailto,
bool check,
......@@ -420,15 +420,15 @@ public:
/** Expire all folders, used for the gui action */
void expireAllFoldersNow();
bool firstStart() const;
bool shuttingDown() const;
Q_REQUIRED_RESULT bool firstStart() const;
Q_REQUIRED_RESULT bool shuttingDown() const;
void setShuttingDown(bool flag);
/** Returns true if we have a system tray applet. This is needed in order
* to know whether the application should be allowed to exit in case the
* last visible composer or separate message window is closed.
*/
bool haveSystemTrayApplet() const;
Q_REQUIRED_RESULT bool haveSystemTrayApplet() const;
QTextCodec *networkCodec() const;
......@@ -436,18 +436,18 @@ public:
KMainWindow *mainWin();
/** Get first mainwidget */
KMMainWidget *getKMMainWidget();
KMMainWidget *getKMMainWidget() const;
/**
* Returns a list of all currently loaded folders. Since folders are loaded async, this
* is empty at startup.
*/
Akonadi::Collection::List allFolders() const;
Q_REQUIRED_RESULT Akonadi::Collection::List allFolders() const;
/**
* Includes all subfolders of @p col, including the @p col itself.
*/
Akonadi::Collection::List subfolders(const Akonadi::Collection &col) const;
Q_REQUIRED_RESULT Akonadi::Collection::List subfolders(const Akonadi::Collection &col) const;
//
void selectCollectionFromId(Akonadi::Collection::Id id);
......@@ -463,7 +463,7 @@ public:
qreal closeToQuotaThreshold() override;
Akonadi::Collection::Id lastSelectedFolder() override;
Q_REQUIRED_RESULT Akonadi::Collection::Id lastSelectedFolder() override;
void setLastSelectedFolder(Akonadi::Collection::Id col) override;
QStringList customTemplates() override;
......@@ -481,7 +481,7 @@ public:
void toggleSystemTray();
FolderArchiveManager *folderArchiveManager() const;
bool allowToDebug() const;
Q_REQUIRED_RESULT bool allowToDebug() const;
Akonadi::Search::PIM::IndexedItems *indexedItems() const;
......@@ -552,7 +552,7 @@ private Q_SLOTS:
private:
void viewMessage(const QUrl &url);
Akonadi::Collection currentCollection();
Akonadi::Collection currentCollection() const;
/*
* Fills a composer cWin
......
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