| 243 | } |
| 244 | |
| 245 | QStringList SettingsDialog::getLibraryPath(QString currentFile, QString caption, bool multipleFiles) |
| 246 | { |
| 247 | // Use the currently selected dir or the dir to YUView if this one does not exist. |
| 248 | QFileInfo curFile(currentFile); |
| 249 | QDir curDir = curFile.absoluteDir(); |
| 250 | if (!curDir.exists()) |
| 251 | curDir = QDir::current(); |
| 252 | |
| 253 | QFileDialog fileDialog(this, caption); |
| 254 | fileDialog.setDirectory(curDir); |
| 255 | fileDialog.setFileMode(multipleFiles ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile); |
| 256 | if (is_Q_OS_LINUX) |
| 257 | fileDialog.setNameFilter("Library files (*.so.* *.so)"); |
| 258 | if (is_Q_OS_MAC) |
| 259 | fileDialog.setNameFilter("Library files (*.dylib)"); |
| 260 | if (is_Q_OS_WIN) |
| 261 | fileDialog.setNameFilter("Library files (*.dll)"); |
| 262 | |
| 263 | if (fileDialog.exec()) |
| 264 | return fileDialog.selectedFiles(); |
| 265 | |
| 266 | return {}; |
| 267 | } |
| 268 | |
| 269 | void SettingsDialog::on_pushButtonLibde265SelectFile_clicked() |
| 270 | { |
no outgoing calls
no test coverage detected