[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/kopete/contactlist
From: Roman Jarosz <kedgedev () gmail ! com>
Date: 2009-05-10 12:17:41
Message-ID: 1241957861.066877.28523.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 966029 by rjarosz:
Emit dataChanged when photo or display name has changed.
M +15 -0 contactlistmodel.cpp
M +1 -0 contactlistmodel.h
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/contactlistmodel.cpp #966028:966029
@@ -255,6 +255,10 @@
this, SLOT(handleContactDataChange(Kopete::MetaContact*)) );
connect( contact, SIGNAL(statusMessageChanged(Kopete::MetaContact*)),
this, SLOT(handleContactDataChange(Kopete::MetaContact*)) );
+ connect( contact, SIGNAL(displayNameChanged(const QString&, const QString&)),
+ this, SLOT(handleContactDataChange()) );
+ connect( contact, SIGNAL(photoChanged()),
+ this, SLOT(handleContactDataChange()) );
}
void ContactListModel::removeMetaContact( Kopete::MetaContact* contact )
@@ -263,6 +267,10 @@
this, SLOT(handleContactDataChange(Kopete::MetaContact*)));
disconnect( contact, SIGNAL(statusMessageChanged(Kopete::MetaContact*)),
this, SLOT(handleContactDataChange(Kopete::MetaContact*)) );
+ disconnect( contact, SIGNAL(displayNameChanged(const QString&, const QString&)),
+ this, SLOT(handleContactDataChange()) );
+ disconnect( contact, SIGNAL(photoChanged()),
+ this, SLOT(handleContactDataChange()) );
m_newMessageMetaContactSet.remove( contact );
}
@@ -321,6 +329,13 @@
this, SLOT(moveMetaContactToGroup(Kopete::MetaContact*, Kopete::Group*, Kopete::Group*)));
}
+void ContactListModel::handleContactDataChange()
+{
+ Kopete::MetaContact* metaContact = qobject_cast<Kopete::MetaContact*>(sender());
+ if ( metaContact )
+ handleContactDataChange( metaContact );
+}
+
void ContactListModel::newMessageEvent( Kopete::MessageEvent *event )
{
Kopete::Message msg = event->message();
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/contactlistmodel.h #966028:966029
@@ -72,6 +72,7 @@
virtual void appearanceConfigChanged() = 0;
virtual void handleContactDataChange( Kopete::MetaContact* ) = 0;
virtual void loadContactList();
+ void handleContactDataChange();
void newMessageEvent( Kopete::MessageEvent *event );
void newMessageEventDone( Kopete::MessageEvent *event );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic