soc.2008.masterpassword: a73291a0: It appears that a QString can be treated...
qulogic at pidgin.im
qulogic at pidgin.im
Sat Nov 12 04:01:29 EST 2011
----------------------------------------------------------------------
Revision: a73291a0cdcdb49724e64ccd4cdf216ee71db7a0
Parent: f6f7575b235760e5def43c303eb1034f4253ca8f
Author: qulogic at pidgin.im
Date: 11/12/11 03:51:36
Branch: im.pidgin.soc.2008.masterpassword
URL: http://d.pidgin.im/viewmtn/revision/info/a73291a0cdcdb49724e64ccd4cdf216ee71db7a0
Changelog:
It appears that a QString can be treated as if it were a value type.
Changes against parent f6f7575b235760e5def43c303eb1034f4253ca8f
patched libpurple/plugins/keyrings/kwallet.cpp
-------------- next part --------------
============================================================
--- libpurple/plugins/keyrings/kwallet.cpp 1860b8e31584488734f7f87f8c934856890ae46d
+++ libpurple/plugins/keyrings/kwallet.cpp 0d5cabd31d5d5cbbf4a9fa71618111ddce30cffc
@@ -67,7 +67,7 @@ class request
protected:
gpointer data;
PurpleAccount *account;
- QString *password;
+ QString password;
};
class engine : QObject
@@ -194,7 +194,7 @@ KWalletPlugin::save_request::save_reques
account = acc;
data = userdata;
callback = cb;
- password = new QString(pw);
+ password = QString(pw);
}
KWalletPlugin::read_request::read_request(PurpleAccount *acc, PurpleKeyringReadCallback cb, void *userdata)
@@ -202,7 +202,7 @@ KWalletPlugin::read_request::read_reques
account = acc;
data = userdata;
callback = cb;
- password = NULL;
+ password = QString();
}
void
@@ -238,12 +238,12 @@ KWalletPlugin::read_request::execute(KWa
QString key;
key = QString("purple-") + purple_account_get_username(account) + " " + purple_account_get_protocol_id(account);
- result = wallet->readPassword(key, *password);
+ result = wallet->readPassword(key, password);
if (result != 0)
abort();
else if (callback != NULL)
- callback(account, password->toUtf8().constData(), NULL, data);
+ callback(account, password.toUtf8().constData(), NULL, data);
}
void
@@ -253,7 +253,7 @@ KWalletPlugin::save_request::execute(KWa
QString key;
key = QString("purple-") + purple_account_get_username(account) + " " + purple_account_get_protocol_id(account);
- result = wallet->writePassword(key, *password);
+ result = wallet->writePassword(key, password);
if (result != 0)
abort();
More information about the Commits
mailing list