void ProtocolFile::setModuleNameAndPath(QString prefix, QString name, QString filepath) { // Remove any contents we currently have clear(); // Clean it all up separateModuleNameAndPath(name, filepath); // Extract the extension extractExtension(name); // Remember the module name module = prefix + name; // And the path path = filepath; // This will see if the file already exists and will setup the initial output prepareToAppend(); }
void LoadFileListTask::processFile(const QString &path) { static QSet<QString> allowedExtensions = QSet<QString>() << "MP3" << "MP4" << "M4A" << "FLAC" << "OGG" << "OGA" << "APE" << "OGGFLAC" << "TTA" << "WV" << "MPC" << "WMA"; if (allowedExtensions.contains(extractExtension(path))) { if (!m_cache.contains(path)) { m_cache.insert(path); m_files.append(path); } } }
/*! * Get the extension information for this name, and remove it from the name. * \param name has its extension (if any) recorded and removed */ void ProtocolFile::extractExtension(QString& name) { extractExtension(name, extension); }