Commit 5e715b48 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent 8d3fb5a1
......@@ -27,16 +27,16 @@ class QMenu;
namespace MessageList {
namespace Util {
QString messageSortingConfigName();
QString messageSortDirectionConfigName();
QString groupSortingConfigName();
QString groupSortDirectionConfigName();
QString messageUniqueIdConfigName();
QString storageModelSortOrderGroup();
QString storageModelThemesGroup();
QString storageModelAggregationsGroup();
QString setForStorageModelConfigName();
QString storageModelSelectedMessageGroup();
Q_REQUIRED_RESULT QString messageSortingConfigName();
Q_REQUIRED_RESULT QString messageSortDirectionConfigName();
Q_REQUIRED_RESULT QString groupSortingConfigName();
Q_REQUIRED_RESULT QString groupSortDirectionConfigName();
Q_REQUIRED_RESULT QString messageUniqueIdConfigName();
Q_REQUIRED_RESULT QString storageModelSortOrderGroup();
Q_REQUIRED_RESULT QString storageModelThemesGroup();
Q_REQUIRED_RESULT QString storageModelAggregationsGroup();
Q_REQUIRED_RESULT QString setForStorageModelConfigName();
Q_REQUIRED_RESULT QString storageModelSelectedMessageGroup();
void fillViewMenu(QMenu *menu, QObject *receiver);
}
}
......
......@@ -81,7 +81,7 @@ public:
* Returns the current message for the list as Akonadi::Item.
* May return an invalid Item if there is no current message or no current folder.
*/
Akonadi::Item currentItem() const;
Q_REQUIRED_RESULT Akonadi::Item currentItem() const;
/**
* Returns the current message for the list as KMime::Message::Ptr.
......@@ -100,7 +100,7 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
QList<KMime::Message::Ptr > selectionAsMessageList(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT QList<KMime::Message::Ptr > selectionAsMessageList(bool includeCollapsedChildren = true) const;
/**
* Returns the currently selected Items (bound to current StorageModel).
......@@ -113,7 +113,7 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
Akonadi::Item::List selectionAsMessageItemList(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT Akonadi::Item::List selectionAsMessageItemList(bool includeCollapsedChildren = true) const;
/**
* Returns the currently selected Items id(bound to current StorageModel).
......@@ -126,9 +126,9 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren = true) const;
QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren = true) const;
/**
* Returns the Akonadi::Item bound to the current StorageModel that
......@@ -140,7 +140,7 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
Akonadi::Item::List currentThreadAsMessageList() const;
Q_REQUIRED_RESULT Akonadi::Item::List currentThreadAsMessageList() const;
/**
* Selects the next message item in the view.
......@@ -155,7 +155,7 @@ public:
* If loop is true then the "next" algorithm will restart from the beginning
* of the list if the end is reached, otherwise it will just stop returning false.
*/
bool selectNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool selectNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
/**
* Selects the previous message item in the view.
......@@ -170,7 +170,7 @@ public:
* If loop is true then the "previous" algorithm will restart from the end
* of the list if the beginning is reached, otherwise it will just stop returning false.
*/
bool selectPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool selectPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
/**
* Focuses the next message item in the view without actually selecting it.
......@@ -182,7 +182,7 @@ public:
* If loop is true then the "next" algorithm will restart from the beginning
* of the list if the end is reached, otherwise it will just stop returning false.
*/
bool focusNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool focusNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
/**
* Focuses the previous message item in the view without actually selecting it.
......@@ -194,7 +194,7 @@ public:
* If loop is true then the "previous" algorithm will restart from the end
* of the list if the beginning is reached, otherwise it will just stop returning false.
*/
bool focusPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool focusPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
/**
* Selects the currently focused message item. May do nothing if the
......@@ -219,7 +219,7 @@ public:
*
* The function returns true if a message was selected and false otherwise.
*/
bool selectFirstMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
Q_REQUIRED_RESULT bool selectFirstMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
/**
* Selects the last message item in the view that matches the specified Core::MessageTypeFilter.
......@@ -228,7 +228,7 @@ public:
*
* The function returns true if a message was selected and false otherwise.
*/
bool selectLastMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
Q_REQUIRED_RESULT bool selectLastMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
/**
* If expand is true then it expands the current thread, otherwise
......@@ -258,23 +258,23 @@ public:
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
Q_REQUIRED_RESULT QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
*/
QString currentFilterSearchString() const;
Q_REQUIRED_RESULT QString currentFilterSearchString() const;
/**
* Returns true if the current Aggregation is threaded, false otherwise
* (or if there is no current Aggregation).
*/
bool isThreaded() const;
Q_REQUIRED_RESULT bool isThreaded() const;
/**
* Fast function that determines if the selection is empty
*/
bool selectionEmpty() const;
Q_REQUIRED_RESULT bool selectionEmpty() const;
/**
* Fills the lists of the selected message serial numbers and of the selected+visible ones.
* Returns true if the returned stats are valid (there is a current folder after all)
......@@ -284,7 +284,7 @@ public:
* If includeCollapsedChildren is true then the children of the selected but
* collapsed items are also included in the stats
*/
bool getSelectionStats(Akonadi::Item::List &selectedItems, Akonadi::Item::List &selectedVisibleItems, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT bool getSelectionStats(Akonadi::Item::List &selectedItems, Akonadi::Item::List &selectedVisibleItems, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren = true) const;
/**
* Deletes the persistent set pointed by the specified reference.
* If the set does not exist anymore, nothing happens.
......@@ -302,17 +302,17 @@ public:
/**
* Return Akonadi::Item from messageItemReference
*/
Akonadi::Item::List itemListFromPersistentSet(MessageList::Core::MessageItemSetReference ref);
Q_REQUIRED_RESULT Akonadi::Item::List itemListFromPersistentSet(MessageList::Core::MessageItemSetReference ref);
/**
* Return a persistent set from current selection
*/
MessageList::Core::MessageItemSetReference selectionAsPersistentSet(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT MessageList::Core::MessageItemSetReference selectionAsPersistentSet(bool includeCollapsedChildren = true) const;
/**
* Return a persistent set from current thread
*/
MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
Q_REQUIRED_RESULT MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
/**
* Sets the focus on the view of the currently active tab.
*/
......@@ -369,7 +369,7 @@ public:
Core::QuickSearchLine::SearchOptions currentOptions() const;
Akonadi::Collection currentFolder() const;
Q_REQUIRED_RESULT Akonadi::Collection currentFolder() const;
public Q_SLOTS:
/**
......
......@@ -53,31 +53,31 @@ public:
explicit StorageModel(QAbstractItemModel *model, QItemSelectionModel *selectionModel, QObject *parent = nullptr);
~StorageModel() override;
Akonadi::Collection::List displayedCollections() const;
Q_REQUIRED_RESULT Akonadi::Collection::List displayedCollections() const;
QString id() const override;
bool containsOutboundMessages() const override;
Q_REQUIRED_RESULT QString id() const override;
Q_REQUIRED_RESULT bool containsOutboundMessages() const override;
virtual bool isOutBoundFolder(const Akonadi::Collection &c) const;
virtual Q_REQUIRED_RESULT bool isOutBoundFolder(const Akonadi::Collection &c) const;
int initialUnreadRowCountGuess() const override;
bool initializeMessageItem(MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const override;
Q_REQUIRED_RESULT int initialUnreadRowCountGuess() const override;
Q_REQUIRED_RESULT bool initializeMessageItem(MessageList::Core::MessageItem *mi, int row, bool bUseReceiver) const override;
void fillMessageItemThreadingData(MessageList::Core::MessageItem *mi, int row, ThreadingDataSubset subset) const override;
void updateMessageItemData(MessageList::Core::MessageItem *mi, int row) const override;
void setMessageItemStatus(MessageList::Core::MessageItem *mi, int row, Akonadi::MessageStatus status) override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
Q_REQUIRED_RESULT int columnCount(const QModelIndex &parent = QModelIndex()) const override;
Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Q_REQUIRED_RESULT QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
Q_REQUIRED_RESULT QModelIndex parent(const QModelIndex &index) const override;
Q_REQUIRED_RESULT int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QMimeData *mimeData(const QList< MessageList::Core::MessageItem * > &) const override;
using MessageList::Core::StorageModel::mimeData;
Akonadi::Item itemForRow(int row) const;
Akonadi::Collection parentCollectionForRow(int row) const;
KMime::Message::Ptr messageForRow(int row) const;
Q_REQUIRED_RESULT Akonadi::Item itemForRow(int row) const;
Q_REQUIRED_RESULT Akonadi::Collection parentCollectionForRow(int row) const;
Q_REQUIRED_RESULT KMime::Message::Ptr messageForRow(int row) const;
void resetModelStorage();
......
......@@ -66,18 +66,18 @@ public:
* Returns the current message for the list as Akonadi::Item.
* May return an invalid Item if there is no current message or no current folder.
*/
Akonadi::Item currentItem() const;
Q_REQUIRED_RESULT Akonadi::Item currentItem() const;
/**
* Returns the current message for the list as KMime::Message::Ptr.
* May return 0 if there is no current message or no current folder.
*/
KMime::Message::Ptr currentMessage() const;
Q_REQUIRED_RESULT KMime::Message::Ptr currentMessage() const;
/**
* Returns true if this drag can be accepted by the underlying view
*/
bool canAcceptDrag(const QDropEvent *e);
Q_REQUIRED_RESULT bool canAcceptDrag(const QDropEvent *e);
/**
* Selects the next message item in the view.
......@@ -92,7 +92,7 @@ public:
* If loop is true then the "next" algorithm will restart from the beginning
* of the list if the end is reached, otherwise it will just stop returning false.
*/
bool selectNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool selectNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
/**
* Selects the previous message item in the view.
......@@ -107,7 +107,7 @@ public:
* If loop is true then the "previous" algorithm will restart from the end
* of the list if the beginning is reached, otherwise it will just stop returning false.
*/
bool selectPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool selectPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, MessageList::Core::ExistingSelectionBehaviour existingSelectionBehaviour, bool centerItem, bool loop);
/**
* Focuses the next message item in the view without actually selecting it.
......@@ -119,7 +119,7 @@ public:
* If loop is true then the "next" algorithm will restart from the beginning
* of the list if the end is reached, otherwise it will just stop returning false.
*/
bool focusNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool focusNextMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
/**
* Focuses the previous message item in the view without actually selecting it.
......@@ -131,7 +131,7 @@ public:
* If loop is true then the "previous" algorithm will restart from the end
* of the list if the beginning is reached, otherwise it will just stop returning false.
*/
bool focusPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
Q_REQUIRED_RESULT bool focusPreviousMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem, bool loop);
/**
* Selects the currently focused message item. May do nothing if the
......@@ -156,7 +156,7 @@ public:
*
* The function returns true if a message was selected and false otherwise.
*/
bool selectFirstMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
Q_REQUIRED_RESULT bool selectFirstMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
/**
* Selects the last message item in the view that matches the specified Core::MessageTypeFilter.
......@@ -165,7 +165,7 @@ public:
*
* The function returns true if a message was selected and false otherwise.
*/
bool selectLastMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
Q_REQUIRED_RESULT bool selectLastMessageItem(MessageList::Core::MessageTypeFilter messageTypeFilter, bool centerItem);
/**
* Selects all the items in the current folder.
......@@ -207,7 +207,7 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
QList<KMime::Message::Ptr > selectionAsMessageList(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT QList<KMime::Message::Ptr > selectionAsMessageList(bool includeCollapsedChildren = true) const;
/**
* Returns the currently selected Items (bound to current StorageModel).
......@@ -220,7 +220,7 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
Akonadi::Item::List selectionAsMessageItemList(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT Akonadi::Item::List selectionAsMessageItemList(bool includeCollapsedChildren = true) const;
/**
* Returns the currently selected Items id (bound to current StorageModel).
......@@ -234,8 +234,8 @@ public:
* this set of messages at a later stage then take a look at createPersistentSet().
*/
QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren) const;
QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren) const;
Q_REQUIRED_RESULT QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren) const;
Q_REQUIRED_RESULT QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren) const;
/**
* Returns the Akonadi::Item bound to the current StorageModel that
......@@ -247,28 +247,28 @@ public:
* to the main even loop. Don't store it for any longer. If you need to reference
* this set of messages at a later stage then take a look at createPersistentSet().
*/
Akonadi::Item::List currentThreadAsMessageList() const;
Q_REQUIRED_RESULT Akonadi::Item::List currentThreadAsMessageList() const;
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
Q_REQUIRED_RESULT QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
*/
QString currentFilterSearchString() const;
Q_REQUIRED_RESULT QString currentFilterSearchString() const;
/**
* Returns true if the current Aggregation is threaded, false otherwise
* (or if there is no current Aggregation).
*/
bool isThreaded() const;
Q_REQUIRED_RESULT bool isThreaded() const;
/**
* Fast function that determines if the selection is empty
*/
bool selectionEmpty() const;
Q_REQUIRED_RESULT bool selectionEmpty() const;
/**
* Fills the lists of the selected message serial numbers and of the selected+visible ones.
......@@ -280,7 +280,7 @@ public:
* collapsed items are also included in the stats
*/
bool getSelectionStats(Akonadi::Item::List &selectedSernums, Akonadi::Item::List &selectedVisibleSernums, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT bool getSelectionStats(Akonadi::Item::List &selectedSernums, Akonadi::Item::List &selectedVisibleSernums, bool *allSelectedBelongToSameThread, bool includeCollapsedChildren = true) const;
/**
* Deletes the persistent set pointed by the specified reference.
* If the set does not exist anymore, nothing happens.
......@@ -298,18 +298,18 @@ public:
/**
* Return Akonadi::Item from messageItemReference
*/
Akonadi::Item::List itemListFromPersistentSet(MessageList::Core::MessageItemSetReference ref);
Q_REQUIRED_RESULT Akonadi::Item::List itemListFromPersistentSet(MessageList::Core::MessageItemSetReference ref);
/**
* Return a persistent set from current selection
*/
MessageList::Core::MessageItemSetReference selectionAsPersistentSet(bool includeCollapsedChildren = true) const;
Q_REQUIRED_RESULT MessageList::Core::MessageItemSetReference selectionAsPersistentSet(bool includeCollapsedChildren = true) const;
/**
* Return a persistent set from current thread
*/
MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
Akonadi::Collection currentCollection() const;
Q_REQUIRED_RESULT MessageList::Core::MessageItemSetReference currentThreadAsPersistentSet() const;
Q_REQUIRED_RESULT Akonadi::Collection currentCollection() const;
void setQuickSearchClickMessage(const QString &msg);
MessageList::Core::QuickSearchLine::SearchOptions currentOptions() const;
......
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