diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-01-20 15:42:53 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-01-20 15:42:53 +0000 |
| commit | dcec9bcedc769372f1d2a84d24755a8dda43238f (patch) | |
| tree | 81eba4fddcfbe7a015052e5332b839c717d3cce3 /pica-client/contacts.cpp | |
| parent | da68f9e85db0f232656542564bd770240e28110e (diff) | |
| download | pica-pica-dcec9bcedc769372f1d2a84d24755a8dda43238f.tar.gz pica-pica-dcec9bcedc769372f1d2a84d24755a8dda43238f.zip | |
displaying history in chatwindow
git-svn-id: svn://localhost/project_picapica/trunk@221 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/contacts.cpp')
| -rw-r--r-- | pica-client/contacts.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pica-client/contacts.cpp b/pica-client/contacts.cpp index 7b66c4f..9e87298 100644 --- a/pica-client/contacts.cpp +++ b/pica-client/contacts.cpp @@ -104,6 +104,25 @@ QString Contacts::GetContactCert(quint32 id) return query.value(0).toString(); } +QString Contacts::GetContactName(quint32 id) +{ + QSqlQuery query; + + query.prepare("select name from contacts where id=:id and account_id=:account_id"); + query.bindValue(":id",id); + query.bindValue(":account_id",account_id_); + query.exec(); + + lasterr=query.lastError(); + + if (lasterr.isValid()) + return QString::null; + + query.next(); + + return query.value(0).toString(); +} + void Contacts::SetContactCert(quint32 id, QString &cert_pem) { QSqlQuery query; |
