From f0e644896d34c4c354a978788cbb461db653484b Mon Sep 17 00:00:00 2001 From: Tomasz Sterna Date: Sun, 11 Jan 2015 21:26:02 +0100 Subject: Implemented "Add App file" dialog --- app/pebble.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'app/pebble.cpp') 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("org.pebbled", 0, 1, "PebbledInterface", -- cgit v1.2.3