diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-10 09:44:53 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2010-05-10 09:44:53 +0000 |
commit | 3a4a3079ce44dfde45f4b584dc48c3175b516b21 (patch) | |
tree | 3f16751be485ae2d50d6b82aa2ed4eaf94856a61 | |
parent | add testfile for multipart-attachments (diff) | |
download | gpg4usb-3a4a3079ce44dfde45f4b584dc48c3175b516b21.tar.gz gpg4usb-3a4a3079ce44dfde45f4b584dc48c3175b516b21.zip |
open file if provided from command-line
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@317 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | gpgwin.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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() |