diff -r fcdfafb36fe7 -r aecbbf00d063 uifw/AvKon/src/AknQueryDialog.cpp --- a/uifw/AvKon/src/AknQueryDialog.cpp Thu Aug 19 10:11:06 2010 +0300 +++ b/uifw/AvKon/src/AknQueryDialog.cpp Tue Aug 31 15:28:30 2010 +0300 @@ -52,7 +52,6 @@ #endif #include // for testability hooks -#include "akntrace.h" /** * CAknQueryDialogExtension */ @@ -88,7 +87,6 @@ // CAknQueryDialogExtension::~CAknQueryDialogExtension() { - _AKNTRACE( "[%s][%s] do nothing", "CAknQueryDialogExtension", "~CAknQueryDialogExtension" ); } @@ -99,7 +97,6 @@ CAknQueryDialogExtension::CAknQueryDialogExtension (CAknQueryDialog* aQueryDialog) : iParent(aQueryDialog) { - _AKNTRACE( "[%s][%s] do nothing", "CAknQueryDialogExtension", "CAknQueryDialogExtension" ); } // --------------------------------------------------------------------------- @@ -110,7 +107,6 @@ // EXPORT_C void CAknQueryDialogExtension::GetCaptionForFep(TDes& aCaption) const { - _AKNTRACE( "[%s][%s] enter aCaption:%s", "CAknQueryDialogExtension", "GetCaptionForFep" , &aCaption); aCaption = KNullDesC; CAknQueryControl* control = iParent->QueryControl(); @@ -140,7 +136,6 @@ } } } - _AKNTRACE( "[%s][%s] exit aCaption:%s", "CAknQueryDialogExtension", "GetCaptionForFep" , &aCaption); } @@ -184,7 +179,6 @@ // CAknMultilineQueryDialogExtension::~CAknMultilineQueryDialogExtension() { - _AKNTRACE( "[%s][%s] do nothing", "CAknMultilineQueryDialogExtension", "~CAknMultilineQueryDialogExtension" ); } // --------------------------------------------------------------------------- @@ -194,7 +188,6 @@ CAknMultilineQueryDialogExtension::CAknMultilineQueryDialogExtension (CAknQueryDialog* aQueryDialog, TInt aQueryType):CAknQueryDialogExtension(aQueryDialog),iQueryType(aQueryType) { - _AKNTRACE( "[%s][%s] do nothing", "CAknMultilineQueryDialogExtension", "CAknMultilineQueryDialogExtension" ); } // --------------------------------------------------------------------------- @@ -295,10 +288,8 @@ */ EXPORT_C CAknQueryDialog* CAknQueryDialog::NewL(const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog* self = new (ELeave) CAknQueryDialog(aTone); AKNTASHOOK_ADDL( self, "CAknQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -358,7 +349,6 @@ EXPORT_C CAknQueryDialog::CAknQueryDialog(const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS GfxTransEffect::Register( this, KGfxQueryControlUid ); #endif @@ -367,8 +357,6 @@ { iSoundSystem = iAvkonAppUiBase->KeySounds(); } - _AKNTRACE( "[%s][%s] iTone: %d", "CAknQueryDialog", __FUNCTION__, iTone ); - _AKNTRACE_FUNC_EXIT; } /** @@ -399,7 +387,6 @@ EXPORT_C CAknQueryDialog::~CAknQueryDialog() { - _AKNTRACE( "[%s][%s] Enter", "CAknQueryDialog", "~CAknQueryDialog" ); AKNTASHOOK_REMOVE(); delete iPrompt; delete iExtension; @@ -407,13 +394,11 @@ #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS CAknTransitionUtils::RemoveData( ( TInt )this ); #endif - _AKNTRACE( "[%s][%s] Exit", "CAknQueryDialog", "~CAknQueryDialog" ); } EXPORT_C TInt CAknQueryDialog::RunLD() { - _AKNTRACE_FUNC_ENTER; CAknDialog::ConstructL( R_AVKON_MENUPANE_EMPTY) ; ReportUserActivity(); PlayTone(); @@ -428,24 +413,14 @@ CAknsFrameBackgroundControlContext* cc = (CAknsFrameBackgroundControlContext*)AknsDrawUtils::ControlContext( this ); cc->SetCenter(KAknsIIDQsnFrPopupCenterQuery); - - // Check Query is wait of not. - TBool isWaitDialog( ( DialogFlags() & EEikDialogFlagWait ) != 0 ); SetGloballyCapturing(ETrue); TInt ret = CAknDialog::RunLD(); - _AKNTRACE( "[%s][%s] ret: %d", "CAknQueryDialog", __FUNCTION__, ret ); if (soundSystem) { soundSystem->PopContext(); } - // If wait QueryDialog, instance will be deleted right after RunLD via CBA - if ( !isWaitDialog ) - { - SetGloballyCapturing(EFalse); - } - - _AKNTRACE_FUNC_EXIT; + SetGloballyCapturing(EFalse); return ret; } @@ -468,13 +443,8 @@ */ EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aResourceId: %d", "CAknQueryDialog", __FUNCTION__, aResourceId ); PrepareLC(aResourceId); - TInt ret = RunLD(); - _AKNTRACE( "[%s][%s] ret:%d", "CAknQueryDialog", __FUNCTION__,ret ); - _AKNTRACE_FUNC_EXIT; - return ret; + return(RunLD()); } /** @@ -482,14 +452,9 @@ */ EXPORT_C TInt CAknQueryDialog::ExecuteLD(TInt aResourceId,const TDesC& aPrompt) { - _AKNTRACE_FUNC_ENTER; PrepareLC(aResourceId); SetPromptL(aPrompt); - _AKNTRACE( "[%s][%s] aResourceId: %d", "CAknQueryDialog", __FUNCTION__, aResourceId ); - TInt ret= RunLD(); - _AKNTRACE( "[%s][%s] ret:%d", "CAknQueryDialog", __FUNCTION__,ret ); - _AKNTRACE_FUNC_EXIT; - return ret; + return(RunLD()); } /** * Get layout information from the control and use this layout @@ -509,7 +474,6 @@ */ EXPORT_C void CAknQueryDialog::SetSizeAndPosition( const TSize& /*aSize*/ ) { - _AKNTRACE_FUNC_ENTER; CAknQueryControl* control = QueryControl(); CAknPopupHeadingPane* controlHeading = QueryHeading(); @@ -529,10 +493,7 @@ { TAknWindowLineLayout lay = AknLayoutScalable_Avkon::application_window(0); TRect re(0, 0, lay.iW, lay.iH); - _AKNTRACE( "[%s][%s] Rect: x[%d],y[%d],w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, - re.iTl.iX, re.iTl.iY, re.Width(),re.Height()); SetRect(re); - _AKNTRACE_FUNC_EXIT; return; } } @@ -543,16 +504,10 @@ layoutRect.LayoutRect( rectZero, windowLineLayoutScreen ); TRect rectScreen( layoutRect.Rect() ); TSize maxSize = rectScreen.Size(); - _AKNTRACE( "[%s][%s] maxSize: w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, - maxSize.iWidth,maxSize.iHeight); + if ( AknLayoutUtils::PenEnabled() ) { - TSize preferredSize = PreferredSize( maxSize ); - - _AKNTRACE( "[%s][%s] call CAknDialog::SetSizeAndPosition( PreferredSize( w[%d],h[%d] ) )", "CAknQueryDialog", - __FUNCTION__, preferredSize.iWidth, preferredSize.iHeight); - - CAknDialog::SetSizeAndPosition( preferredSize ); + CAknDialog::SetSizeAndPosition( PreferredSize( maxSize ) ); } else { @@ -575,12 +530,9 @@ AknLayoutScalable_Avkon::heading_pane(0)); winRect.iTl.iY -= headingLayoutRect.Rect().Height(); } - _AKNTRACE( "[%s][%s] Rect: x[%d],y[%d],w[%d],h[%d]", "CAknQueryDialog", __FUNCTION__, - winRect.iTl.iX, winRect.iTl.iY, winRect.Width(),winRect.Height()); SetRect(winRect); } } - _AKNTRACE_FUNC_EXIT; } /** @@ -588,7 +540,6 @@ */ EXPORT_C void CAknQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; SetBorder( TGulBorder::ENone ); SetEditableL( ETrue ) ; DoSetPromptL(); @@ -613,7 +564,6 @@ delete iExtension; iExtension = NULL; iExtension = new(ELeave) CAknQueryDialogExtension(this); - _AKNTRACE_FUNC_EXIT; } /** @@ -621,11 +571,10 @@ */ EXPORT_C void CAknQueryDialog::PostLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryControl* control = QueryControl(); if (control) control->StartAnimationL(); - _AKNTRACE_FUNC_EXIT; + } /** @@ -634,13 +583,9 @@ EXPORT_C TKeyResponse CAknQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) { - _AKNTRACE( "[%s][%s] aKeyEvent.iCode[%d],aType[%d]", "CAknQueryDialog", __FUNCTION__,aKeyEvent.iCode, aType); if( NeedToDismissQueryL(aKeyEvent) ) - { - _AKNTRACE( "[%s][%s] Need Dismiss Query, return EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); - return EKeyWasConsumed; - } - + return EKeyWasConsumed; + if (aType == EEventKey && aKeyEvent.iCode == EKeyOK) { CAknQueryControl* control = QueryControl(); @@ -649,7 +594,6 @@ if (IsLeftSoftkeyVisible()) { TryExitL(EEikBidOk); - _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) and reutrn EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); return EKeyWasConsumed; } } @@ -663,14 +607,13 @@ if (IsLeftSoftkeyVisible()) { TryExitL(EEikBidOk); - _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) and reutrn EKeyWasConsumed", "CAknQueryDialog", __FUNCTION__); return EKeyWasConsumed; } } } - TKeyResponse response = CAknDialog::OfferKeyEventL(aKeyEvent,aType); - _AKNTRACE( "[%s][%s] return [%d]", "CAknQueryDialog", __FUNCTION__, response); - return response; + + + return CAknDialog::OfferKeyEventL(aKeyEvent,aType); } /** @@ -681,18 +624,15 @@ */ EXPORT_C TBool CAknQueryDialog::NeedToDismissQueryL(const TKeyEvent& aKeyEvent) { - _AKNTRACE( "[%s][%s] aKeyEvent.iScanCode [%d]", "CAknQueryDialog", __FUNCTION__, aKeyEvent.iScanCode); if (aKeyEvent.iScanCode == EStdKeyHash) { CAknQueryControl* control = QueryControl(); if (control && control->QueryType() == EPinLayout) { - _AKNTRACE( "[%s][%s] EPinLayout, Dismiss Query and return ETrue", "CAknQueryDialog", __FUNCTION__); DismissQueryL(); return ETrue; } } - _AKNTRACE( "[%s][%s] return EFalse", "CAknQueryDialog", __FUNCTION__); return EFalse; } @@ -704,18 +644,14 @@ */ EXPORT_C void CAknQueryDialog::DismissQueryL() { - _AKNTRACE_FUNC_ENTER; if (IsLeftSoftkeyVisible()) { - _AKNTRACE( "[%s][%s] TryExitL(EEikBidOk) ", "CAknQueryDialog", __FUNCTION__); TryExitL(EEikBidOk); } else { - _AKNTRACE( "[%s][%s] TryExitL(EEikBidCancel) ", "CAknQueryDialog", __FUNCTION__); TryExitL(EEikBidCancel); } - _AKNTRACE_FUNC_EXIT; } /** @@ -723,7 +659,6 @@ */ EXPORT_C TBool CAknQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId : %d ", "CAknQueryDialog", __FUNCTION__,aButtonId); if ( aButtonId == EAknSoftkeyEmergencyCall ) { // ECS number entered and "call" softkey pressed, @@ -732,21 +667,17 @@ CAknQueryControl* control = QueryControl(); if ( control ) { - _AKNTRACE( "[%s][%s] AttemptEmergencyCall ", "CAknQueryDialog", __FUNCTION__); control->AttemptEmergencyCallL(); } - _AKNTRACE( "[%s][%s] return ETrue without doing anything", "CAknQueryDialog", __FUNCTION__); + return ETrue; } else if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk)) || aButtonId == GetRightCBAShortKeyPress() ) - { - _AKNTRACE( "[%s][%s] return ETrue without doing anything ", "CAknQueryDialog", __FUNCTION__); + { return ETrue; } - - _AKNTRACE( "[%s][%s] return EFalse without doing anyting ", "CAknQueryDialog", __FUNCTION__); return EFalse; } @@ -765,12 +696,10 @@ */ EXPORT_C void CAknQueryDialog::SetPromptL(const TDesC& aPrompt) { - _AKNTRACE_FUNC_ENTER; delete iPrompt; iPrompt = NULL; iPrompt = aPrompt.AllocL(); DoSetPromptL(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknQueryDialog::DoSetPromptL() @@ -849,13 +778,10 @@ EXPORT_C void CAknQueryDialog::MakeLeftSoftkeyVisible(TBool aVisible) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aVisible: %d ", "CAknQueryDialog", __FUNCTION__, aVisible); CEikButtonGroupContainer& btnGroupContainer = ButtonGroupContainer(); // left softkey TBool isVisible = btnGroupContainer.IsCommandVisibleByPosition(CEikButtonGroupContainer::ELeftSoftkeyPosition); - _AKNTRACE( "[%s][%s] isVisible: %d ", "CAknQueryDialog", __FUNCTION__, isVisible); if ( isVisible != aVisible ) { btnGroupContainer.MakeCommandVisibleByPosition(CEikButtonGroupContainer::ELeftSoftkeyPosition,aVisible); @@ -870,20 +796,16 @@ btnGroupContainer.MakeCommandVisibleByPosition(CEikButtonGroupContainer::EMiddleSoftkeyPosition,aVisible); } } - _AKNTRACE_FUNC_EXIT; } void CAknQueryDialog::PlayTone() { - _AKNTRACE_FUNC_ENTER; if (iTone != 0 && iSoundSystem) { - _AKNTRACE( "[%s][%s] iSoundSystem->PlaySound(iTone)", "CAknQueryDialog", __FUNCTION__); iSoundSystem->PlaySound(iTone); } - _AKNTRACE_FUNC_EXIT; } /** @@ -893,12 +815,10 @@ */ void CAknQueryDialog::ReportUserActivity() const { - _AKNTRACE_FUNC_ENTER; #ifdef AVKON_RDEBUG_INFO RDebug::Print(_L("Reset user inactivity")); #endif User::ResetInactivityTime(); - _AKNTRACE_FUNC_EXIT; } TInt CAknQueryDialog::GetLeftCBAShortKeyPress() @@ -913,12 +833,8 @@ TBool CAknQueryDialog::IsLeftSoftkeyVisible() { - _AKNTRACE_FUNC_ENTER; - TBool visible = ButtonGroupContainer().ButtonGroup()->IsCommandVisible( - ButtonGroupContainer().ButtonGroup()->CommandId(0)); - _AKNTRACE( "[%s][%s] visible: %d", "CAknQueryDialog", __FUNCTION__, visible); - _AKNTRACE_FUNC_EXIT; - return visible; + return ButtonGroupContainer().ButtonGroup()->IsCommandVisible( + ButtonGroupContainer().ButtonGroup()->CommandId(0)); } /** @@ -926,36 +842,26 @@ */ EXPORT_C void CAknQueryDialog::SetEmergencyCallSupport( TBool aOnOff ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aOnOff: %d", "CAknQueryDialog", __FUNCTION__, aOnOff); iFlags.Assign(CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknQueryDialog::SetPredictiveTextInputPermitted( TBool aPermitted ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aPermitted: %d", "CAknQueryDialog", __FUNCTION__, aPermitted); iFlags.Assign( CAknQueryControl::EPredictiveTextEntryPermitted, aPermitted ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknQueryDialog::RemoveEditorIndicator() { - _AKNTRACE_FUNC_ENTER; iFlags.Assign(CAknQueryControl::EEditorIndicatorOff,ETrue); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknQueryDialog::SetHeaderTextL(const TDesC& aHeader) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aHeader: %s", "CAknQueryDialog", __FUNCTION__, &aHeader); CAknPopupHeadingPane* controlHeading = QueryHeading(); if (controlHeading) controlHeading->SetTextL(aHeader); + LayoutAndDraw(); - _AKNTRACE_FUNC_EXIT; } /** @@ -968,18 +874,14 @@ TQueryValidationStatus /*aStatus*/ ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aEventType: %d", "CAknQueryDialog", __FUNCTION__, aEventType); if (aEventType == EEmergencyCallAttempted) { - _AKNTRACE( "[%s][%s] TryExitL(EEikBidCancel)", "CAknQueryDialog", __FUNCTION__); TryExitL(EEikBidCancel); } else { UpdateLeftSoftKeyL(); } - _AKNTRACE_FUNC_EXIT; return EFalse; } @@ -1033,47 +935,35 @@ } EXPORT_C void CAknQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) - { - CAknAppUi *appUi = iAvkonAppUi; - CCoeControl *redirectControl = NULL; - TRect rectToScreenOfControl; - - if (!Rect().Contains(aPointerEvent.iPosition)) + { + if ( AknLayoutUtils::PenEnabled() ) { - CAknTouchPane* touchPane = appUi->TouchPane(); - CEikStatusPane *statusPane = appUi->StatusPane(); - - if ( touchPane && touchPane->IsVisible() ) + + CAknTouchPane* touchPane = iAvkonAppUi->TouchPane(); + + if ( !Rect().Contains( aPointerEvent.iPosition ) && touchPane + && touchPane->IsVisible() ) { // touchpane is a window-owning control -> Rect() cannot be used - rectToScreenOfControl.SetRect( touchPane->Position(), touchPane->Size() ); - redirectControl = touchPane; - } - else if ( statusPane && statusPane->IsVisible() && - Layout_Meta_Data::IsLandscapeOrientation() && - !IsFocused()) - { - CCoeControl* cbControl = statusPane->ControlL(TUid::Uid(EEikStatusPaneUidCombined)); - if ( cbControl && !statusPane->IsFaded() ) + TRect touchPaneRect( touchPane->Position(), touchPane->Size() ); + + if ( touchPaneRect.Contains( aPointerEvent.iParentPosition ) ) { - rectToScreenOfControl.SetRect( cbControl->PositionRelativeToScreen(), cbControl->Size() ); - redirectControl = cbControl; + TPointerEvent pointerEvent( aPointerEvent ); + + // make event's coordinates touch pane relative + pointerEvent.iPosition = aPointerEvent.iParentPosition - + touchPaneRect.iTl; + + static_cast( touchPane )->HandlePointerEventL( + pointerEvent ); } } - } - - if ( redirectControl && rectToScreenOfControl.Contains(aPointerEvent.iParentPosition) ) - { - // make event's coordinates relative to new control. - TPointerEvent pointerEvent( aPointerEvent ); - pointerEvent.iPosition = aPointerEvent.iParentPosition - rectToScreenOfControl.iTl; - - redirectControl->HandlePointerEventL( pointerEvent ); - } - else - { - // Forward also those pointerevents that the dialog rect does not contain - CAknDialog::HandlePointerEventL( aPointerEvent ); + else + { + // Forward also those pointerevents that the dialog rect does not contain + CAknDialog::HandlePointerEventL( aPointerEvent ); + } } } @@ -1151,15 +1041,12 @@ // EXPORT_C void CAknQueryDialog::SetEmergencyCallSupportForCBA( TBool aOnOff ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aOnOff:%d ", "CAknQueryDialog", __FUNCTION__, aOnOff); if ( aOnOff ) { // Ensure also that the EEmergencyCallsEnabledByAPI is set. iFlags.Assign( CAknQueryControl::EEmergencyCallsEnabledByAPI, aOnOff ); } iFlags.Assign( CAknQueryControl::EEmergencyCallsCBASupport, aOnOff ); - _AKNTRACE_FUNC_EXIT; } @@ -1174,10 +1061,8 @@ */ EXPORT_C CAknTextQueryDialog* CAknTextQueryDialog::NewL(TDes& aDataText, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknTextQueryDialog* self = new (ELeave) CAknTextQueryDialog(aDataText, aTone); AKNTASHOOK_ADDL( self, "CAknTextQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -1197,7 +1082,6 @@ EXPORT_C CAknTextQueryDialog::~CAknTextQueryDialog() { - _AKNTRACE( "[%s][%s] ", "CAknTextQueryDialog", "~CAknTextQueryDialog"); AKNTASHOOK_REMOVE(); } @@ -1216,8 +1100,6 @@ EXPORT_C void CAknTextQueryDialog::SetDefaultInputMode(TInt aInputMode) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aInputMode:%d ", "CAknTextQueryDialog", __FUNCTION__,aInputMode); CAknQueryControl* control = QueryControl(); if ( control ) { @@ -1227,17 +1109,14 @@ secretEditor->SetDefaultInputMode(aInputMode); } } - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknTextQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::PreLayoutDynInitL(); SetControlTextL(); UpdateLeftSoftKeyL(); - _AKNTRACE_FUNC_EXIT; } @@ -1275,7 +1154,6 @@ */ EXPORT_C TBool CAknTextQueryDialog::OkToExitL( TInt aButtonId ) { - _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknTextQueryDialog", __FUNCTION__,aButtonId); if ( aButtonId == EAknSoftkeyEmergencyCall ) { // ECS number entered and "call" softkey pressed, @@ -1286,7 +1164,7 @@ { control->AttemptEmergencyCallL(); } - _AKNTRACE( "[%s][%s] return ETrue ", "CAknTextQueryDialog", __FUNCTION__); + return ETrue; } else if ( ( IsLeftSoftkeyVisible() && @@ -1298,16 +1176,13 @@ control->GetText( iDataText ); } - _AKNTRACE( "[%s][%s] GetText and return ETrue ", "CAknTextQueryDialog", __FUNCTION__); return ETrue; } else if( aButtonId == GetRightCBAShortKeyPress() ) { - _AKNTRACE( "[%s][%s] do nothing and return ETrue", "CAknTextQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] return EFalse ", "CAknTextQueryDialog", __FUNCTION__); return EFalse; } @@ -1357,10 +1232,8 @@ */ EXPORT_C CAknNumberQueryDialog* CAknNumberQueryDialog::NewL(TInt& aNumber, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknNumberQueryDialog* self = new (ELeave) CAknNumberQueryDialog(aNumber, aTone); AKNTASHOOK_ADDL( self, "CAknNumberQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -1377,13 +1250,11 @@ EXPORT_C void CAknNumberQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::PreLayoutDynInitL(); CAknQueryControl* control = QueryControl(); if (control) control->SetNumberL(iNumber); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknNumberQueryDialog::SetMinimumAndMaximum( TInt aMinimumValue, @@ -1398,7 +1269,6 @@ EXPORT_C TBool CAknNumberQueryDialog::OkToExitL( TInt aButtonId ) { - _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknNumberQueryDialog", __FUNCTION__,aButtonId); if ( aButtonId == EAknSoftkeyEmergencyCall ) { // ECS number entered and "call" softkey pressed, @@ -1409,12 +1279,11 @@ { control->AttemptEmergencyCallL(); } - _AKNTRACE( "[%s][%s] attempt emergency and return ETrue ", "CAknNumberQueryDialog", __FUNCTION__); + return ETrue; } else if ( aButtonId == GetRightCBAShortKeyPress() ) { - _AKNTRACE( "[%s][%s] do nothing and reutrn ETrue ", "CAknNumberQueryDialog", __FUNCTION__); return ETrue; } else if ( ( IsLeftSoftkeyVisible() && @@ -1427,15 +1296,13 @@ TRAP( e, control->PrepareForFocusLossL() ); if ( e != KErrNone ) { - _AKNTRACE( "[%s][%s] reutrn EFalse ", "CAknNumberQueryDialog", __FUNCTION__); return EFalse; } iNumber = control->GetNumber(); - _AKNTRACE( "[%s][%s] get number and return ETrue ", "CAknNumberQueryDialog", __FUNCTION__); return ETrue; } } - _AKNTRACE( "[%s][%s] return EFalse", "CAknNumberQueryDialog", __FUNCTION__); + return EFalse; } @@ -1476,10 +1343,8 @@ */ EXPORT_C CAknTimeQueryDialog* CAknTimeQueryDialog::NewL(TTime& aTime, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknTimeQueryDialog* self = new (ELeave) CAknTimeQueryDialog(aTime, aTone); AKNTASHOOK_ADDL( self, "CAknTimeQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -1503,12 +1368,10 @@ EXPORT_C void CAknTimeQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::PreLayoutDynInitL(); CAknQueryControl* control = QueryControl(); if (control) control->SetTime(iTime); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknTimeQueryDialog::SetMinimumAndMaximum( const TTime& aMinimum, @@ -1523,7 +1386,6 @@ EXPORT_C TBool CAknTimeQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknTimeQueryDialog", __FUNCTION__,aButtonId); if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) { @@ -1532,15 +1394,11 @@ { iTime = control->GetTime(); } - _AKNTRACE( "[%s][%s] get time and return ETrue ", "CAknTimeQueryDialog", __FUNCTION__); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) - { - _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknTimeQueryDialog", __FUNCTION__); - return ETrue; - } - _AKNTRACE( "[%s][%s] do nothing and return EFalse ", "CAknTimeQueryDialog", __FUNCTION__); + return ETrue; + return EFalse; } @@ -1580,10 +1438,8 @@ */ EXPORT_C CAknDurationQueryDialog* CAknDurationQueryDialog::NewL(TTimeIntervalSeconds& aDuration, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknDurationQueryDialog* self = new (ELeave) CAknDurationQueryDialog(aDuration, aTone); AKNTASHOOK_ADDL( self, "CAknDurationQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -1599,13 +1455,11 @@ EXPORT_C void CAknDurationQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::PreLayoutDynInitL(); CAknQueryControl* control = QueryControl(); if (control) control->SetDuration(iDuration); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknDurationQueryDialog::SetMinimumAndMaximum( const TTimeIntervalSeconds& aMinimumDuration, @@ -1620,7 +1474,6 @@ EXPORT_C TBool CAknDurationQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId:%d ", "CAknDurationQueryDialog", __FUNCTION__,aButtonId); if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) { @@ -1629,15 +1482,12 @@ { iDuration = control->GetDuration(); } - _AKNTRACE( "[%s][%s] get duration and return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) { - _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] return ETrue ", "CAknDurationQueryDialog", __FUNCTION__); return EFalse; } @@ -1694,7 +1544,6 @@ EXPORT_C void CAknFloatingPointQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::PreLayoutDynInitL(); CAknQueryControl* control = QueryControl(); @@ -1704,7 +1553,6 @@ control->SetFloatingPointNumberL(&iNumber); DoSetPromptL(); } - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknFloatingPointQueryDialog::SetMinimumAndMaximum( const TReal& aMinimumNumber, @@ -1719,7 +1567,6 @@ EXPORT_C TBool CAknFloatingPointQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId :%d ", "CAknFloatingPointQueryDialog", __FUNCTION__,aButtonId); if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) { @@ -1728,15 +1575,12 @@ { iNumber = control->GetFloatingPointNumberL(); } - _AKNTRACE( "[%s][%s] Get Floatingpoint number and return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) { - _AKNTRACE( "[%s][%s] do nothing, return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] return ETrue ", "CAknFloatingPointQueryDialog", __FUNCTION__); return EFalse; } @@ -1934,18 +1778,15 @@ //Store new prompt values // { - _AKNTRACE_FUNC_ENTER; delete iSecondPrompt; iSecondPrompt = NULL; iSecondPrompt = aSP.AllocL(); CAknQueryDialog::SetPromptL(aFP); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknMultiLineDataQueryDialog::DoSetPromptL() { - _AKNTRACE_FUNC_ENTER; // //Set prompt in query controls, called during layout // @@ -1954,7 +1795,6 @@ secondControl->SetPromptL(*iSecondPrompt); CAknQueryDialog::DoSetPromptL(); - _AKNTRACE_FUNC_EXIT; } /** @@ -2015,6 +1855,8 @@ UpdateLeftSoftKeyL(); return ETrue; } + + return EFalse; } @@ -2042,7 +1884,6 @@ void CAknMultiLineDataQueryDialog::HandleOrientationSwitch() { - _AKNTRACE_FUNC_ENTER; TBool firstLineEnabled = FirstLineEnabled(); TBool secondLineEnabled = SecondLineEnabled(); @@ -2072,12 +1913,10 @@ ctrl1->SetFocusing(firstLineEnabled); ctrl2->SetFocusing(secondLineEnabled); Layout(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknMultiLineDataQueryDialog::HandleResourceChange(TInt aType) { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::HandleResourceChange(aType); if (aType == KEikDynamicLayoutVariantSwitch) { @@ -2092,12 +1931,10 @@ HandleOrientationSwitch(); TRAP_IGNORE( UpdateLeftSoftKeyL() ); } - _AKNTRACE_FUNC_EXIT; } EXPORT_C TBool CAknMultiLineDataQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId :%d ", "CAknMultiLineDataQueryDialog", __FUNCTION__, aButtonId); if (Layout_Meta_Data::IsLandscapeOrientation()) { if((IsLeftSoftkeyVisible() && @@ -2123,8 +1960,8 @@ HandleOrientationSwitch(); UpdateLeftSoftKeyL(); - _AKNTRACE( "[%s][%s] return EFalse", "CAknMultiLineDataQueryDialog", __FUNCTION__); - return EFalse; + + return EFalse; } } } @@ -2164,20 +2001,20 @@ CleanupStack::PopAndDestroy( text ); } } - _AKNTRACE( "[%s][%s] return ETrue ", "CAknMultiLineDataQueryDialog", __FUNCTION__); + return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) { - _AKNTRACE( "[%s][%s] do nothing,return ETrue ", "CAknMultiLineDataQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] do nothing,return EFalse ", "CAknMultiLineDataQueryDialog", __FUNCTION__); + return EFalse; } EXPORT_C void CAknMultiLineDataQueryDialog::UpdateLeftSoftKeyL() { + if (Layout_Meta_Data::IsLandscapeOrientation()) { if ( (FirstControl()->EditorContentIsValidL() && FirstControl()->IsFocused()) || (SecondControl()->EditorContentIsValidL() && FirstControl()->EditorContentIsValidL()) ) @@ -2233,11 +2070,9 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aTime,*aTime2)); AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, @@ -2247,14 +2082,12 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aDataText,*aDataText2)); iText = aDataText; iSecondText = aDataText2; AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, @@ -2264,13 +2097,11 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aDataText,*aTime)); iText = aDataText; AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, @@ -2280,13 +2111,11 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aDataText,*aNumber)); iText = aDataText; AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TInt* aNumber, @@ -2296,11 +2125,9 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aNumber,*aNumber2)); AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknMultiLineDataQueryDialog::CAknMultiLineDataQueryDialog( TDes* aDataText, @@ -2310,7 +2137,6 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aDataText,*aDuration)); @@ -2325,11 +2151,9 @@ const TTone& aTone) : CAknQueryDialog(aTone) { - _AKNTRACE_FUNC_ENTER; TRAPD(ignore, SetPromptL(DesOrNull(aPrompt), DesOrNull(aPrompt2))); TRAP(ignore,SetDataL(*aTime,*aDuration)); AKNTASHOOK_ADD( this, "CAknMultiLineDataQueryDialog" ); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknMultiLineDataQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) @@ -2370,10 +2194,8 @@ */ EXPORT_C CAknIpAddressQueryDialog* CAknIpAddressQueryDialog::NewL(TInetAddr& aInetAddr, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknIpAddressQueryDialog* self = new (ELeave) CAknIpAddressQueryDialog(aInetAddr, aTone); AKNTASHOOK_ADDL( self, "CAknIpAddressQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -2384,15 +2206,11 @@ EXPORT_C CAknIpAddressQueryDialog::~CAknIpAddressQueryDialog() { - _AKNTRACE_FUNC_ENTER; AKNTASHOOK_REMOVE(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknIpAddressQueryDialog::SetSizeAndPosition( const TSize& aSize ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aSize (W[%d],H[%d]) ", "CAknIpAddressQueryDialog", __FUNCTION__, aSize.iWidth, aSize.iHeight); CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); if(control) { @@ -2426,13 +2244,10 @@ winRect.iTl.iY -= headRect.Height(); } - _AKNTRACE( "[%s][%s] winRect(x[%d], y[%d], W[%d], H[%d] ) ", - "CAknIpAddressQueryDialog", __FUNCTION__, winRect.iTl.iX, winRect.iTl.iY, - winRect.Width(), winRect.Height()); + SetRect(winRect); } } - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknQueryControl* CAknIpAddressQueryDialog::QueryControl() const @@ -2449,7 +2264,6 @@ EXPORT_C void CAknIpAddressQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; #ifndef RD_NO_DIALOG_BORDERS SetBorder(AknBorderId::EAknBorderNotePopup); #else @@ -2478,16 +2292,13 @@ delete iExtension; iExtension = NULL; iExtension = new(ELeave) CAknQueryDialogExtension(this); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknIpAddressQueryDialog::PostLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); if (control) control->StartAnimationL(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C TBool CAknIpAddressQueryDialog::NeedToDismissQueryL(const TKeyEvent& /*aKeyEvent*/) @@ -2506,8 +2317,6 @@ EXPORT_C TBool CAknIpAddressQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId : %d ", - "CAknIpAddressQueryDialog", __FUNCTION__, aButtonId); if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) { @@ -2516,15 +2325,12 @@ { iInetAddr = control->GetInetAddress(); } - _AKNTRACE( "[%s][%s] get address and return ETrue", "CAknIpAddressQueryDialog", __FUNCTION__); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) { - _AKNTRACE( "[%s][%s] do nothing, return ETrue", "CAknIpAddressQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] do nothing, return EFalse", "CAknIpAddressQueryDialog", __FUNCTION__); return EFalse; } @@ -2578,10 +2384,8 @@ */ EXPORT_C CAknFixedPointQueryDialog* CAknFixedPointQueryDialog::NewL(TInt& aNumber, const TTone& aTone) { - _AKNTRACE_FUNC_ENTER; CAknFixedPointQueryDialog* self = new (ELeave) CAknFixedPointQueryDialog(aNumber, aTone); AKNTASHOOK_ADDL( self, "CAknFixedPointQueryDialog" ); - _AKNTRACE_FUNC_EXIT; return self; } @@ -2597,8 +2401,6 @@ EXPORT_C void CAknFixedPointQueryDialog::SetSizeAndPosition( const TSize& aSize ) { - _AKNTRACE_FUNC_ENTER; - _AKNTRACE( "[%s][%s] aSize (W[%d],H[%d]) ", "CAknFixedPointQueryDialog", __FUNCTION__, aSize.iWidth, aSize.iHeight); CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); if(control) { @@ -2632,13 +2434,10 @@ winRect.iTl.iY -= headRect.Height(); } - _AKNTRACE( "[%s][%s] winRect(x[%d], y[%d], W[%d], H[%d] ) ", - "CAknFixedPointQueryDialog", __FUNCTION__, winRect.iTl.iX, winRect.iTl.iY, - winRect.Width(), winRect.Height()); + SetRect(winRect); } } - _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknQueryControl* CAknFixedPointQueryDialog::QueryControl() const @@ -2655,7 +2454,6 @@ EXPORT_C void CAknFixedPointQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; #ifndef RD_NO_DIALOG_BORDERS SetBorder(AknBorderId::EAknBorderNotePopup); #else @@ -2684,16 +2482,13 @@ delete iExtension; iExtension = NULL; iExtension = new(ELeave) CAknQueryDialogExtension(this); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknFixedPointQueryDialog::PostLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; CAknExtQueryControl* control = STATIC_CAST(CAknExtQueryControl*,QueryControl()); if (control) control->StartAnimationL(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C TBool CAknFixedPointQueryDialog::NeedToDismissQueryL(const TKeyEvent& /*aKeyEvent*/) @@ -2712,7 +2507,6 @@ EXPORT_C TBool CAknFixedPointQueryDialog::OkToExitL(TInt aButtonId) { - _AKNTRACE( "[%s][%s] aButtonId : %d ", "CAknFixedPointQueryDialog", __FUNCTION__, aButtonId); if((IsLeftSoftkeyVisible() && (aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk))) { @@ -2721,15 +2515,12 @@ { iNumber = control->GetFixedPointNumber(); } - _AKNTRACE( "[%s][%s] get point number and return ETrue ", "CAknFixedPointQueryDialog", __FUNCTION__); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) { - _AKNTRACE( "[%s][%s] do nothing and return ETrue ", "CAknFixedPointQueryDialog", __FUNCTION__); return ETrue; } - _AKNTRACE( "[%s][%s] return EFalse ", "CAknFixedPointQueryDialog", __FUNCTION__); return EFalse; } @@ -2865,7 +2656,6 @@ EXPORT_C void CAknMultiLineIpQueryDialog::PreLayoutDynInitL() { - _AKNTRACE_FUNC_ENTER; if (Layout_Meta_Data::IsLandscapeOrientation()) { SetBorder( TGulBorder::ENone ); @@ -2900,7 +2690,6 @@ delete iExtension; iExtension = NULL; iExtension = new(ELeave) CAknMultilineQueryDialogExtension(this, CAknMultilineQueryDialogExtension::EMultIPQuery); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknMultiLineIpQueryDialog::SetPromptL(const TDesC& aFP, const TDesC& aSP) @@ -2960,7 +2749,6 @@ void CAknMultiLineIpQueryDialog::HandleOrientationSwitch() { - _AKNTRACE_FUNC_ENTER; TBool firstLineEnabled = FirstLineEnabled(); TBool secondLineEnabled = SecondLineEnabled(); @@ -2990,13 +2778,11 @@ ctrl1->SetFocusing(firstLineEnabled); ctrl2->SetFocusing(secondLineEnabled); Layout(); - _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknMultiLineIpQueryDialog::HandleResourceChange(TInt aType) { - _AKNTRACE_FUNC_ENTER; CAknQueryDialog::HandleResourceChange(aType); if (aType == KEikDynamicLayoutVariantSwitch) { @@ -3011,7 +2797,6 @@ HandleOrientationSwitch(); TRAP_IGNORE( UpdateLeftSoftKeyL() ); } - _AKNTRACE_FUNC_EXIT; } EXPORT_C TBool CAknMultiLineIpQueryDialog::OkToExitL(TInt aButtonId)