Commit 83a7ed03 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port QLinkedList to QVector, we don't need to insert/replace etc here so

QVector is enough
parent d23b8936
...@@ -54,7 +54,7 @@ public: ...@@ -54,7 +54,7 @@ public:
bool keepParentsVisible; bool keepParentsVisible;
QString search; QString search;
int queuedSearches; int queuedSearches;
QLinkedList<int> searchColumns; QVector<int> searchColumns;
}; };
...@@ -158,7 +158,7 @@ void KViewSearchLine::setKeepParentsVisible(bool v) ...@@ -158,7 +158,7 @@ void KViewSearchLine::setKeepParentsVisible(bool v)
d->keepParentsVisible = v; d->keepParentsVisible = v;
} }
void KViewSearchLine::setSearchColumns(const QLinkedList<int> &columns) void KViewSearchLine::setSearchColumns(const QVector<int> &columns)
{ {
d->searchColumns = columns; d->searchColumns = columns;
} }
...@@ -222,7 +222,7 @@ bool KViewSearchLine::itemMatches(const QModelIndex & item, const QString &s) co ...@@ -222,7 +222,7 @@ bool KViewSearchLine::itemMatches(const QModelIndex & item, const QString &s) co
int row = item.row(); int row = item.row();
QModelIndex parent = item.parent(); QModelIndex parent = item.parent();
if(!d->searchColumns.isEmpty()) { if(!d->searchColumns.isEmpty()) {
QLinkedList<int>::const_iterator it, end; QVector<int>::const_iterator it, end;
end = d->searchColumns.constEnd(); end = d->searchColumns.constEnd();
for(it = d->searchColumns.constBegin(); it != end; ++it) for(it = d->searchColumns.constBegin(); it != end; ++it)
{ {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include <klineedit.h> #include <klineedit.h>
#include <QAbstractItemView> #include <QAbstractItemView>
#include <QLinkedList> #include <QVector>
class QAction; class QAction;
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
* *
* @see setSearchColumns * @see setSearchColumns
*/ */
QLinkedList<int> searchColumns() const; QVector<int> searchColumns() const;
/** /**
* If this is true (the default) then the parents of matched items will also * If this is true (the default) then the parents of matched items will also
...@@ -138,7 +138,7 @@ public Q_SLOTS: ...@@ -138,7 +138,7 @@ public Q_SLOTS:
* *
* @see searchColumns * @see searchColumns
*/ */
void setSearchColumns(const QLinkedList<int> &columns); void setSearchColumns(const QVector<int> &columns);
/** /**
* Sets the view that is filtered by this search line. * Sets the view that is filtered by this search line.
......
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