aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-28 18:37:58 +0000
committerubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910>2011-12-28 18:37:58 +0000
commit1efa478834fb9329739ce7b26b35eb9962594cb0 (patch)
tree5ae67eb6d581ec947465054f2619d59ffacea60d /main.cpp
parentprepare language listing which works from qt 4.8 onwards (diff)
downloadgpg4usb-1efa478834fb9329739ce7b26b35eb9962594cb0.tar.gz
gpg4usb-1efa478834fb9329739ce7b26b35eb9962594cb0.zip
add GPG4USB_NON_PORTABLE flag, which could be used to build non portable app using system gpg folders and programm
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@713 34ebc366-c3a9-4b3c-9f84-69acf7962910
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 2619f8e..00ce713 100644
--- a/main.cpp
+++ b/main.cpp
@@ -49,6 +49,8 @@ int main(int argc, char *argv[])
#endif
qDebug() << getenv("GNUPGHOME");
+
+#ifndef GPG4USB_NON_PORTABLE
// take care of gpg not creating directorys on harddisk
putenv(QString("GNUPGHOME=" + appPath + "/keydb").toAscii().data());
@@ -57,6 +59,12 @@ int main(int argc, char *argv[])
// specify default path & format for QSettings
QSettings::setPath(QSettings::IniFormat, QSettings::UserScope, appPath);
+#else
+ // in non portable conf should go to ~/.conf/gpg4usb
+ app.setOrganizationName("gpg4usb");
+ qDebug() << "gpg4usb non portable build";
+#endif
+
QSettings::setDefaultFormat(QSettings::IniFormat);
QSettings settings;