Commit 303ae9b2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

QVector++

parent f26dfbf8
......@@ -268,8 +268,8 @@ QString MessageComposer::Util::cleanedUpHeaderString(const QString &s)
void MessageComposer::Util::addSendReplyForwardAction(const KMime::Message::Ptr &message, MailTransport::MessageQueueJob *qjob)
{
QList<Akonadi::Item::Id> originalMessageId;
QList<Akonadi::MessageStatus> linkStatus;
QVector<Akonadi::Item::Id> originalMessageId;
QVector<Akonadi::MessageStatus> linkStatus;
if (MessageComposer::Util::getLinkInformation(message, originalMessageId, linkStatus)) {
for (Akonadi::Item::Id id : qAsConst(originalMessageId)) {
if (linkStatus.first() == Akonadi::MessageStatus::statusReplied()) {
......@@ -377,7 +377,7 @@ void MessageComposer::Util::addLinkInformation(const KMime::Message::Ptr &msg, A
msg->setHeader(header);
}
bool MessageComposer::Util::getLinkInformation(const KMime::Message::Ptr &msg, QList<Akonadi::Item::Id> &id, QList<Akonadi::MessageStatus> &status)
bool MessageComposer::Util::getLinkInformation(const KMime::Message::Ptr &msg, QVector<Akonadi::Item::Id> &id, QVector<Akonadi::MessageStatus> &status)
{
auto hrdLinkMsg = msg->headerByType("X-KMail-Link-Message");
auto hrdLinkType = msg->headerByType("X-KMail-Link-Type");
......
......@@ -66,7 +66,7 @@ MESSAGECOMPOSER_EXPORT void addLinkInformation(const KMime::Message::Ptr &messag
* @param status Will contain the status (replied or forwarded) that linked the message to the original message.
* @returns Whether the mail contains valid link information or not.
*/
Q_REQUIRED_RESULT MESSAGECOMPOSER_EXPORT bool getLinkInformation(const KMime::Message::Ptr &msg, QList<Akonadi::Item::Id> &id, QList<Akonadi::MessageStatus> &status);
Q_REQUIRED_RESULT MESSAGECOMPOSER_EXPORT bool getLinkInformation(const KMime::Message::Ptr &msg, QVector<Akonadi::Item::Id> &id, QVector<Akonadi::MessageStatus> &status);
/**
* Returns whether the item represents a valid KMime::Message that is not
......
......@@ -23,7 +23,7 @@
class QDataStream;
#include <QList>
#include <QVector>
#include <QPair>
#include <QString>
......
......@@ -54,7 +54,7 @@ public:
/**
* Returns the currently set status mask
*/
Q_REQUIRED_RESULT QList<Akonadi::MessageStatus> status() const
Q_REQUIRED_RESULT QVector<Akonadi::MessageStatus> status() const
{
return mStatus;
}
......@@ -62,7 +62,7 @@ public:
/**
* Sets the status mask for this filter.
*/
void setStatus(const QList<Akonadi::MessageStatus> &lstStatus)
void setStatus(const QVector<Akonadi::MessageStatus> &lstStatus)
{
mStatus = lstStatus;
}
......@@ -118,7 +118,7 @@ Q_SIGNALS:
private:
bool containString(const QString &searchInString) const;
QList<Akonadi::MessageStatus> mStatus; ///< Messages must match these statuses, if non 0
QVector<Akonadi::MessageStatus> mStatus; ///< Messages must match these statuses, if non 0
QString mSearchString; ///< Messages must match this search string, if not empty
QString mTagId; ///< Messages must have this tag, if not empty. Contains a tag url.
Akonadi::Collection mCurrentFolder;
......
......@@ -2691,7 +2691,7 @@ void View::focusQuickSearch(const QString &selectedText)
d->mWidget->focusQuickSearch(selectedText);
}
QList<Akonadi::MessageStatus> View::currentFilterStatus() const
QVector<Akonadi::MessageStatus> View::currentFilterStatus() const
{
return d->mWidget->currentFilterStatus();
}
......
......@@ -337,7 +337,7 @@ public:
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QList<Akonadi::MessageStatus> currentFilterStatus() const;
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
......
......@@ -239,12 +239,12 @@ MessageList::Core::QuickSearchLine::SearchOptions Widget::currentOptions() const
return d->quickSearchLine->searchOptions();
}
QList<Akonadi::MessageStatus> Widget::currentFilterStatus() const
QVector<Akonadi::MessageStatus> Widget::currentFilterStatus() const
{
if (d->mFilter) {
return d->mFilter->status();
}
return QList<Akonadi::MessageStatus>();
return QVector<Akonadi::MessageStatus>();
}
QString Widget::currentFilterSearchString() const
......
......@@ -90,7 +90,7 @@ public:
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QList<Akonadi::MessageStatus> currentFilterStatus() const;
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
......
......@@ -135,13 +135,13 @@ void QuickSearchLine::resetFilter()
mSearchEdit->setLocked(false);
}
void QuickSearchLine::slotFilterActionChanged(const QList<Akonadi::MessageStatus> &lst)
void QuickSearchLine::slotFilterActionChanged(const QVector<Akonadi::MessageStatus> &lst)
{
mLstStatus = lst;
Q_EMIT statusButtonsClicked();
}
QList<Akonadi::MessageStatus> QuickSearchLine::status() const
QVector<Akonadi::MessageStatus> QuickSearchLine::status() const
{
return mLstStatus;
}
......
......@@ -61,7 +61,7 @@ public:
Q_REQUIRED_RESULT SearchLineStatus *searchEdit() const;
Q_REQUIRED_RESULT QToolButton *openFullSearchButton() const;
void resetFilter();
Q_REQUIRED_RESULT QList<Akonadi::MessageStatus> status() const;
Q_REQUIRED_RESULT QVector<Akonadi::MessageStatus> status() const;
void updateComboboxVisibility();
......@@ -83,11 +83,11 @@ protected:
private Q_SLOTS:
void slotSearchEditTextEdited(const QString &text);
void slotClearButtonClicked();
void slotFilterActionChanged(const QList<Akonadi::MessageStatus> &lst);
void slotFilterActionChanged(const QVector<Akonadi::MessageStatus> &lst);
private:
SearchLineStatus *mSearchEdit = nullptr;
QComboBox *mTagFilterCombo = nullptr;
QList<Akonadi::MessageStatus> mLstStatus;
QVector<Akonadi::MessageStatus> mLstStatus;
};
}
}
......
......@@ -138,7 +138,7 @@ void SearchLineStatus::slotToggledLockAction()
void SearchLineStatus::updateFilters()
{
QList<Akonadi::MessageStatus> lstStatus;
QVector<Akonadi::MessageStatus> lstStatus;
for (QAction *act : qAsConst(mFilterListActions)) {
if (act->isChecked()) {
......
......@@ -45,7 +45,7 @@ public:
void slotClearHistory();
void clearFilterButtonClicked();
Q_SIGNALS:
void filterActionChanged(const QList<Akonadi::MessageStatus> &lst);
void filterActionChanged(const QVector<Akonadi::MessageStatus> &lst);
void searchOptionChanged();
void clearButtonClicked();
void forceLostFocus();
......
......@@ -901,11 +901,11 @@ Akonadi::Item::List Pane::selectionAsMessageItemList(bool includeCollapsedChildr
return w->selectionAsMessageItemList(includeCollapsedChildren);
}
QList<Akonadi::Item::Id> Pane::selectionAsListMessageId(bool includeCollapsedChildren) const
QVector<Akonadi::Item::Id> Pane::selectionAsListMessageId(bool includeCollapsedChildren) const
{
Widget *w = static_cast<Widget *>(currentWidget());
if (w == nullptr) {
return QList<Akonadi::Item::Id>();
return QVector<Akonadi::Item::Id>();
}
return w->selectionAsListMessageId(includeCollapsedChildren);
}
......@@ -953,11 +953,11 @@ void Pane::markMessageItemsAsAboutToBeRemoved(MessageList::Core::MessageItemSetR
}
}
QList<Akonadi::MessageStatus> Pane::currentFilterStatus() const
QVector<Akonadi::MessageStatus> Pane::currentFilterStatus() const
{
Widget *w = static_cast<Widget *>(currentWidget());
if (w == nullptr) {
return QList<Akonadi::MessageStatus>();
return QVector<Akonadi::MessageStatus>();
}
return w->currentFilterStatus();
}
......
......@@ -128,7 +128,7 @@ public:
*/
QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren = true) const;
QList<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren = true) const;
QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren = true) const;
/**
* Returns the Akonadi::Item bound to the current StorageModel that
......@@ -258,7 +258,7 @@ public:
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QList<Akonadi::MessageStatus> currentFilterStatus() const;
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
......
......@@ -611,9 +611,9 @@ QVector<qlonglong> Widget::selectionAsMessageItemListId(bool includeCollapsedChi
return lstMiPtr;
}
QList<Akonadi::Item::Id> Widget::selectionAsListMessageId(bool includeCollapsedChildren) const
QVector<Akonadi::Item::Id> Widget::selectionAsListMessageId(bool includeCollapsedChildren) const
{
QList<qlonglong> lstMiPtr;
QVector<qlonglong> lstMiPtr;
const QList<Core::MessageItem *> lstMi = view()->selectionAsMessageItemList(includeCollapsedChildren);
if (lstMi.isEmpty()) {
return lstMiPtr;
......@@ -644,7 +644,7 @@ MessageList::Core::QuickSearchLine::SearchOptions Widget::currentOptions() const
return view()->currentOptions();
}
QList<Akonadi::MessageStatus> Widget::currentFilterStatus() const
QVector<Akonadi::MessageStatus> Widget::currentFilterStatus() const
{
return view()->currentFilterStatus();
}
......
......@@ -235,7 +235,7 @@ public:
*/
QVector<qlonglong> selectionAsMessageItemListId(bool includeCollapsedChildren) const;
QList<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren) const;
QVector<Akonadi::Item::Id> selectionAsListMessageId(bool includeCollapsedChildren) const;
/**
* Returns the Akonadi::Item bound to the current StorageModel that
......@@ -252,7 +252,7 @@ public:
/**
* Returns the Akonadi::MessageStatus in the current quicksearch field.
*/
QList<Akonadi::MessageStatus> currentFilterStatus() const;
QVector<Akonadi::MessageStatus> currentFilterStatus() const;
/**
* Returns the search term in the current quicksearch field.
......
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