| 1467 | |
| 1468 | |
| 1469 | QString SampleBuffer::tryToMakeAbsolute(const QString& file) |
| 1470 | { |
| 1471 | QFileInfo f(file); |
| 1472 | |
| 1473 | if(f.isRelative()) |
| 1474 | { |
| 1475 | f = QFileInfo(ConfigManager::inst()->userSamplesDir() + file); |
| 1476 | |
| 1477 | if(! f.exists()) |
| 1478 | { |
| 1479 | f = QFileInfo(ConfigManager::inst()->factorySamplesDir() + file); |
| 1480 | } |
| 1481 | } |
| 1482 | |
| 1483 | if (f.exists()) { |
| 1484 | return f.absoluteFilePath(); |
| 1485 | } |
| 1486 | return file; |
| 1487 | } |
| 1488 | |
| 1489 | |
| 1490 |
no test coverage detected