MCPcopy Create free account
hub / github.com/commontk/CTK / globalFileSystemModelForFiles

Function globalFileSystemModelForFiles

Libs/Widgets/ctkPathLineEdit.cpp:56–69  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

54
55//-----------------------------------------------------------------------------
56static QFileSystemModel* globalFileSystemModelForFiles()
57{
58 static QFileSystemModel* m = NULL;
59 if (!m)
60 {
61 m = new QFileSystemModel();
62#if (QT_VERSION >= QT_VERSION_CHECK(5,14,0))
63 // Prevent slow browsing of network drives
64 m->setOption(QFileSystemModel::DontUseCustomDirectoryIcons);
65#endif
66 m->setRootPath("");
67 }
68 return m;
69}
70
71//-----------------------------------------------------------------------------
72static QFileSystemModel* globalFileSystemModelForDirectories()

Callers 2

setShowFilesMethod · 0.85
setNameFiltersMethod · 0.85

Calls 1

setOptionMethod · 0.45

Tested by

no test coverage detected