# HG changeset patch
# User Ralf Schlatterbeck <[EMAIL PROTECTED]>
# Date 1208887261 -7200
# Node ID 9cf6cdeb8913d7c7bf3fd4d1e2a61f62318ca7a7
# Parent d4f882bd6f7d1183be365636337414679ce1f0ca
Contact Realm was shown twice when editing wengo-type contacts in
advanced dialog if the user entered the realm by hand. This fixed
duplicate code in two files (are there more??)
This code should probably be moved to model/contactlist/Contact.{h,cpp}
But this would need serious rework because currently the Qt interface
uses the base-class ContactProfile...
Fixes Kvats issue48
diff -r d4f882bd6f7d -r 9cf6cdeb8913
wengophone/src/presentation/qt/imcontact/QtAddIMContact.cpp
--- a/wengophone/src/presentation/qt/imcontact/QtAddIMContact.cpp Mon Apr
21 17:00:18 2008 +0200
+++ b/wengophone/src/presentation/qt/imcontact/QtAddIMContact.cpp Tue Apr
22 20:01:01 2008 +0200
@@ -93,7 +93,9 @@ void QtAddIMContact::addIMContact() {
Config & config = ConfigManager::getInstance().getCurrentConfig();
QString wengoSuffix = "@" + QString::fromStdString(
config.getWengoRealm() );
if (imProtocol == EnumIMProtocol::IMProtocolWengo) {
- contactId += wengoSuffix;
+ if (!contactId.contains("@")) {
+ contactId += wengoSuffix;
+ }
} else if (imProtocol == EnumIMProtocol::IMProtocolSIP) {
if (!contactId.contains("@")) {
SipAccount * sipaccount =
_cUserProfile.getUserProfile().getSipAccount();
diff -r d4f882bd6f7d -r 9cf6cdeb8913
wengophone/src/presentation/qt/imcontact/QtSimpleIMContactManager.cpp
--- a/wengophone/src/presentation/qt/imcontact/QtSimpleIMContactManager.cpp
Mon Apr 21 17:00:18 2008 +0200
+++ b/wengophone/src/presentation/qt/imcontact/QtSimpleIMContactManager.cpp
Tue Apr 22 20:01:01 2008 +0200
@@ -195,7 +195,9 @@ void QtSimpleIMContactManager::addIMCont
// sip contact should know their domain
if (imProtocol == EnumIMProtocol::IMProtocolWengo) {
- contactId += wengoSuffix;
+ if (!contactId.contains("@")) {
+ contactId += wengoSuffix;
+ }
} else if (imProtocol == EnumIMProtocol::IMProtocolSIP)
{
if (!contactId.contains("@")) {
SipAccount * sipaccount =
_cUserProfile.getUserProfile().getSipAccount();
--
Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
Open Source Consulting Fax: +43/2243/26465-23
Reichergasse 131 www: http://www.runtux.com
A-3411 Weidling email: [EMAIL PROTECTED]
osAlliance member email: [EMAIL PROTECTED]
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev