diff options
| author | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-11 21:26:02 +0100 |
|---|---|---|
| committer | Tomasz Sterna <tomek@xiaoka.com> | 2015-01-11 21:26:02 +0100 |
| commit | f0e644896d34c4c354a978788cbb461db653484b (patch) | |
| tree | 31086457b3a8f7c30e94e20a287914dcdb3d3c95 /app/pebble.cpp | |
| parent | 341c38a31f4bde9a2f016b4d58a11b8beb2bae5a (diff) | |
Implemented "Add App file" dialog
Diffstat (limited to 'app/pebble.cpp')
| -rw-r--r-- | app/pebble.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/pebble.cpp b/app/pebble.cpp index 6f5d605..22f6ac1 100644 --- a/app/pebble.cpp +++ b/app/pebble.cpp @@ -42,16 +42,7 @@ int main(int argc, char *argv[]) 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()); - } - } + PebbledInterface::registerAppFile(argv[i]); } qmlRegisterUncreatableType<PebbledInterface>("org.pebbled", 0, 1, "PebbledInterface", |
