From 2ff601c30eab749181f7ac686c2e71cb53cd8628 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Tue, 30 Jul 2019 15:43:23 +0800 Subject: [PATCH] refactor: rename function --- gio-qt/include/dgiofile.h | 2 +- gio-qt/include/dgiofileiterator.h | 2 +- gio-qt/source/dgiofileiterator.cpp | 2 +- qgio-tools/main.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gio-qt/include/dgiofile.h b/gio-qt/include/dgiofile.h index 71ef3e8..1bcac53 100644 --- a/gio-qt/include/dgiofile.h +++ b/gio-qt/include/dgiofile.h @@ -33,7 +33,7 @@ public: QString path() const; QString uri() const; QExplicitlySharedDataPointer createFileSystemInfo(); - QExplicitlySharedDataPointer createFileIterator(QString attr, DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE); + QExplicitlySharedDataPointer createFileIterator(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE); private: QScopedPointer d_ptr; diff --git a/gio-qt/include/dgiofileiterator.h b/gio-qt/include/dgiofileiterator.h index 28fedbb..08006af 100644 --- a/gio-qt/include/dgiofileiterator.h +++ b/gio-qt/include/dgiofileiterator.h @@ -17,7 +17,7 @@ public: explicit DGioFileIterator(Gio::FileEnumerator *gmmFileEnumeratorPtr, QObject *parent = nullptr); ~DGioFileIterator(); - QExplicitlySharedDataPointer next(); + QExplicitlySharedDataPointer nextFile(); private: QScopedPointer d_ptr; diff --git a/gio-qt/source/dgiofileiterator.cpp b/gio-qt/source/dgiofileiterator.cpp index 17ff1da..43f9b26 100644 --- a/gio-qt/source/dgiofileiterator.cpp +++ b/gio-qt/source/dgiofileiterator.cpp @@ -53,7 +53,7 @@ DGioFileIterator::~DGioFileIterator() } -QExplicitlySharedDataPointer DGioFileIterator::next() +QExplicitlySharedDataPointer DGioFileIterator::nextFile() { Q_D(DGioFileIterator); diff --git a/qgio-tools/main.cpp b/qgio-tools/main.cpp index 4c1ce54..a55d1bf 100644 --- a/qgio-tools/main.cpp +++ b/qgio-tools/main.cpp @@ -20,7 +20,7 @@ int main(int argc, char * argv[]) if (networkFile) { QExplicitlySharedDataPointer iter = networkFile->createFileIterator("standard::*,mountable::can-mount"); if (iter) { - while (QExplicitlySharedDataPointer fi = iter->next()) { + while (QExplicitlySharedDataPointer fi = iter->nextFile()) { if (fi) { qDebug() << fi->displayName() << fi->fileType(); }