| 19 | #include <QTemporaryDir> |
| 20 | |
| 21 | bool createTemporaryDir(QString &path) |
| 22 | { |
| 23 | QString baseName = QCoreApplication::applicationName(); |
| 24 | if (baseName.isEmpty()) |
| 25 | { |
| 26 | baseName = QLatin1String("mitk_temp"); |
| 27 | } |
| 28 | |
| 29 | QString templateName = QDir::tempPath() + QLatin1Char('/') + baseName + QLatin1String("-XXXXXX"); |
| 30 | QTemporaryDir tmpDir(templateName); |
| 31 | tmpDir.setAutoRemove(false); |
| 32 | |
| 33 | if (tmpDir.isValid()) |
| 34 | { |
| 35 | path = tmpDir.path(); |
| 36 | return true; |
| 37 | } |
| 38 | return false; |
| 39 | } |
| 40 | |
| 41 | QString handleNewAppInstance(QtSingleApplication *singleApp, int argc, char **argv, const QString &newInstanceArg) |
| 42 | { |
no outgoing calls
no test coverage detected