diff options
author | kh1 <karsten.heimrich@digia.com> | 2014-10-14 16:48:05 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@digia.com> | 2014-10-15 12:31:26 +0200 |
commit | ec92e19193eb9d69a3cf18979d6434cf04764902 (patch) | |
tree | 214ec6030db49f5dfb5421716af38267530d6f0b /src/libs/installer/remotefileengine.cpp | |
parent | fb8e23d6b38d1b0e490f0460e1026d8fe6fb4095 (diff) |
Some more documentation fixes (removes more warnings).
Change-Id: I1efb7f98ac4cccdc4dbd1784806cce286654af9f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Diffstat (limited to 'src/libs/installer/remotefileengine.cpp')
-rw-r--r-- | src/libs/installer/remotefileengine.cpp | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/src/libs/installer/remotefileengine.cpp b/src/libs/installer/remotefileengine.cpp index 02469be34..7feff87c0 100644 --- a/src/libs/installer/remotefileengine.cpp +++ b/src/libs/installer/remotefileengine.cpp @@ -79,43 +79,49 @@ public: RemoteFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &files) : QAbstractFileEngineIterator(filters, nameFilters) - , entries(files) , index(-1) + , entries(files) { } - /*! - \reimp - */ - bool hasNext() const - { - return index < entries.size() - 1; - } - - /*! - \reimp - */ - QString next() - { - if (!hasNext()) - return QString(); - ++index; - return currentFilePath(); - } - - /*! - \reimp - */ - QString currentFileName() const - { - return entries.at(index); - } + QString next(); + bool hasNext() const; + QString currentFileName() const; private: - const QStringList entries; int index; + QStringList entries; }; +/*! + Advances the iterator to the next entry, and returns the current file path of this new + entry. If hasNext() returns \c false, the function does nothing and returns an empty QString. +*/ +bool RemoteFileEngineIterator::hasNext() const +{ + return index < entries.size() - 1; +} + +/*! + Returns \c true if there is at least one more entry in the directory, otherwise returns + \c false. +*/ +QString RemoteFileEngineIterator::next() +{ + if (!hasNext()) + return QString(); + ++index; + return currentFilePath(); +} + +/*! + Returns the name of the current directory entry, excluding the path. +*/ +QString RemoteFileEngineIterator::currentFileName() const +{ + return entries.at(index); +} + // -- RemoteFileEngine |