summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-01-26 22:40:43 (UTC)
committer skyhusker <skyhusker>2005-01-26 22:40:43 (UTC)
commitcbaf2c1c6eb42bc8a283a40fe922603a44c29304 (patch) (side-by-side diff)
treeb17000c5fb5b88a45b3fc7eed88726cac35e0193
parent1752010f14bb7806bae6f83b349c9896a3005c75 (diff)
downloadopie-cbaf2c1c6eb42bc8a283a40fe922603a44c29304.zip
opie-cbaf2c1c6eb42bc8a283a40fe922603a44c29304.tar.gz
opie-cbaf2c1c6eb42bc8a283a40fe922603a44c29304.tar.bz2
Changed default realname, now is fetched from device owner name
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircserver.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircserver.cpp b/noncore/net/opieirc/ircserver.cpp
index 7e7e412..abb770b 100644
--- a/noncore/net/opieirc/ircserver.cpp
+++ b/noncore/net/opieirc/ircserver.cpp
@@ -1 +1,7 @@
+#include <qpe/global.h>
+#include <qpe/contact.h>
+
+#include <qobject.h>
+#include <qfile.h>
+
#include "ircserver.h"
@@ -3,3 +9,2 @@
-#include <qobject.h>
@@ -75,4 +80,12 @@ QString IRCServer::realname() {
return m_realname;
-
- return QString(QObject::tr("Using")) + " " + QString(APP_VERSION);
+ // Try to fetch realname from addressbook
+ QString file = Global::applicationFileName( "addressbook", "businesscard.vcf" );
+ if ( QFile::exists( file ) ) {
+ Contact cont = Contact::readVCard( file )[0];
+ QString realName = cont.fullName();
+ if(!realName.isEmpty())
+ return realName;
+ }
+
+ return QString(APP_VERSION + QObject::tr(" User"));
}