23 #include <QStandardPaths>
37 if (args.size() > 1) {
39 QStringList pathParts(args);
40 pathParts.pop_front();
41 startupFile = pathParts.join(
" ");
43 startupFile = startupFile.left(startupFile.lastIndexOf(
"'"));
44 startupFile = startupFile.right(startupFile.length() - startupFile.indexOf(
"'") - 1);
45 QFileInfo f(startupFile);
46 if (f.fileName() == startupFile) {
48 QDir docDir(QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation));
49 startupFile = docDir.absoluteFilePath(f.fileName());
52 if (startupFile.isEmpty()) {
60 QString fileName(file);
61 LogI(
"Opening external file %s", file);
65 QGenericReturnArgument(0),
66 Q_ARG(QString, fileName),
bool openFile(QString filePath, bool cached)
Open the given file.
static TunerApplication & getSingleton()
Getter for the singleton instance.
static TunerApplication * getSingletonPtr()
Getter for the singleton instance.