9
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Search application main implementation.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
10
|
18 |
#include "searchapplication.h"
|
9
|
19 |
#include "search_global.h"
|
|
20 |
|
|
21 |
#include <QtGui>
|
|
22 |
#include <hbapplication.h>
|
|
23 |
#include <qtranslator.h>
|
|
24 |
#include <qlocale.h>
|
|
25 |
|
|
26 |
// ---------------------------------------------------------------------------
|
|
27 |
// main
|
|
28 |
// ---------------------------------------------------------------------------
|
|
29 |
//
|
|
30 |
int main(int argc, char *argv[])
|
|
31 |
{
|
21
|
32 |
SEARCH_FUNC_ENTRY("SEARCH::Search::main"); PERF_APP_LAUNCH_END("SearchApplication Main Called");
|
9
|
33 |
|
21
|
34 |
SearchApplication search(argc, argv);
|
9
|
35 |
QTranslator translator;
|
|
36 |
QString lang = QLocale::system().name();
|
|
37 |
QString path = "Z:/resource/qt/translations/";
|
13
|
38 |
translator.load("search_" + lang, path);
|
21
|
39 |
search.installTranslator(&translator);
|
9
|
40 |
|
|
41 |
QTranslator commonTranslator;
|
|
42 |
commonTranslator.load("common_" + lang, path);
|
21
|
43 |
search.installTranslator(&commonTranslator);
|
9
|
44 |
|
|
45 |
QTranslator musicTranslator;
|
|
46 |
musicTranslator.load("musicplayer_" + lang, path);
|
21
|
47 |
search.installTranslator(&musicTranslator);
|
9
|
48 |
|
|
49 |
QTranslator contactsTranslator;
|
|
50 |
contactsTranslator.load("contacts_" + lang, path);
|
21
|
51 |
search.installTranslator(&contactsTranslator);
|
9
|
52 |
|
|
53 |
QTranslator calenderTranslator;
|
|
54 |
calenderTranslator.load("calendar_" + lang, path);
|
21
|
55 |
search.installTranslator(&calenderTranslator);
|
9
|
56 |
|
|
57 |
QTranslator notesTranslator;
|
|
58 |
notesTranslator.load("notes_" + lang, path);
|
21
|
59 |
search.installTranslator(¬esTranslator);
|
9
|
60 |
PERF_APP_LAUNCH_END("Search Component Cunstructions starts");
|
21
|
61 |
|
9
|
62 |
PERF_APP_LAUNCH_END("Search Component Cunstructions Ends");
|
|
63 |
#ifdef ROM
|
|
64 |
QDir::setCurrent("Z:/");
|
|
65 |
#else
|
|
66 |
QDir::setCurrent("C:/");
|
|
67 |
SEARCHDEBUG("main() - SearchApplication's current dir set to C:/");
|
|
68 |
#endif //ROM
|
|
69 |
search.start();
|
|
70 |
PERF_APP_LAUNCH_END("SearchApplication Ends, Main Event Loop");
|
21
|
71 |
int ret = search.exec();
|
9
|
72 |
SEARCH_FUNC_EXIT("SEARCH::Search::main");
|
|
73 |
return ret;
|
|
74 |
}
|