MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / getFileNamesInFolders

Method getFileNamesInFolders

src/board/UBFeaturesController.cpp:954–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

952}
953
954QStringList UBFeaturesController::getFileNamesInFolders()
955{
956 QStringList strList;
957
958 Q_ASSERT(curListModel);
959
960 for (int i = 0; i < curListModel->rowCount(QModelIndex()); i++) {
961 QModelIndex ind = curListModel->index(i, 0);
962 if (!ind.isValid()) {
963 qDebug() << "incorrect model index catched";
964 continue;
965 }
966 UBFeature curFeature = curListModel->data(ind, Qt::UserRole + 1).value<UBFeature>();
967 if (curFeature.getType() == FEATURE_FOLDER) {
968 strList << QFileInfo(curFeature.getFullPath().toLocalFile()).fileName();
969 }
970 }
971
972 return strList;
973}
974
975void UBFeaturesController::addNewFolder(QString name)
976{

Callers 1

createNewFolderMethod · 0.80

Calls 6

getFullPathMethod · 0.80
rowCountMethod · 0.45
indexMethod · 0.45
isValidMethod · 0.45
dataMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected