refactor: rename function

This commit is contained in:
Gary Wang 2019-07-30 15:43:23 +08:00
parent 224c16ae31
commit 2ff601c30e
4 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ public:
QString path() const; QString path() const;
QString uri() const; QString uri() const;
QExplicitlySharedDataPointer<DGioFileInfo> createFileSystemInfo(); QExplicitlySharedDataPointer<DGioFileInfo> createFileSystemInfo();
QExplicitlySharedDataPointer<DGioFileIterator> createFileIterator(QString attr, DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE); QExplicitlySharedDataPointer<DGioFileIterator> createFileIterator(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE);
private: private:
QScopedPointer<DGioFilePrivate> d_ptr; QScopedPointer<DGioFilePrivate> d_ptr;

View file

@ -17,7 +17,7 @@ public:
explicit DGioFileIterator(Gio::FileEnumerator *gmmFileEnumeratorPtr, QObject *parent = nullptr); explicit DGioFileIterator(Gio::FileEnumerator *gmmFileEnumeratorPtr, QObject *parent = nullptr);
~DGioFileIterator(); ~DGioFileIterator();
QExplicitlySharedDataPointer<DGioFileInfo> next(); QExplicitlySharedDataPointer<DGioFileInfo> nextFile();
private: private:
QScopedPointer<DGioFileIteratorPrivate> d_ptr; QScopedPointer<DGioFileIteratorPrivate> d_ptr;

View file

@ -53,7 +53,7 @@ DGioFileIterator::~DGioFileIterator()
} }
QExplicitlySharedDataPointer<DGioFileInfo> DGioFileIterator::next() QExplicitlySharedDataPointer<DGioFileInfo> DGioFileIterator::nextFile()
{ {
Q_D(DGioFileIterator); Q_D(DGioFileIterator);

View file

@ -20,7 +20,7 @@ int main(int argc, char * argv[])
if (networkFile) { if (networkFile) {
QExplicitlySharedDataPointer<DGioFileIterator> iter = networkFile->createFileIterator("standard::*,mountable::can-mount"); QExplicitlySharedDataPointer<DGioFileIterator> iter = networkFile->createFileIterator("standard::*,mountable::can-mount");
if (iter) { if (iter) {
while (QExplicitlySharedDataPointer<DGioFileInfo> fi = iter->next()) { while (QExplicitlySharedDataPointer<DGioFileInfo> fi = iter->nextFile()) {
if (fi) { if (fi) {
qDebug() << fi->displayName() << fi->fileType(); qDebug() << fi->displayName() << fi->fileType();
} }