MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / mkdir

Method mkdir

Engine/FileSystemModel.cpp:1134–1155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132}
1133
1134QModelIndex
1135FileSystemModel::mkdir(const QModelIndex& parent,
1136 const QString& name)
1137{
1138 if ( !parent.isValid() ) {
1139 return QModelIndex();
1140 }
1141
1142 FileSystemItem *item = getFileSystemItem(parent);
1143
1144 if (item) {
1145 QDir dir( item->absoluteFilePath() );
1146 dir.mkpath(name);
1147 FileSystemItemPtr newDir = mkPath( generateChildAbsoluteName(item, name) );
1148 if (!newDir) {
1149 return QModelIndex();
1150 }
1151 return createIndex(newDir->indexInParent(), 0, item);
1152 }
1153
1154 return QModelIndex();
1155}
1156
1157Qt::SortOrder
1158FileSystemModel::sortIndicatorOrder() const

Callers 6

TESTFunction · 0.80
exportDocsMethod · 0.80
StandardPaths.cppFile · 0.80
createDirMethod · 0.80

Calls 4

QModelIndexClass · 0.85
indexInParentMethod · 0.80
isValidMethod · 0.45

Tested by 1

TESTFunction · 0.64