From 28f04285b941608d43d60999142bbdcb2239e58b Mon Sep 17 00:00:00 2001 From: sangsoo lee Date: Mon, 6 May 2013 16:25:15 +0900 Subject: [PATCH] fix 1.0.8 bugs that is variable initialization Change-Id: Iac0ddde863330cd992fb213deca9e3e3049eef80 --- src/IstDetailForm.cpp | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/IstDetailForm.cpp b/src/IstDetailForm.cpp index 27fd284..fd6c280 100644 --- a/src/IstDetailForm.cpp +++ b/src/IstDetailForm.cpp @@ -93,6 +93,7 @@ DetailForm::DetailForm(void) , __itemCount(0) , __isInstalled(false) , __isUpdatable(false) + , __pPackageAppInfo(null) { } @@ -350,44 +351,48 @@ DetailForm::SetPopupControl() result DetailForm::OnInitializing(void) { + // 1. get initial variable result r = E_SUCCESS; AppResource* pAppResource = Application::GetInstance()->GetAppResource(); - // Set Image Control + + // 2. Set Image Control SetListItemImage(pAppResource); - // Header Item set + // 3. Header Item set __pHeader = GetHeader(); __pHeader->SetTitleIcon(__pHeaderImage); - // Footer Item Set + + // 4. Footer Item Set FooterItem footerItem1; footerItem1.Construct(IDA_INSTALL_BTN); footerItem1.SetText(L"Install"); - Footer* pFooter = GetFooter(); SetFormBackEventListener(this); pFooter->AddActionEventListener(*this); pFooter->AddItem(footerItem1); - // initialize variable + // 5. initialize variable __itemCount = 0; __isUpdatable = false; __isInstalled = false; __isValidPackage = true; - // parsing tpk package info then get and set item count + + // 6. parsing tpk and set validation value r = ParsingTPK(); if (r != E_SUCCESS) { __isValidPackage = false; } - - // Install Confirmation Popup + // 7. set confirmation Popup for installation SetPopupControl(); + // 8. draw other body control contents SetInfoTextBox(); CreateTableView(); - // Set Disable Controls and Open Popup + // 9. draw confirmation Popup for installation ConfirmPopupOn(); + // 10. show controls __pTextBox->SetShowState(false); __pList->SetShowState(false); @@ -399,7 +404,6 @@ result DetailForm::OnTerminating(void) { result r = E_SUCCESS; - delete __pTargetPackageInfo; delete __pPrivilegeList; delete __pPackageAppInfo; @@ -467,18 +471,21 @@ DetailForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Contr int DetailForm::GetGroupCount(void) { + AppLog(" ========== group count ==========="); return 1; } int DetailForm::GetItemCount(int groupIndex) { + AppLog(" ========== item count ==========="); return __itemCount; } Tizen::Ui::Controls::TableViewGroupItem* DetailForm::CreateGroupItem(int groupIndex, int itemWidth) { + AppLog(" ========== create group ==========="); TableViewGroupItem* pItem; pItem = new (std::nothrow) TableViewGroupItem(); pItem->Construct(Dimension(itemWidth, 10)); @@ -488,6 +495,7 @@ DetailForm::CreateGroupItem(int groupIndex, int itemWidth) Tizen::Ui::Controls::TableViewItem* DetailForm::CreateItem(int groupIndex, int itemIndex, int itemWidth) { + AppLog(" ========== create group ==========="); String name; String description; TableViewItem* pItem = new (std::nothrow) TableViewItem(); -- 2.7.4