diff -r 11fa016241a4 -r da3ec8478e66 piprofilerui/ui/hb/src/main.cpp --- a/piprofilerui/ui/hb/src/main.cpp Thu Sep 02 20:27:24 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - -#include -#include -#include -#include -#include -#include "pimainview.h" -#include "piprofilerengine.h" -#include "notifications.h" -#include "pimainwindow.h" - -// Create custom document loader to be able to use custom views in XML. -class PIProfilerDocumentLoader: public HbDocumentLoader -{ -public: - virtual QObject *createObject(const QString& type, const QString &name); -}; - -int main(int argc, char *argv[]) -{ - - // Create application and document loader. - HbApplication app(argc, argv); - PIProfilerDocumentLoader loader; - - // Create Engine and initialize it - PIProfilerEngine engine; - if (!engine.init()) { - Notifications::showErrorNote(QString("Unable to start PI Profiler engine")); - return EXIT_FAILURE; - } - - // create and show main window - PIMainWindow mainWindow(&engine, loader, &app); - mainWindow.show(); - - return app.exec(); -} - -QObject *PIProfilerDocumentLoader::createObject(const QString& type, const QString &name) -{ - // Main view - if (type == PIMainView::staticMetaObject.className()) { - QObject *object = new PIMainView; - object->setObjectName(name); - return object; - } - - return HbDocumentLoader::createObject(type, name); -} -