61 |
61 |
62 void CMemSpyViewThreadInfoItemGeneric::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
62 void CMemSpyViewThreadInfoItemGeneric::ConstructL( const TRect& aRect, CCoeControl& aContainer, TAny* aSelectionRune ) |
63 { |
63 { |
64 const TPtrC pTitle( MemSpyUiUtils::ThreadInfoItemNameByType( iType ) ); |
64 const TPtrC pTitle( MemSpyUiUtils::ThreadInfoItemNameByType( iType ) ); |
65 SetTitleL( pTitle ); |
65 SetTitleL( pTitle ); |
66 // |
66 |
67 /* TODO: |
|
68 if ( iInfoItem->IsReady() == EFalse ) |
|
69 { |
|
70 #ifdef _DEBUG |
|
71 RDebug::Printf( "CMemSpyViewThreadInfoItemGeneric::ConstructL() - show wait note - item not ready, iType: %d", iInfoItem->Type() ); |
|
72 #endif |
|
73 |
|
74 // Wait for engine data to be made ready... |
|
75 ShowWaitNoteL(); |
|
76 } |
|
77 */ |
|
78 CMemSpyViewBase::ConstructL( aRect, aContainer, aSelectionRune ); |
67 CMemSpyViewBase::ConstructL( aRect, aContainer, aSelectionRune ); |
79 } |
68 } |
80 |
69 |
81 |
70 |
82 CMemSpyProcess& CMemSpyViewThreadInfoItemGeneric::Process() const |
71 CMemSpyProcess& CMemSpyViewThreadInfoItemGeneric::Process() const |
200 |
189 |
201 CMemSpyViewBase* CMemSpyViewThreadInfoItemGeneric::PrepareParentViewL() |
190 CMemSpyViewBase* CMemSpyViewThreadInfoItemGeneric::PrepareParentViewL() |
202 { |
191 { |
203 CMemSpyViewThreadInfoItemList* parent = new(ELeave) CMemSpyViewThreadInfoItemList( iMemSpySession, iObserver, iParentProcessId, iThreadId ); |
192 CMemSpyViewThreadInfoItemList* parent = new(ELeave) CMemSpyViewThreadInfoItemList( iMemSpySession, iObserver, iParentProcessId, iThreadId ); |
204 CleanupStack::PushL( parent ); |
193 CleanupStack::PushL( parent ); |
205 parent->ConstructL( Rect(), *Parent() ); //TODO: arguent removed: iInfoItem |
194 parent->ConstructL( Rect(), *Parent(), iType ); |
206 CleanupStack::Pop( parent ); |
195 CleanupStack::Pop( parent ); |
207 return parent; |
196 return parent; |
208 } |
197 } |
209 |
198 |
210 |
199 |
230 |
219 |
231 iModel = new (ELeave) CDesC16ArrayFlat( iThreadInfoItems.Count() + 10 ); |
220 iModel = new (ELeave) CDesC16ArrayFlat( iThreadInfoItems.Count() + 10 ); |
232 |
221 |
233 for( TInt i=0; i<iThreadInfoItems.Count(); i++) |
222 for( TInt i=0; i<iThreadInfoItems.Count(); i++) |
234 { |
223 { |
235 HBufC* iCombined = HBufC::NewL( iThreadInfoItems[i]->Caption().Length() + iThreadInfoItems[i]->Value().Length() + 30 ); |
224 HBufC* combined = HBufC::NewLC( iThreadInfoItems[i]->Caption().Length() + iThreadInfoItems[i]->Value().Length() + 30 ); |
236 /* |
225 /* |
237 else if ( iCombined->Des().MaxLength() < requiredLength ) |
226 else if ( combined->Des().MaxLength() < requiredLength ) |
238 { |
227 { |
239 iCombined = iCombined->ReAllocL( requiredLength ); |
228 combined = combined->ReAllocL( requiredLength ); |
240 }*/ |
229 }*/ |
241 |
|
242 CleanupStack::PushL( iCombined ); |
|
243 |
230 |
244 TPtr pCombined( iCombined->Des() ); |
231 TPtr pCombined( combined->Des() ); |
245 pCombined.Zero(); |
232 pCombined.Zero(); |
246 pCombined.Copy( _L("\t") ); |
233 pCombined.Copy( _L("\t") ); |
247 if( iThreadInfoItems[i]->Caption() != KNullDesC ) |
234 if( iThreadInfoItems[i]->Caption() != KNullDesC ) |
248 pCombined.Append( iThreadInfoItems[i]->Caption() ); |
235 pCombined.Append( iThreadInfoItems[i]->Caption() ); |
249 if( iType != EMemSpyThreadInfoItemTypeChunk ) |
236 if( iType != EMemSpyThreadInfoItemTypeChunk ) |
250 { |
237 { |
251 pCombined.Append( _L("\t\t") ); |
238 pCombined.Append( _L("\t\t") ); |
252 pCombined.Append( iThreadInfoItems[i]->Value() ); |
239 pCombined.Append( iThreadInfoItems[i]->Value() ); |
253 } |
240 } |
254 |
241 |
255 iModel->AppendL( pCombined ); |
242 iModel->AppendL( pCombined ); |
256 |
|
257 CleanupStack::PopAndDestroy( iCombined ); |
|
258 } |
243 } |
259 |
244 |
260 CAknSettingStyleListBox* listbox = static_cast< CAknSettingStyleListBox* >( iListBox ); |
245 CAknSettingStyleListBox* listbox = static_cast< CAknSettingStyleListBox* >( iListBox ); |
261 //listbox->Model()->SetItemTextArray( iInfoItem ); |
246 //listbox->Model()->SetItemTextArray( iInfoItem ); |
262 listbox->Model()->SetItemTextArray( iModel ); |
247 listbox->Model()->SetItemTextArray( iModel ); |