Commit 70d201ec authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing Q_REQUIRED_RESULT

parent 93a01873
Pipeline #99047 passed with stage
in 23 minutes and 14 seconds
......@@ -55,8 +55,8 @@ public:
bool isMatching(const Akonadi::Item &item, const MailCommon::MailFilter *filter);
void beginFiltering(const Akonadi::Item &item) const;
void endFiltering(const Akonadi::Item &item) const;
bool atLeastOneFilterAppliesTo(const QString &accountId) const;
bool atLeastOneIncomingFilterAppliesTo(const QString &accountId) const;
Q_REQUIRED_RESULT bool atLeastOneFilterAppliesTo(const QString &accountId) const;
Q_REQUIRED_RESULT bool atLeastOneIncomingFilterAppliesTo(const QString &accountId) const;
FilterManager *const q;
QVector<MailCommon::MailFilter *> mFilters;
QMap<QString, SearchRule::RequiredPart> mRequiredParts;
......
......@@ -36,7 +36,7 @@ public:
{
}
QVariant data(const QModelIndex &index, int role) const override
Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role) const override
{
if (role == Qt::CheckStateRole) {
// Make top-level collections uncheckable
......@@ -49,7 +49,7 @@ public:
return QSortFilterProxyModel::data(index, role);
}
Qt::ItemFlags flags(const QModelIndex &index) const override
Q_REQUIRED_RESULT Qt::ItemFlags flags(const QModelIndex &index) const override
{
// Make top-level collections uncheckable
const auto col = data(index, Akonadi::EntityTreeModel::CollectionRole).value<Akonadi::Collection>();
......@@ -60,7 +60,7 @@ public:
}
}
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
Q_REQUIRED_RESULT bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
{
// Hide ourselves
const auto sourceIndex = sourceModel()->index(source_row, 0, source_parent);
......
......@@ -31,7 +31,7 @@ public:
Attachment(QTreeWidget *parent, KTNEFAttach *attach);
~Attachment() override;
KTNEFAttach *getAttachment() const
Q_REQUIRED_RESULT KTNEFAttach *getAttachment() const
{
return mAttach;
}
......
......@@ -33,12 +33,12 @@ public:
setFlags(Qt::ItemIsEnabled | Qt::ItemIsUserCheckable);
}
KPluginInfo pluginInfo() const
Q_REQUIRED_RESULT KPluginInfo pluginInfo() const
{
return mInfo;
}
virtual QString text(int column) const
Q_REQUIRED_RESULT virtual QString text(int column) const
{
if (column == 0) {
return mInfo.name();
......
......@@ -45,7 +45,7 @@ public:
}
}
QVariant data(const QModelIndex &index, int role) const override
Q_REQUIRED_RESULT QVariant data(const QModelIndex &index, int role) const override
{
if (role == Qt::CheckStateRole) {
if (index.isValid() && index.column() == 0) {
......@@ -70,7 +70,7 @@ public:
return QSortFilterProxyModel::setData(index, data, role);
}
Qt::ItemFlags flags(const QModelIndex &index) const override
Q_REQUIRED_RESULT Qt::ItemFlags flags(const QModelIndex &index) const override
{
if (index.isValid() && index.column() == 0) {
return QSortFilterProxyModel::flags(index) | Qt::ItemIsUserCheckable;
......@@ -80,7 +80,7 @@ public:
}
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
Q_REQUIRED_RESULT bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
{
const QModelIndex source_idx = sourceModel()->index(source_row, 0, source_parent);
const qint64 colId = sourceModel()->data(source_idx, Akonadi::EntityTreeModel::CollectionIdRole).toLongLong();
......@@ -88,7 +88,7 @@ protected:
}
private:
qint64 collectionIdForIndex(const QModelIndex &index) const
Q_REQUIRED_RESULT qint64 collectionIdForIndex(const QModelIndex &index) const
{
return data(index, Akonadi::EntityTreeModel::CollectionIdRole).toLongLong();
}
......
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