MCPcopy Create free account
hub / github.com/MITK/MITK / createTemporaryDir

Function createTemporaryDir

Utilities/qtsingleapplication/qthandlenewappinstance.cpp:21–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include <QTemporaryDir>
20
21bool 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
41QString handleNewAppInstance(QtSingleApplication *singleApp, int argc, char **argv, const QString &newInstanceArg)
42{

Callers 1

handleNewAppInstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected