16 if (
fileName.toLower().endsWith(
".zip"_L1))
17 return std::make_unique<ZipEngine>(
fileName);
21int main(
int argc,
char **argv)
38 if (
fileName.toLower().endsWith(
".zip"_L1))
39 return std::make_unique<ZipEngine>(
fileName);
51 return std::make_unique<CustomFileEngineIterator>(
path,
filters, filterNames);
65 entries <<
"entry1" <<
"entry2" <<
"entry3";
70 if (entries.isEmpty())
72 if (
index < entries.size() - 1) {
bool advance() override
This pure virtual function advances the iterator to the next directory entry; if the operation was su...
QString currentFileName() override
CustomIterator(const QString &path, const QStringList &nameFilters, QDir::Filters filters)
\inmodule QtCore \reentrant
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
std::unique_ptr< Iterator > IteratorUniquePtr
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
\macro QT_RESTRICTED_CAST_FROM_ASCII
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
std::unique_ptr< QAbstractFileEngine > create(const QString &fileName) const override
[0]
GLsizei const GLchar *const * path
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
QApplication app(argc, argv)
[0]