From: APTX Date: Thu, 18 Aug 2011 17:51:24 +0000 (+0200) Subject: Add files from commandline, even if the app is starting the first time. X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=898224c3624db680d8c1c97781f553cf26810bbc;p=AniAdd.git Add files from commandline, even if the app is starting the first time. --- diff --git a/main.cpp b/main.cpp index c65c665..c432dcf 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,5 @@ #include "aniadd.h" +#include "filemodel.h" #include int main(int argc, char *argv[]) @@ -16,6 +17,9 @@ int main(int argc, char *argv[]) return 0; } + if (app.argc() >= 2) + app.fileModel()->addFile(app.arguments()[1]); + app.createGui(); return app.exec(); }