author | Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com> |
Thu, 16 Sep 2010 12:11:40 +0100 | |
changeset 117 | c63ee96dbe5f |
permissions | -rw-r--r-- |
117
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1 |
/* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
8 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
11 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
13 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
15 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
16 |
*/ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
17 |
/* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
18 |
* T_cahswidgetscanner.cpp |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
19 |
* |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
20 |
* Created on: 2009-09-16 |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
21 |
* Author: |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
22 |
*/ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
23 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
24 |
// CLASS HEADER |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
25 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
26 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
27 |
#include <ecom/ecom.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
28 |
#include <QScopedPointer> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
29 |
#include <utf.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
30 |
#include <xml/dom/xmlengdocument.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
31 |
#include <XQConversions> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
32 |
#include <usif/sif/sifcommon.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
33 |
#include <usif/sif/sif.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
34 |
#include <xmlengelement.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
35 |
#include <driveinfo.h> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
36 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
37 |
#include "t_cawidgetscanner.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
38 |
#include "cawidgetscannertestutils.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
39 |
#include "waitactive.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
40 |
#include "casrvengutils.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
41 |
#include "castorageproxy.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
42 |
#include "casrvmanager.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
43 |
#include "casrvplugin.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
44 |
#include "cainnerentry.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
45 |
#include "cainnerquery.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
46 |
#include "caarraycleanup.inl" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
47 |
#include "testconsts.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
48 |
#include "cadef.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
49 |
#include "castorage_global.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
50 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
51 |
#include "cawidgetscannerparser.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
52 |
#include "cawidgetstoragehandler.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
53 |
#include "cawidgetscannerplugin.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
54 |
#include "cawidgetscannerdef.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
55 |
#include "WidgetScannerUtils.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
56 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
57 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
58 |
#include "t_cainstaller.h" |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
59 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
60 |
const TUid KHsWidgetPluginUid = {0x20026FB1}; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
61 |
const TInt installedUid = 0x20053785; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
62 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
63 |
_LIT8( KSisxMimeType, "x-epoc/x-sisx-app" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
64 |
_LIT( KTestLibrary, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\testwidget" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
65 |
_LIT8( KWidgetUID, "testwidgetprovider.dll" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
66 |
_LIT( KWidgetLibrary2, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\testwidget22" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
67 |
_LIT( KWidgetLibrary3, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\testwidget33" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
68 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
69 |
_LIT( KWidget1PackageName, "c:\\testing\\data\\Installs\\validwidget1.SISX" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
70 |
_LIT( KWidget2PackageName, "c:\\testing\\data\\Installs\\validwidget2.SISX" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
71 |
_LIT( KWidget3PackageName, "c:\\testing\\data\\Installs\\validwidget3.SISX" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
72 |
_LIT( KWidget4PackageName, "c:\\testing\\data\\Installs\\validwidget4.SISX" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
73 |
_LIT( KWidget1ManifestName, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\validwidget1.manifest" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
74 |
_LIT( KWidget2ManifestName, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\validwidget2.manifest" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
75 |
_LIT( KWidget3ManifestName, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\validwidget3.manifest" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
76 |
_LIT( KWidget4ManifestName, "C:\\private\\20022F35\\import\\widgetregistry\\20053785\\validwidget4.manifest" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
77 |
_LIT( KWidgetQmFolder, "c:\\resource\\qt\\translations\\" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
78 |
_LIT( KWidgetQmFolderAndFile, "c:\\resource\\qt\\translations\\" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
79 |
_LIT( KWidgetQmFile, "c:\\testing\\data\\t_cawidgetscanner\\widgettranslation_en_GB.qm" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
80 |
_LIT( KWidgetUri1, "testwidget" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
81 |
_LIT( KWidgetUri2, "testwidget22" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
82 |
_LIT( KWidgetUri3, "testwidget33" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
83 |
_LIT( KWidgetUri4, "testwidget44" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
84 |
_LIT( KTranslationFileNameAsInManifest, "widgettranslation" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
85 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
86 |
template <typename RClass> |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
87 |
struct RClassDeleter |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
88 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
89 |
static inline void cleanup(RClass *ptr) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
90 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
91 |
ptr->Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
92 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
93 |
}; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
94 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
95 |
typedef QScopedPointer<RBuf, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
96 |
RClassDeleter<RBuf> > RBufGuard; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
97 |
typedef QScopedPointer<RBuf8, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
98 |
RClassDeleter<RBuf8> > RBuf8Guard; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
99 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
100 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
101 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
102 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
103 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
104 |
void T_CaWidgetScanner::WaitL(TInt aMicroSec) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
105 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
106 |
CWaitActive* wait = CWaitActive::NewL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
107 |
wait->Wait(aMicroSec); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
108 |
delete wait; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
109 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
110 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
111 |
void T_CaWidgetScanner::initTestCase() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
112 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
113 |
const TUid KWidgetHandlerPluginUid = {0x20028707}; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
114 |
TRAPD(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
115 |
iTestUtils = CTestUtils::NewL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
116 |
iTestUtils->CopyDb(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
117 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
118 |
// remove hswidget |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
119 |
iStorage = CCaStorageProxy::NewL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
120 |
iSrvEngUtils = CCaSrvEngUtils::NewL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
121 |
iScr = new Usif::RSoftwareComponentRegistry; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
122 |
User::LeaveIfError(iScr->Connect()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
123 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
124 |
iFs.Connect(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
125 |
iImportPath.CreateL( KMaxPath ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
126 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
127 |
createImportDirectoryL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
128 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
129 |
iInstaller = T_CaInstaller::NewL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
130 |
TPluginParams params; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
131 |
params.engUtils = iSrvEngUtils; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
132 |
params.storageProxy = iStorage; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
133 |
params.softwareRegistry = iScr; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
134 |
iPlugin = iTestUtils->LoadPluginL( KWidgetHandlerPluginUid, ¶ms); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
135 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
136 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
137 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
138 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
139 |
void T_CaWidgetScanner::cleanupTestCase() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
140 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
141 |
QTest::qWait(5000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
142 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
143 |
iTestUtils->RemoveL(KTestDbDest); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
144 |
delete iPlugin; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
145 |
delete iInstaller; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
146 |
delete iStorage; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
147 |
iStorage = NULL; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
148 |
delete iTestUtils; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
149 |
iTestUtils = NULL; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
150 |
delete iSrvEngUtils; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
151 |
iSrvEngUtils = NULL; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
152 |
iScr->Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
153 |
delete iScr; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
154 |
iScr = NULL; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
155 |
iFs.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
156 |
REComSession::FinalClose(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
157 |
iImportPath.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
158 |
iWidgetScanFolder.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
159 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
160 |
iWidgetScanFile1.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
161 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
162 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
163 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
164 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
165 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
166 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
167 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
168 |
void T_CaWidgetScanner::init() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
169 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
170 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
171 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
172 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
173 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
174 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
175 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
176 |
void T_CaWidgetScanner::cleanup() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
177 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
178 |
QTest::qWait(100); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
179 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
180 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
181 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
182 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
183 |
void T_CaWidgetScanner::createImportDirectoryL() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
184 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
185 |
//create "parsed" directory if it doesn't exist yet; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
186 |
// create directory on C: drive |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
187 |
iWidgetScanFolder.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
188 |
iWidgetScanFile1.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
189 |
iWidgetScanFolder.CreateL(KMaxPath); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
190 |
iWidgetScanFile1.CreateL(KMaxPath); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
191 |
iWidgetScanFolder.Append( KPrivate ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
192 |
iWidgetScanFolder.Append( KHSWidgetScanFolder ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
193 |
iWidgetScanFile1.Append(iWidgetScanFolder); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
194 |
iWidgetScanFile1.Append(KManifestFile1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
195 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
196 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
197 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
198 |
// TESTS -------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
199 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
200 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
201 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
202 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
203 |
void T_CaWidgetScanner::testPluginNewL() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
204 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
205 |
//Check only if plugin was created correctly |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
206 |
QVERIFY( iPlugin != NULL); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
207 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
208 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
209 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
210 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
211 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
212 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
213 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
214 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
215 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
216 |
void T_CaWidgetScanner::testAddWidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
217 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
218 |
bool widgetExistsInStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
219 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
220 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
221 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
222 |
TRAP_IGNORE(iInstaller->InstallL(KWidget1PackageName)); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
223 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
224 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
225 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
226 |
TRAP_IGNORE(widgetExistsInStorage = ( iTestUtils->WidgetExistsInStorageL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
227 |
KAttrWidgetLibrary, KTestLibrary, iStorage ) != EFalse )); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
228 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
229 |
// clean after test |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
230 |
TRAP_IGNORE(iInstaller->UninstallL(KWidget1ManifestName)) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
231 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
232 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
233 |
QVERIFY(widgetExistsInStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
234 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
235 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
236 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
237 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
238 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
239 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
240 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
241 |
void T_CaWidgetScanner::testUpdateWidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
242 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
243 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
244 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
245 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
246 |
testUpdateWidgetTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
247 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
248 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
249 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
250 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
251 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
252 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
253 |
void T_CaWidgetScanner::testUpdateWidgetTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
254 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
255 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
256 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
257 |
TInt expectedCount(0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
258 |
TInt actualCount(0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
259 |
bool widgetAExistsInStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
260 |
bool widgetBExistsInStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
261 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
262 |
iInstaller->InstallL(KWidget2PackageName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
263 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
264 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
265 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
266 |
expectedCount = iTestUtils->WidgetsCountL(iStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
267 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
268 |
widgetAExistsInStorage = (iTestUtils->WidgetExistsInStorageL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
269 |
KAttrWidgetLibrary, KWidgetLibrary2, iStorage) != FALSE); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
270 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
271 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
272 |
iInstaller->InstallL(KWidget3PackageName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
273 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
274 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
275 |
widgetBExistsInStorage = (iTestUtils->WidgetExistsInStorageL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
276 |
KAttrWidgetUri, KWidgetUri2, iStorage) != FALSE); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
277 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
278 |
actualCount = iTestUtils->WidgetsCountL(iStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
279 |
TRAP_IGNORE(iInstaller->UninstallL(KWidget2ManifestName)) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
280 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
281 |
TRAP_IGNORE(iInstaller->UninstallL(KWidget3ManifestName)) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
282 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
283 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
284 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
285 |
QVERIFY(widgetAExistsInStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
286 |
QVERIFY(widgetBExistsInStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
287 |
QCOMPARE(actualCount, expectedCount); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
288 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
289 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
290 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
291 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
292 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
293 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
294 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
295 |
void T_CaWidgetScanner::testRemoveMmcWidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
296 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
297 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
298 |
TInt id(KErrNotFound); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
299 |
bool widgetExistsInStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
300 |
bool mmcIdAttributeSet1(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
301 |
bool mmcIdAttributeSet2(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
302 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
303 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
304 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
305 |
//test |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
306 |
iInstaller->InstallL(KWidget1PackageName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
307 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
308 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
309 |
id = AppendMmcIdL(_L("TestWidget")); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
310 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
311 |
mmcIdAttributeSet1 = MmcAttributeSetL(id); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
312 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
313 |
// after unistall mmc id should be removed |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
314 |
iInstaller->UninstallL(KWidget1ManifestName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
315 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
316 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
317 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
318 |
mmcIdAttributeSet2 = MmcAttributeSetL(id); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
319 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
320 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
321 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
322 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
323 |
QVERIFY(mmcIdAttributeSet1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
324 |
QVERIFY(!mmcIdAttributeSet2); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
325 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
326 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
327 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
328 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
329 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
330 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
331 |
void T_CaWidgetScanner::testUpdateTheSameWidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
332 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
333 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
334 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
335 |
testUpdateTheSameWidgetTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
336 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
337 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
338 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
339 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
340 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
341 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
342 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
343 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
344 |
void T_CaWidgetScanner::testUpdateTheSameWidgetTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
345 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
346 |
_LIT( KWText, "TestWidget" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
347 |
TUint flags0(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
348 |
TUint flags1(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
349 |
TUint flags2(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
350 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
351 |
TInt expectedCount(0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
352 |
TInt actualCount(0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
353 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
354 |
iInstaller->InstallL( KWidget1PackageName ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
355 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
356 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
357 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
358 |
flags0 = iTestUtils->GetWidgetFlagsL( KWText, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
359 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
360 |
expectedCount = iTestUtils->WidgetsCountL( iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
361 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
362 |
CCaWidgetDescription* widget = iTestUtils->GetWidgetEntryL( KWText, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
363 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
364 |
if (widget == NULL) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
365 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
366 |
User::Leave(KErrNotFound); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
367 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
368 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
369 |
CleanupStack::PushL( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
370 |
CCaInnerEntry* innerEntry = widget->GetEntryLC(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
371 |
iStorage->TouchL( innerEntry ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
372 |
QTest::qWait( 500 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
373 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
374 |
flags1 = iTestUtils->GetWidgetFlagsL( KWText, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
375 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
376 |
iInstaller->InstallL( KWidget1PackageName ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
377 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
378 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
379 |
flags2 = iTestUtils->GetWidgetFlagsL( KWText, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
380 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
381 |
actualCount = iTestUtils->WidgetsCountL(iStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
382 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
383 |
CleanupStack::PopAndDestroy( innerEntry ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
384 |
CleanupStack::PopAndDestroy( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
385 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
386 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
387 |
// clean after test |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
388 |
iInstaller->UninstallL(KWidget1ManifestName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
389 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
390 |
// QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
391 |
QVERIFY( ~(flags0 & EUsed) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
392 |
QVERIFY( (flags1 & EUsed) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
393 |
QVERIFY( ~(flags2 & EUsed) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
394 |
QCOMPARE(actualCount, expectedCount); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
395 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
396 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
397 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
398 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
399 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
400 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
401 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
402 |
void T_CaWidgetScanner::testUpdateMmcRemoveInsertTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
403 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
404 |
_LIT( KWTextCanNotTranslate, "txt_applib_subtitle_downloads" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
405 |
TPluginParams params; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
406 |
params.engUtils = 0; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
407 |
params.storageProxy = iStorage; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
408 |
params.softwareRegistry = iScr; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
409 |
_LIT( KWTextTranslated, "Downloads" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
410 |
TUint flags0(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
411 |
TUint flags1(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
412 |
TUint flags2(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
413 |
TUint flags3(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
414 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
415 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
416 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
417 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
418 |
iTestUtils->Copy( KWidgetQmFile, KWidgetQmFolder ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
419 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
420 |
CCaWidgetStorageHandler* handler = CCaWidgetStorageHandler::NewL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
421 |
iStorage, *iScr, iFs ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
422 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
423 |
iInstaller->InstallL( KWidget2PackageName ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
424 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
425 |
//get translated widget |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
426 |
RBuf widgetName; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
427 |
widgetName.CreateL( KWTextTranslated ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
428 |
CCaWidgetDescription* widget = iTestUtils->GetWidgetEntryL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
429 |
KWTextTranslated, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
430 |
if( !widget ) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
431 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
432 |
widgetName.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
433 |
widgetName.CreateL( KWTextCanNotTranslate ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
434 |
//qm file has not found |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
435 |
widget = iTestUtils->GetWidgetEntryL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
436 |
KWTextCanNotTranslate, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
437 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
438 |
flags0 = iTestUtils->GetWidgetFlagsL( widgetName, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
439 |
CleanupStack::PushL( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
440 |
CCaInnerEntry* innerEntry = widget->GetEntryLC(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
441 |
iStorage->TouchL( innerEntry ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
442 |
QTest::qWait( 500 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
443 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
444 |
flags1 = iTestUtils->GetWidgetFlagsL( widgetName, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
445 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
446 |
CCaWidgetDescription* widget2 = iTestUtils->GetWidgetEntryL( widgetName, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
447 |
CleanupStack::PushL( widget2 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
448 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
449 |
// set missing |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
450 |
handler->SetMissingFlagL( widget2 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
451 |
flags2 = iTestUtils->GetWidgetFlagsL( widgetName, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
452 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
453 |
iInstaller->InstallL( KWidget2PackageName ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
454 |
QTest::qWait( 4000 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
455 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
456 |
flags3 = iTestUtils->GetWidgetFlagsL( widgetName, iStorage ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
457 |
widgetName.Close(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
458 |
CleanupStack::PopAndDestroy( widget2 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
459 |
CleanupStack::PopAndDestroy( innerEntry ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
460 |
CleanupStack::PopAndDestroy( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
461 |
iTestUtils->RemoveL( KWidgetQmFolderAndFile ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
462 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
463 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
464 |
// clean after test |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
465 |
iInstaller->UninstallL(KWidget2ManifestName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
466 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
467 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
468 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
469 |
QVERIFY( ~(flags0 & EUsed) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
470 |
QVERIFY( flags1 & EUsed ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
471 |
QVERIFY( ~(flags1 & EMissing) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
472 |
QVERIFY( flags2 & EUsed ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
473 |
QVERIFY( flags2 & EMissing ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
474 |
QVERIFY( flags3 & ~EUsed ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
475 |
QVERIFY( flags3 & ~EMissing ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
476 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
477 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
478 |
void T_CaWidgetScanner::testUpdateMmcRemoveInsert() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
479 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
480 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
481 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
482 |
testUpdateMmcRemoveInsertTrapped() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
483 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
484 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
485 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
486 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
487 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
488 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
489 |
void T_CaWidgetScanner::testRemoveWidget() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
490 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
491 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
492 |
bool widgetExistedInStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
493 |
bool widgetRemovedFromStorage(false); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
494 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
495 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
496 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
497 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
498 |
iInstaller->InstallL(KWidget1PackageName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
499 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
500 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
501 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
502 |
widgetExistedInStorage =( iTestUtils->WidgetExistsInStorageL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
503 |
KAttrWidgetLibrary, KTestLibrary, iStorage ) != FALSE); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
504 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
505 |
iInstaller->UninstallL(KWidget1ManifestName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
506 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
507 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
508 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
509 |
widgetRemovedFromStorage = ((iTestUtils->WidgetExistsInStorageL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
510 |
KAttrWidgetLibrary, KTestLibrary, iStorage )) != FALSE); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
511 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
512 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
513 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
514 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
515 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
516 |
QVERIFY(widgetExistedInStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
517 |
QVERIFY(widgetRemovedFromStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
518 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
519 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
520 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
521 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
522 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
523 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
524 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
525 |
void T_CaWidgetScanner::testSetMissingFlag() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
526 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
527 |
_LIT( KWText, "TestWidget" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
528 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
529 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
530 |
TUint flags(0U); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
531 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
532 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
533 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
534 |
CCaWidgetStorageHandler* handler = CCaWidgetStorageHandler::NewL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
535 |
iStorage, *iScr, iFs); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
536 |
iInstaller->InstallL(KWidget1PackageName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
537 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
538 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
539 |
CCaWidgetDescription* widget = iTestUtils->GetWidgetEntryL( KWText, iStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
540 |
handler->SetMissingFlagL( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
541 |
delete widget; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
542 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
543 |
flags = iTestUtils->GetWidgetFlagsL(KWText, iStorage); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
544 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
545 |
delete handler; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
546 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
547 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
548 |
// clean after test |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
549 |
TRAP_IGNORE(iInstaller->UninstallL(KWidget1ManifestName)); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
550 |
QTest::qWait(3000); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
551 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
552 |
QVERIFY( flags & EMissing ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
553 |
QVERIFY( ~(flags & EVisible) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
554 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
555 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
556 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
557 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
558 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
559 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
560 |
void T_CaWidgetScanner::testSetLocalizationsL() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
561 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
562 |
CCaWidgetDescription* widget = CCaWidgetDescription::NewLC(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
563 |
widget->SetUriL(KWidgetUri1()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
564 |
widget->SetTranslationFileNameL(KTranslationFileNameAsInManifest()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
565 |
widget->SetTitleL( _L("txt_applib_subtitle_downloads") ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
566 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
567 |
widget->LocalizeTextsL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
568 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
569 |
QVERIFY(!widget->GetStringIdTitle().Compare(_L("txt_applib_subtitle_downloads"))); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
570 |
QVERIFY(!widget->GetStringIdDescription().Compare( KNullDesC )); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
571 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
572 |
RPointerArray<CCaLocalizationEntry> resultContainer; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
573 |
CleanupResetAndDestroyPushL( resultContainer ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
574 |
iStorage->GetLocalizationsL( resultContainer ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
575 |
int a = resultContainer.Count(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
576 |
resultContainer.Reset(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
577 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
578 |
CCaWidgetStorageHandler* handler = CCaWidgetStorageHandler::NewL( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
579 |
iStorage, *iScr, iFs ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
580 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
581 |
widget->SetStringidTitleL( _L("titleId") ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
582 |
handler->SetLocalizationsL( widget, 2000 ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
583 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
584 |
iStorage->GetLocalizationsL( resultContainer ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
585 |
int b = resultContainer.Count(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
586 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
587 |
QCOMPARE( a+1, b ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
588 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
589 |
delete handler; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
590 |
CleanupStack::PopAndDestroy( &resultContainer ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
591 |
CleanupStack::PopAndDestroy( widget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
592 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
593 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
594 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
595 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
596 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
597 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
598 |
void T_CaWidgetScanner::testUtils() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
599 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
600 |
RBuf mmcId; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
601 |
mmcId.CleanupClosePushL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
602 |
mmcId.CreateL(KMassStorageIdLength); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
603 |
WidgetScannerUtils::CurrentMmcId(iFs, mmcId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
604 |
TInt mmcDrive; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
605 |
if( DriveInfo::GetDefaultDrive( DriveInfo::EDefaultRemovableMassStorage, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
606 |
mmcDrive ) == KErrNone ) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
607 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
608 |
QVERIFY(mmcId.Length() > 0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
609 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
610 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
611 |
CleanupStack::PopAndDestroy( &mmcId ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
612 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
613 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
614 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
615 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
616 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
617 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
618 |
void T_CaWidgetScanner::testParsePreviewImageName() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
619 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
620 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
621 |
TChar drive = 'c'; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
622 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
623 |
RBuf expectedPreviewFileName; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
624 |
RBufGuard expectedPreviewFileNameGuard(&expectedPreviewFileName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
625 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
626 |
QScopedPointer < CCaWidgetScannerParser > parser; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
627 |
QScopedPointer < CCaWidgetDescription > widgetDescriptor; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
628 |
QT_TRAP_THROWING(parser.reset(CCaWidgetScannerParser::NewL(iFs))); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
629 |
QT_TRAP_THROWING(widgetDescriptor.reset( CCaWidgetDescription::NewL()) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
630 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
631 |
_LIT8( KPreviewFileName8, "preview.png" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
632 |
_LIT( KPreviewFileName, "preview.png" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
633 |
_LIT( KWidgetPackageId, "12345678" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
634 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
635 |
TXmlEngElement element; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
636 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
637 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
638 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
639 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
640 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
641 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
642 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
643 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
644 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
645 |
doc.CreateDocumentElementL(KPreviewImageElementName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
646 |
element.AddTextL(KPreviewFileName8()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
647 |
parser->ParsePreviewImageNameL( element, KWidgetPackageId(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
648 |
widgetDescriptor.data(), drive); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
649 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
650 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
651 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
652 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
653 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
654 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
655 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
656 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
657 |
HBufC *manifestPath = parser->GetManifestDirectoryPathLC( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
658 |
KWidgetPackageId(), drive ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
659 |
expectedPreviewFileName.CreateL(manifestPath->Length() + |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
660 |
KPreviewFileName().Length()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
661 |
expectedPreviewFileName.Append(*manifestPath); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
662 |
expectedPreviewFileName.Append(KPreviewFileName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
663 |
CleanupStack::PopAndDestroy( manifestPath ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
664 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
665 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
666 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
667 |
const QString exp = XQConversions::s60DescToQString(expectedPreviewFileName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
668 |
const QString act = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
669 |
XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
670 |
widgetDescriptor->GetPreviewImageName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
671 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
672 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
673 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
674 |
RBuf expectedPreviewSkinId; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
675 |
RBufGuard expectedPreviewSkinIdGuard(&expectedPreviewSkinId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
676 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
677 |
_LIT8( KPreviewSkinId, "skin_id" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
678 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
679 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
680 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
681 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
682 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
683 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
684 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
685 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
686 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
687 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
688 |
doc.CreateDocumentElementL(KPreviewImageElementName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
689 |
element.AddTextL(KPreviewSkinId()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
690 |
parser->ParsePreviewImageNameL( element, KWidgetPackageId(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
691 |
widgetDescriptor.data(), drive); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
692 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
693 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
694 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
695 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
696 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
697 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
698 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
699 |
expectedPreviewSkinId.Assign( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
700 |
CnvUtfConverter::ConvertToUnicodeFromUtf8L(KPreviewSkinId())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
701 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
702 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
703 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
704 |
const QString exp = XQConversions::s60DescToQString(expectedPreviewSkinId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
705 |
const QString act = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
706 |
XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
707 |
widgetDescriptor->GetPreviewImageName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
708 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
709 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
710 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
711 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
712 |
RBuf8 attributeValueTooLong; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
713 |
RBuf8Guard attributeValueTooLongGuard(&attributeValueTooLong); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
714 |
attributeValueTooLong.CreateL(KCaMaxAttrValueLen + 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
715 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
716 |
for (int i = KCaMaxAttrValueLen; i >= 0 ; --i) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
717 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
718 |
attributeValueTooLong.Append(_L8("a")); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
719 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
720 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
721 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
722 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
723 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
724 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
725 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
726 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
727 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
728 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
729 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
730 |
doc.CreateDocumentElementL(KPreviewImageElementName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
731 |
element.AddTextL(attributeValueTooLong); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
732 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
733 |
parser->ParsePreviewImageNameL( element, KWidgetPackageId(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
734 |
widgetDescriptor.data(), drive); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
735 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
736 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
737 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
738 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
739 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
740 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
741 |
QCOMPARE(widgetDescriptor->GetPreviewImageName().Length(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
742 |
KCaMaxAttrValueLen + 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
743 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
744 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
745 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
746 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
747 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
748 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
749 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
750 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
751 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
752 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
753 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
754 |
doc.CreateDocumentElementL(KPreviewImageElementName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
755 |
element.AddTextL(KNullDesC8); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
756 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
757 |
parser->ParsePreviewImageNameL( element, KWidgetPackageId(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
758 |
widgetDescriptor.data(), drive); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
759 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
760 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
761 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
762 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
763 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
764 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
765 |
const QString exp = XQConversions::s60DescToQString(KNullDesC);; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
766 |
const QString act = XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
767 |
widgetDescriptor->GetPreviewImageName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
768 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
769 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
770 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
771 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
772 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
773 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
774 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
775 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
776 |
void T_CaWidgetScanner::testParseIconName() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
777 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
778 |
TInt err(KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
779 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
780 |
TChar drive = 'c'; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
781 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
782 |
RBuf expectedIconFileName; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
783 |
RBufGuard expectedIconFileNameGuard(&expectedIconFileName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
784 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
785 |
QScopedPointer < CCaWidgetScannerParser > parser; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
786 |
QScopedPointer < CCaWidgetDescription > widgetDescriptor; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
787 |
QT_TRAP_THROWING(parser.reset(CCaWidgetScannerParser::NewL(iFs))); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
788 |
QT_TRAP_THROWING(widgetDescriptor.reset( CCaWidgetDescription::NewL()) ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
789 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
790 |
_LIT8( KIconName8, "preview.png" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
791 |
_LIT( KIconName, "preview.png" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
792 |
_LIT( KWidgetPackageId, "12345678" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
793 |
TXmlEngElement element; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
794 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
795 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
796 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
797 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
798 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
799 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
800 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
801 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
802 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
803 |
doc.CreateDocumentElementL(KIcon()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
804 |
element.AddTextL(KIconName8()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
805 |
parser->ParseIconL( element, KWidgetPackageId(), widgetDescriptor.data(), drive ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
806 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
807 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
808 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
809 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
810 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
811 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
812 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
813 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
814 |
HBufC *manifestPath = parser->GetManifestDirectoryPathLC( KWidgetPackageId(), drive ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
815 |
expectedIconFileName.CreateL(manifestPath->Length() + KIconName().Length()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
816 |
expectedIconFileName.Append(*manifestPath); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
817 |
expectedIconFileName.Append(KIconName()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
818 |
CleanupStack::PopAndDestroy(manifestPath); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
819 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
820 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
821 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
822 |
const QString exp = XQConversions::s60DescToQString(expectedIconFileName); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
823 |
const QString act = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
824 |
XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
825 |
widgetDescriptor->GetIconUri()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
826 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
827 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
828 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
829 |
RBuf expectedIconSkinId; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
830 |
RBufGuard expectedIconSkinIdGuard(&expectedIconSkinId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
831 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
832 |
_LIT8( KIconSkinId, "skin_id" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
833 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
834 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
835 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
836 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
837 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
838 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
839 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
840 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
841 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
842 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
843 |
doc.CreateDocumentElementL(KIcon()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
844 |
element.AddTextL(KIconSkinId()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
845 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
846 |
parser->ParseIconL(element, KWidgetPackageId(), widgetDescriptor.data(), drive); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
847 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
848 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
849 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
850 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
851 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
852 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
853 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
854 |
expectedIconSkinId.Assign( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
855 |
CnvUtfConverter::ConvertToUnicodeFromUtf8L(KIconSkinId())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
856 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
857 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
858 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
859 |
const QString exp = XQConversions::s60DescToQString(expectedIconSkinId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
860 |
const QString act = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
861 |
XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
862 |
widgetDescriptor->GetIconUri()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
863 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
864 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
865 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
866 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
867 |
RBuf8 veryLongAttributeValue; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
868 |
RBuf8Guard veryLongAttributeValueGuard(&veryLongAttributeValue); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
869 |
veryLongAttributeValue.CreateL(KCaMaxAttrValueLen + 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
870 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
871 |
for (int i = KCaMaxAttrValueLen; i >= 0 ; --i) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
872 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
873 |
veryLongAttributeValue.Append(_L8("a")); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
874 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
875 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
876 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
877 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
878 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
879 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
880 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
881 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
882 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
883 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
884 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
885 |
doc.CreateDocumentElementL(KIcon()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
886 |
element.AddTextL(veryLongAttributeValue); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
887 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
888 |
parser->ParseIconL(element, KWidgetPackageId(), widgetDescriptor.data(), drive ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
889 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
890 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
891 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
892 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
893 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
894 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
895 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
896 |
QCOMPARE(widgetDescriptor->GetIconUri().Length(), |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
897 |
KCaMaxAttrValueLen + 1); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
898 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
899 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
900 |
TRAP(err, |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
901 |
RXmlEngDOMImplementation domImpl; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
902 |
CleanupClosePushL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
903 |
domImpl.OpenL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
904 |
RXmlEngDocument doc; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
905 |
CleanupClosePushL(doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
906 |
doc.OpenL(domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
907 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
908 |
TXmlEngElement element = |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
909 |
doc.CreateDocumentElementL(KIcon()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
910 |
element.AddTextL(KNullDesC8); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
911 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
912 |
parser->ParseIconL(element, KWidgetPackageId(), widgetDescriptor.data(), drive ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
913 |
CleanupStack::PopAndDestroy(&doc); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
914 |
CleanupStack::PopAndDestroy(&domImpl); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
915 |
); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
916 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
917 |
QCOMPARE(err, KErrNone); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
918 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
919 |
const QString exp = XQConversions::s60DescToQString(KNullDesC);; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
920 |
const QString act = XQConversions::s60DescToQString( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
921 |
widgetDescriptor->GetIconUri()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
922 |
QCOMPARE(exp, act); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
923 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
924 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
925 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
926 |
void T_CaWidgetScanner::testCloneWidgetDescriptionL() |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
927 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
928 |
QScopedPointer<CCaWidgetDescription> descriptionA; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
929 |
QT_TRAP_THROWING(descriptionA.reset(CCaWidgetDescription::NewL())); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
930 |
QScopedPointer<CCaWidgetDescription> descriptionB( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
931 |
descriptionA->CloneL()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
932 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
933 |
QVERIFY(descriptionA->Compare(*descriptionB) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
934 |
!= static_cast<TInt>(EFalse)); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
935 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
936 |
_LIT( KTestDescription, "GetDescription()" ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
937 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
938 |
QT_TRAP_THROWING( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
939 |
descriptionA->SetDescriptionL( KTestDescription ) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
940 |
) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
941 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
942 |
QVERIFY(descriptionA->Compare(*descriptionB) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
943 |
== static_cast<TInt>(EFalse)); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
944 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
945 |
QScopedPointer<CCaWidgetDescription> descriptionC( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
946 |
descriptionA->CloneL()); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
947 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
948 |
QVERIFY(descriptionA->Compare(*descriptionC) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
949 |
!= static_cast<TInt>(EFalse)); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
950 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
951 |
QVERIFY(descriptionA->GetDescription().Compare( KTestDescription ) == 0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
952 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
953 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
954 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
955 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
956 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
957 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
958 |
TInt T_CaWidgetScanner::AppendMmcIdL(const TDesC& aText) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
959 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
960 |
//get mmc id |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
961 |
RBuf mmcId; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
962 |
mmcId.CleanupClosePushL(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
963 |
mmcId.CreateL(_L("mass_storage")); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
964 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
965 |
//append mmc id to the entry |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
966 |
CCaInnerQuery* query = CCaInnerQuery::NewLC(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
967 |
CDesC16ArrayFlat* widgetType = new ( ELeave ) CDesC16ArrayFlat( |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
968 |
KGranularityOne ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
969 |
CleanupStack::PushL( widgetType ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
970 |
widgetType->AppendL( KCaTypeWidget ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
971 |
query->SetEntryTypeNames( widgetType );//transfers ownership to query |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
972 |
CleanupStack::Pop( widgetType ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
973 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
974 |
RPointerArray<CCaInnerEntry> entries; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
975 |
CleanupResetAndDestroyPushL( entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
976 |
iStorage->GetEntriesL( query, entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
977 |
TInt id(0); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
978 |
for( TInt i = 0; i < entries.Count(); i++ ) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
979 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
980 |
if(entries[i]->GetText().Compare(aText)==0) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
981 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
982 |
entries[i]->AddAttributeL(KCaAttrMmcId, mmcId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
983 |
id = entries[i]->GetId(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
984 |
iStorage->AddL(entries[i]); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
985 |
break; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
986 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
987 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
988 |
CleanupStack::PopAndDestroy( &entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
989 |
CleanupStack::PopAndDestroy( query ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
990 |
CleanupStack::PopAndDestroy( &mmcId ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
991 |
return id; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
992 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
993 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
994 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
995 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
996 |
// --------------------------------------------------------------------------- |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
997 |
// |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
998 |
TBool T_CaWidgetScanner::MmcAttributeSetL(TInt aId) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
999 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1000 |
TBool result(EFalse); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1001 |
CCaInnerQuery* query = CCaInnerQuery::NewLC(); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1002 |
RArray<TInt> ids; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1003 |
CleanupClosePushL(ids); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1004 |
ids.AppendL(aId); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1005 |
query->SetIdsL(ids); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1006 |
CleanupStack::PopAndDestroy(&ids); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1007 |
RPointerArray<CCaInnerEntry> entries; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1008 |
CleanupResetAndDestroyPushL( entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1009 |
iStorage->GetEntriesL( query, entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1010 |
if (entries.Count() == 1) |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1011 |
{ |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1012 |
TPtrC temp(KNullDesC); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1013 |
result = entries[0]->FindAttribute(KCaAttrMmcId, temp); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1014 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1015 |
CleanupStack::PopAndDestroy( &entries ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1016 |
CleanupStack::PopAndDestroy( query ); |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1017 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1018 |
return result; |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1019 |
} |
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1020 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1021 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1022 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1023 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1024 |
|
c63ee96dbe5f
Missing activityfw and taskswitcher components - fix for Bug 3670
Jaakko Haukipuro (Nokia-MS/Oulu) <Jaakko.Haukipuro@nokia.com>
parents:
diff
changeset
|
1025 |
QTEST_MAIN(T_CaWidgetScanner); |