From 587b26019beb51aadb4cd245e622774a90442966 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Thu, 10 Jun 2021 04:14:21 +0800 Subject: Adjust the project structure. Write a readme. Signed-off-by: Saturneric --- src/main.cpp | 35 ----------------------------------- src/ui/Wizard.cpp | 6 +++--- 2 files changed, 3 insertions(+), 38 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 2e7676d8..6cb84d25 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,41 +42,6 @@ int main(int argc, char *argv[]) { // unicode in source QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8")); - // set environment variables - // TODO: - // - unsetenv on windows? - // - wputenv or wputenv_s on windows? http://msdn.microsoft.com/en-us/library/d6dtz42k(v=vs.80).aspx -#ifndef _WIN32 - // do not use GPG_AGENTS like seahorse, because they may save - // a password an pc's not owned by user - unsetenv("GPG_AGENT_INFO"); -#endif - -// qDebug() << getenv("GNUPGHOME"); - -#ifndef GPG4USB_NON_PORTABLE - // take care of gpg not creating directorys on harddisk - putenv(QString("GNUPGHOME=" + appPath + "/keydb").toUtf8().data()); - - // this may help with newer gpgme versions on windows - //putenv(QString("GPGME_GPGPATH=" + appPath.replace("/", "\\") + "\\bin\\gpg.exe").toUtf8().data()); - - // QSettings uses org-name for automatically setting path... - QApplication::setOrganizationName("conf"); - - // 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 - - /*QLocale ql(lang); - foreach(QLocale l , QLocale::matchingLocales(ql.language(), ql.script(), ql.country())) { - qDebug() << "l: " << l.bcp47Name(); - }*/ - // css QFile file(qApp->applicationDirPath() + "/css/default.css"); file.open(QFile::ReadOnly); diff --git a/src/ui/Wizard.cpp b/src/ui/Wizard.cpp index f7d8b717..3a09323a 100644 --- a/src/ui/Wizard.cpp +++ b/src/ui/Wizard.cpp @@ -117,7 +117,7 @@ IntroPage::IntroPage(QWidget *parent) "For more information have a look at the concepts " "(by clicking the link, the page will open in the main window).
")); topLabel->setWordWrap(true); - connect(topLabel, SIGNAL(linkActivated(QString)), parentWidget()->parentWidget(), SLOT(openHelp(QString))); + // connect(topLabel, SIGNAL(linkActivated(QString)), parentWidget()->parentWidget(), SLOT(openHelp(QString))); // QComboBox for language selection auto *langLabel = new QLabel(tr("Choose a Language")); @@ -167,7 +167,7 @@ ChoosePage::ChoosePage(QWidget *parent) "may possibly want to ") + "" + tr("create a new keypair") + "
"); keygenLabel->setWordWrap(true); - connect(keygenLabel, SIGNAL(linkActivated(QString)), this, SLOT(slotJumpPage(Qtring))); + // connect(keygenLabel, SIGNAL(linkActivated(QString)), this, SLOT(slotJumpPage(Qtring))); auto *importGpg4usbLabel = new QLabel(tr("If you upgrade from an older version of GPGFrontend you may want to ") + "" @@ -360,7 +360,7 @@ KeyGenPage::KeyGenPage(GpgME::GpgContext *ctx, QWidget *parent) auto *linkLabel = new QLabel("" + tr("Offline tutorial") + ""); //linkLabel->setOpenExternalLinks(true); - connect(linkLabel, SIGNAL(linkActivated(QString)), parentWidget()->parentWidget(), SLOT(openHelp(QString))); + // connect(linkLabel, SIGNAL(linkActivated(QString)), parentWidget()->parentWidget(), SLOT(openHelp(QString))); auto *createKeyButtonBox = new QWidget(this); auto *createKeyButtonBoxLayout = new QHBoxLayout(createKeyButtonBox); -- cgit v1.2.3