Hi,
On Mon, Mar 28, 2011 at 12:34 PM,<ext-arun.1.ravind...@nokia.com> wrote:
+void CallItem::callMultiPartyChanged()
+{
+ TRACE
+ emit multiPartyChanged();
+}
after:
+
connect(call,SIGNAL(multiPartyChanged()),this,SLOT(callMultiPartyChanged()));
The "call" object here is CallProxy*
Used as:
CallProxy *call = new CallProxy(m_path);
if (call->isValid()) {
model()->setCall(call);
connect(call,SIGNAL(stateChanged()),this,SLOT(callStateChanged()));
connect(call,SIGNAL(multiPartyChanged()),this,SLOT(callMultiPartyChanged()));
} else
qCritical("Invalid CallProxy instance!");
so, calling callMultiPartyChanged will emit multiPartyChanged, which
will call callMultiPartyChanged, ad infinitum? That doesn't seem to be
what you'd want, I think.
CallItem::multiPartyChanged() is handled in CallManager.
CallItem *call = new CallItem(callPath);
connect (call, SIGNAL(stateChanged()), SLOT(callStateChanged()));
connect (call, SIGNAL(multiPartyChanged()),SLOT(callMultiPartyChanged()));
diff --git a/src/callitemmodel.cpp b/src/callitemmodel.cpp
index 2c6c6ea..af75505 100644
--- a/src/callitemmodel.cpp
+++ b/src/callitemmodel.cpp
@@ -155,3 +155,11 @@ bool CallItemModel::disconnected() const
{
return (stateType() == STATE_DISCONNECTED);
}
+
+bool CallItemModel::multiparty() const
this method could do with clearer naming. 'hasMultiparty'?
Hmm, just followed the convention used in this class for properties.
diff --git a/src/callitemmodel.h b/src/callitemmodel.h
index 538fbc2..f2d94d9 100644
--- a/src/callitemmodel.h
+++ b/src/callitemmodel.h
@@ -69,6 +69,7 @@ public:
bool incoming() const;
bool waiting() const;
bool disconnected() const;
+ bool multiparty() const;
same note
@@ -406,6 +414,7 @@ void CallManager::updateCallItems()
qDebug()<< QString("Purging all CallItems");
foreach (CallItem *item, m_callItems) {
disconnect(item, SIGNAL(stateChanged()));
+ disconnect(item, SIGNAL(multiPartyChanged()));
delete item;
}
m_callItems.clear();
@@ -424,6 +433,7 @@ void CallManager::updateCallItems()
if (!m_calls.contains(item->path())) {
qDebug()<< QString("Removing old CallItem %1").arg(item->path());
disconnect(item, SIGNAL(stateChanged()));
+ disconnect(item, SIGNAL(multiPartyChanged()));
delete item;
iter.remove();
changed = true;
this code is unnecessary anyway, there's no need to disconnect signals
when you're deleting an item. deleting either item involved with a
connection removes all connections involved with the deleted object
Sure. Agree.
Regards
Arun
_______________________________________________
MeeGo-handset mailing list
MeeGo-handset@lists.meego.com
http://lists.meego.com/listinfo/meego-handset