[Meego-handset] [PATCH] Patch:Fix for unable to see alert dialog for MT call Signed-off-by: Arun Ravindran ext-arun.1.ravind...@nokia.com
From: Arun Ravindran ext-arun.1.ravind...@nokia.com This patch emits a signal from callmanager, when a call is added to prepare the UI. The signal is handled in dialer application to release the ui from prestart state. --- src/callmanager.cpp |3 +++ src/callmanager.h |1 + src/dialerapplication.cpp | 11 +++ src/dialerapplication.h |1 + 4 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/callmanager.cpp b/src/callmanager.cpp index 8ff4c8c..37431ec 100644 --- a/src/callmanager.cpp +++ b/src/callmanager.cpp @@ -600,6 +600,9 @@ void CallManager::callAdded(const QDBusObjectPath in0,const QVariantMap in1) Q_UNUSED(in1) TRACE +//prepare ui to handle the added call +emit prepareViews(); + QString path = in0.path(); qDebug() QString(CallAdded: \%1\).arg(path); diff --git a/src/callmanager.h b/src/callmanager.h index 8f14c33..8fb7491 100644 --- a/src/callmanager.h +++ b/src/callmanager.h @@ -92,6 +92,7 @@ Q_SIGNALS: void connected(); void disconnected(); void onlyEmergencyCalls(); +void prepareViews(); private Q_SLOTS: void updateCallItems(); diff --git a/src/dialerapplication.cpp b/src/dialerapplication.cpp index bfe2f7e..c789eb3 100644 --- a/src/dialerapplication.cpp +++ b/src/dialerapplication.cpp @@ -116,6 +116,13 @@ void DialerApplication::connectAll() SLOT(messagesWaitingChanged())); } +void DialerApplication::releasePreStart() +{ +TRACE +if(isPrestarted()) +setPrestarted(false); +} + bool DialerApplication::isConnected() { TRACE @@ -260,6 +267,10 @@ void DialerApplication::callManagerConnected() qDebug() QString(Connect resource unavailable); connect(m_callManager, SIGNAL(callResourceLost(const QString)), m_mainWindow, SLOT(handleResourceUnavailability(const QString))); + +qDebug() QString(Connect ensure UI prepared); +connect(m_callManager, SIGNAL(prepareViews()),this, SLOT(releasePreStart())); + } void DialerApplication::callManagerDisconnected() diff --git a/src/dialerapplication.h b/src/dialerapplication.h index 5a3b57f..f3e9f5d 100644 --- a/src/dialerapplication.h +++ b/src/dialerapplication.h @@ -65,6 +65,7 @@ private Q_SLOTS: void switchPageNow(int id); void connectAll(); void handleCallsChanged(); +void releasePreStart(); private: void init(); -- 1.7.0.4 ___ MeeGo-handset mailing list MeeGo-handset@lists.meego.com http://lists.meego.com/listinfo/meego-handset
Re: [Meego-handset] [PATCH] Patch:Fix for unable to see alert dialog for MT call Signed-off-by: Arun Ravindran ext-arun.1.ravind...@nokia.com
On Mon, 2 May 2011 13:37:15 +0300 ext-arun.1.ravind...@nokia.com wrote: From: Arun Ravindran ext-arun.1.ravind...@nokia.com This patch emits a signal from callmanager, when a call is added to prepare the UI. The signal is handled in dialer application to release the ui from prestart state. --- src/callmanager.cpp |3 +++ src/callmanager.h |1 + src/dialerapplication.cpp | 11 +++ src/dialerapplication.h |1 + 4 files changed, 16 insertions(+), 0 deletions(-) diff --git a/src/callmanager.cpp b/src/callmanager.cpp index 8ff4c8c..37431ec 100644 --- a/src/callmanager.cpp +++ b/src/callmanager.cpp @@ -600,6 +600,9 @@ void CallManager::callAdded(const QDBusObjectPath in0,const QVariantMap in1) Q_UNUSED(in1) TRACE +//prepare ui to handle the added call +emit prepareViews(); I really don't want to start re-introducing UI logic back into non-UI classes. So even though this signal doesn't make CallManager handle UIs, it does make it implicitly UI aware. We already have the callsChanged signal, that is only emitted based on acquiring the incoming call resource (proceedIncomingCall()). If we don't get the permission from libresource to continue with the incoming call, we should not be emitting any signals about incoming calls. diff --git a/src/dialerapplication.cpp b/src/dialerapplication.cpp index bfe2f7e..c789eb3 100644 --- a/src/dialerapplication.cpp +++ b/src/dialerapplication.cpp @@ -116,6 +116,13 @@ void DialerApplication::connectAll() SLOT(messagesWaitingChanged())); } +void DialerApplication::releasePreStart() +{ +TRACE +if(isPrestarted()) +setPrestarted(false); +} + We already have this defined in master[1]... why are you adding another? bool DialerApplication::isConnected() { TRACE @@ -260,6 +267,10 @@ void DialerApplication::callManagerConnected() qDebug() QString(Connect resource unavailable); connect(m_callManager, SIGNAL(callResourceLost(const QString)), m_mainWindow, SLOT(handleResourceUnavailability(const QString))); + +qDebug() QString(Connect ensure UI prepared); +connect(m_callManager, SIGNAL(prepareViews()),this, SLOT(releasePreStart())); + I think we'd be better off handling this in DialerApplication::handleCallsChanged(), checking for incoming call being defined in the CallManager. Shane... [1]http://mxr.meego.com/meego.gitorious.org/source/meego-handset-dialer/src/dialerapplication.cpp#60 ___ MeeGo-handset mailing list MeeGo-handset@lists.meego.com http://lists.meego.com/listinfo/meego-handset