Change in kio[master]: Add listFieldsVecor method.
Mark Gaiser (Code Review)
noreply at kde.org
Sun Feb 1 19:47:16 UTC 2015
Mark Gaiser has uploaded a new change for review.
https://gerrit.vesnicky.cesnet.cz/r/350
Change subject: Add listFieldsVecor method.
......................................................................
Add listFieldsVecor method.
Internally we store the fields in a QVecotr, but we where only returning a QList (which is toList() on the internal vector).
Both methods can be used just fine. The listFieldsVecor is adviced since it saves a constly conversion.
CHANGELOG: Add UDSEntry::listFieldsVector API method which returns a QVector (the internal field storage).
Change-Id: I3c9fc18311112e2e8df10161c8826c9ed19e0947
---
M src/core/udsentry.cpp
M src/core/udsentry.h
2 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/50/350/1
diff --git a/src/core/udsentry.cpp b/src/core/udsentry.cpp
index 38e40c5..cd47f8f 100644
--- a/src/core/udsentry.cpp
+++ b/src/core/udsentry.cpp
@@ -154,6 +154,11 @@
return d->udsIndexes.toList();
}
+const QVector<uint>& UDSEntry::listFieldsVector() const
+{
+ return d->udsIndexes;
+}
+
int UDSEntry::count() const
{
return d->udsIndexes.count();
diff --git a/src/core/udsentry.h b/src/core/udsentry.h
index 3e39a33..b7e7ea9 100644
--- a/src/core/udsentry.h
+++ b/src/core/udsentry.h
@@ -126,11 +126,18 @@
bool contains(uint field) const;
/**
- * lists all fields
+ * List all fields.
+ * @return all fields.
*/
QList<uint> listFields() const;
/**
+ * List all fields.
+ * @return all fields.
+ */
+ const QVector<uint>& listFieldsVector() const;
+
+ /**
* remove all fields
*/
void clear();
--
To view, visit https://gerrit.vesnicky.cesnet.cz/r/350
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c9fc18311112e2e8df10161c8826c9ed19e0947
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: Mark Gaiser <markg85 at gmail.com>
Gerrit-Reviewer: David Faure <faure at kde.org>
More information about the Kde-frameworks-devel
mailing list