diff options
Diffstat (limited to 'net-im/psi/files/9f0f3d083f025cdd501ef6e2b5e74442182e4fdf.diff')
-rw-r--r-- | net-im/psi/files/9f0f3d083f025cdd501ef6e2b5e74442182e4fdf.diff | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/net-im/psi/files/9f0f3d083f025cdd501ef6e2b5e74442182e4fdf.diff b/net-im/psi/files/9f0f3d083f025cdd501ef6e2b5e74442182e4fdf.diff new file mode 100644 index 0000000..c8898a5 --- /dev/null +++ b/net-im/psi/files/9f0f3d083f025cdd501ef6e2b5e74442182e4fdf.diff @@ -0,0 +1,47 @@ +diff --git a/src/main.cpp b/src/main.cpp +index ddcc756d..c3664b64 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -555,7 +555,22 @@ int main(int argc, char *argv[]) + QCA::setProperty("pgp-always-trust", true); + QCA::KeyStoreManager keystoremgr; + QCA::KeyStoreManager::start(); +- keystoremgr.waitForBusyFinished(); // FIXME get rid of this ++ QTimer keystoremgrTimeout; ++ if(keystoremgr.isBusy()) { ++ keystoremgrTimeout.setTimerType(Qt::VeryCoarseTimer); ++ keystoremgrTimeout.setSingleShot(true); ++ keystoremgrTimeout.setInterval(7500); ++ keystoremgrTimeout.start(); ++ QObject::connect(&keystoremgr, &QCA::KeyStoreManager::busyFinished, &keystoremgrTimeout, &QTimer::stop); ++ QObject::connect(&keystoremgrTimeout, &QTimer::timeout, [] { ++ QMessageBox::warning(nullptr, ++ QApplication::applicationName(), ++ QApplication::translate("main", ++ "The keystore manager provided by QCA takes longer to load than usual." ++ " Maybe <i>gpg</i> hangs.<br><br>" ++ "Note that login via TLS and OpenPGP related features require the keystore manager.")); ++ }); ++ } + + #ifdef USE_CRASH + int useCrash = !cmdline.contains("nocrash"); +diff --git a/src/pgputil.cpp b/src/pgputil.cpp +index 5ae4be18..866d3510 100644 +--- a/src/pgputil.cpp ++++ b/src/pgputil.cpp +@@ -15,12 +15,9 @@ PGPUtil::PGPUtil() : qcaEventHandler_(NULL), passphraseDlg_(NULL), cache_no_pgp_ + qcaEventHandler_ = new QCA::EventHandler(this); + connect(qcaEventHandler_,SIGNAL(eventReady(int,const QCA::Event&)),SLOT(handleEvent(int,const QCA::Event&))); + qcaEventHandler_->start(); +- qcaKeyStoreManager_.waitForBusyFinished(); // FIXME get rid of this + connect(&qcaKeyStoreManager_, SIGNAL(keyStoreAvailable(const QString&)), SLOT(keyStoreAvailable(const QString&))); +- foreach(QString k, qcaKeyStoreManager_.keyStores()) { +- QCA::KeyStore* ks = new QCA::KeyStore(k, &qcaKeyStoreManager_); +- connect(ks, SIGNAL(updated()), SIGNAL(pgpKeysUpdated())); +- keystores_ += ks; ++ foreach(const QString& k, qcaKeyStoreManager_.keyStores()) { ++ keyStoreAvailable(k); + } + + connect(QCoreApplication::instance(),SIGNAL(aboutToQuit()),SLOT(deleteLater())); |