1
0
Fork 0
forked from blue/squawk

0.1.4 kwallet optimisation related fix, DnD files into convs, visual fixes

This commit is contained in:
Blue 2020-04-14 19:30:33 +03:00
parent 21c7d65027
commit cb44b12a7e
18 changed files with 162 additions and 47 deletions

View file

@ -41,11 +41,6 @@ Core::PSE::KWallet::KWallet():
if (sState == initial) {
lib.load();
if (!lib.isLoaded()) { //fallback from the build directory
lib.setFileName("./core/passwordStorageEngines/libkwalletWrapper.so");
lib.load();
}
if (lib.isLoaded()) {
openWallet = (OpenWallet) lib.resolve("openWallet");
networkWallet = (NetworkWallet) lib.resolve("networkWallet");
@ -81,7 +76,9 @@ void Core::PSE::KWallet::open()
{
if (sState == success) {
if (cState == disconnected) {
wallet = openWallet(networkWallet(), 0, ::KWallet::Wallet::Asynchronous);
QString name;
networkWallet(name);
wallet = openWallet(name, 0, ::KWallet::Wallet::Asynchronous);
if (wallet) {
cState = connecting;
connect(wallet, SIGNAL(walletOpened(bool)), this, SLOT(onWalletOpened(bool)));
@ -89,6 +86,7 @@ void Core::PSE::KWallet::open()
} else {
everError = true;
emit opened(false);
rejectPending();
}
}
}

View file

@ -79,7 +79,7 @@ private:
private:
typedef ::KWallet::Wallet* (*OpenWallet)(const QString &, WId, ::KWallet::Wallet::OpenType);
typedef const char* (*NetworkWallet)();
typedef void (*NetworkWallet)(QString&);
typedef void (*DeleteWallet)(::KWallet::Wallet*);
typedef int (*ReadPassword)(::KWallet::Wallet*, const QString&, QString&);
typedef int (*WritePassword)(::KWallet::Wallet*, const QString&, const QString&);

View file

@ -8,8 +8,8 @@ extern "C" void deleteWallet(KWallet::Wallet* w) {
w->deleteLater();
}
extern "C" const char* networkWallet() {
return KWallet::Wallet::NetworkWallet().toStdString().c_str();
extern "C" void networkWallet(QString& str) {
str = KWallet::Wallet::NetworkWallet();
}
extern "C" int readPassword(KWallet::Wallet* w, const QString &key, QString &value) {