imagehandlingutilities/thumbnailmanager/thumbnailserver/src/thumbnailmdsquerytask.cpp
equal
deleted
inserted
replaced
34 // C++ default constructor can NOT contain any code, that might leave. |
34 // C++ default constructor can NOT contain any code, that might leave. |
35 // --------------------------------------------------------------------------- |
35 // --------------------------------------------------------------------------- |
36 // |
36 // |
37 CThumbnailMDSQueryTask::CThumbnailMDSQueryTask( |
37 CThumbnailMDSQueryTask::CThumbnailMDSQueryTask( |
38 CThumbnailTaskProcessor& aProcessor, TInt aPriority, CMdESession* aMdESession, CThumbnailServer& aServer): |
38 CThumbnailTaskProcessor& aProcessor, TInt aPriority, CMdESession* aMdESession, CThumbnailServer& aServer): |
39 CThumbnailTask( aProcessor, aPriority ), iMdESession( aMdESession ), iServer(aServer), iUpdateToDb(ETrue) |
39 CThumbnailTask( aProcessor, aPriority ), iMdESession( aMdESession ), iQuery(NULL), |
|
40 iServer(aServer), iUpdateToDb(ETrue) |
40 { |
41 { |
41 TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this ); |
42 TN_DEBUG2( "CThumbnailMDSQueryTask(0x%08x)::CThumbnailMDSQueryTask()", this ); |
42 } |
43 } |
43 |
44 |
44 |
45 |
181 iQueryType = EURI; |
182 iQueryType = EURI; |
182 iDelete = aDelete; |
183 iDelete = aDelete; |
183 CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL(); |
184 CMdENamespaceDef* defNamespace = &iMdESession->GetDefaultNamespaceDefL(); |
184 CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject ); |
185 CMdEObjectDef& objDef = defNamespace->GetObjectDefL( MdeConstants::Object::KBaseObject ); |
185 |
186 |
|
187 delete iQuery; |
|
188 iQuery = NULL; |
|
189 |
186 iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this ); |
190 iQuery = iMdESession->NewObjectQueryL( *defNamespace, objDef, this ); |
187 iQuery->SetResultMode( EQueryResultModeItem ); |
191 |
188 |
192 if(iQuery) |
189 CMdELogicCondition& rootCondition = iQuery->Conditions(); |
193 { |
190 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
194 iQuery->SetResultMode( EQueryResultModeItem ); |
191 |
195 |
192 // add ID condition |
196 CMdELogicCondition& rootCondition = iQuery->Conditions(); |
193 rootCondition.AddObjectConditionL( aId ); |
197 rootCondition.SetOperator( ELogicConditionOperatorOr ); |
|
198 |
|
199 // add ID condition |
|
200 rootCondition.AddObjectConditionL( aId ); |
|
201 } |
194 } |
202 } |
195 |
203 |
196 // --------------------------------------------------------------------------- |
204 // --------------------------------------------------------------------------- |
197 // CThumbnailMDSQueryTask::ReturnPath() |
205 // CThumbnailMDSQueryTask::ReturnPath() |
198 // --------------------------------------------------------------------------- |
206 // --------------------------------------------------------------------------- |