aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gpgwin.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index d88f6a8..1882827 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -58,6 +58,16 @@ GpgWin::GpgWin()
mKeyList->addMenuAction(appendSelectedKeysAct);
restoreSettings();
+
+ // open filename if provided as first command line parameter
+ QStringList args = qApp->arguments();
+ if(args.size() > 1) {
+ if(!args[1].startsWith("-")) {
+ if(QFile::exists(args[1]))
+ loadFile(args[1]);
+ }
+ }
+
}
void GpgWin::restoreSettings()