diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/pebble.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/pebble.cpp b/app/pebble.cpp index 41da080..6f5d605 100644 --- a/app/pebble.cpp +++ b/app/pebble.cpp @@ -38,6 +38,21 @@ int main(int argc, char *argv[]) { QScopedPointer<QGuiApplication> app(SailfishApp::application(argc, argv)); + app->setApplicationName("pebble"); + app->setOrganizationName(""); + + for (int i = 1; i < argc; i++) { + if (QString(argv[i]).endsWith(".pbw", Qt::CaseInsensitive)) { + QDir dataDir(QStandardPaths::writableLocation(QStandardPaths::DataLocation)); + if (dataDir.mkpath("apps")) { + QFile pbw(argv[i]); + QFileInfo dst(pbw); + dst.setFile(dataDir.absoluteFilePath("apps"), dst.fileName()); + QFile(dst.filePath()).remove(); + pbw.copy(dst.filePath()); + } + } + } qmlRegisterUncreatableType<PebbledInterface>("org.pebbled", 0, 1, "PebbledInterface", "Please use pebbled context property"); |
