void FileModel::loadFolder(int fileIndex) { File fileToLoad = mFiles[fileIndex]; if (fileToLoad.type() != "directory") return; loadFromDir(fileToLoad.path()); }
bool ZInstrument::load(const QString& path) { instrumentPath = path; QFileInfo fi(path); _name = fi.baseName(); if (fi.isFile()) return loadFromFile(path); if (fi.isDir()) return loadFromDir(path); return false; }
bool ZInstrument::load(const QString& path) { instrumentPath = path; QFileInfo fi(path); _name = fi.completeBaseName(); if (fi.isFile()) return loadFromFile(path); if (fi.isDir()) return loadFromDir(path); qDebug("not file nor dir %s", qPrintable(path)); return false; }