forked from mirrors/gio-qt
feat: add a defualt param
add default param("*") to DGioFil::cereateFileSystemInfo (#9)
This commit is contained in:
parent
5b8374b4dd
commit
9f79b3d7cc
@ -32,7 +32,7 @@ public:
|
|||||||
QString basename() const;
|
QString basename() const;
|
||||||
QString path() const;
|
QString path() const;
|
||||||
QString uri() const;
|
QString uri() const;
|
||||||
QExplicitlySharedDataPointer<DGioFileInfo> createFileSystemInfo();
|
QExplicitlySharedDataPointer<DGioFileInfo> createFileSystemInfo(QString attr = "*");
|
||||||
QExplicitlySharedDataPointer<DGioFileIterator> createFileIterator(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE);
|
QExplicitlySharedDataPointer<DGioFileIterator> createFileIterator(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE);
|
||||||
void createFileIteratorAsync(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE);
|
void createFileIteratorAsync(QString attr = "*", DGioFileQueryInfoFlags queryInfoFlags = FILE_QUERY_INFO_NONE);
|
||||||
|
|
||||||
|
@ -165,12 +165,12 @@ QString DGioFile::uri() const
|
|||||||
*
|
*
|
||||||
* \return the created file system info object, or nullptr if create failed.
|
* \return the created file system info object, or nullptr if create failed.
|
||||||
*/
|
*/
|
||||||
QExplicitlySharedDataPointer<DGioFileInfo> DGioFile::createFileSystemInfo()
|
QExplicitlySharedDataPointer<DGioFileInfo> DGioFile::createFileSystemInfo(QString attr)
|
||||||
{
|
{
|
||||||
Q_D(DGioFile);
|
Q_D(DGioFile);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Glib::RefPtr<FileInfo> gmmFileInfo = d->getGmmFileInstance()->query_filesystem_info("filesystem::*");
|
Glib::RefPtr<FileInfo> gmmFileInfo = d->getGmmFileInstance()->query_filesystem_info(attr.toStdString());
|
||||||
if (gmmFileInfo) {
|
if (gmmFileInfo) {
|
||||||
QExplicitlySharedDataPointer<DGioFileInfo> fileInfoPtr(new DGioFileInfo(gmmFileInfo.release()));
|
QExplicitlySharedDataPointer<DGioFileInfo> fileInfoPtr(new DGioFileInfo(gmmFileInfo.release()));
|
||||||
return fileInfoPtr;
|
return fileInfoPtr;
|
||||||
|
Loading…
Reference in New Issue
Block a user