diff -r e492551a0d54 -r 9d806967057c contentstorage/caclient/stub/src/hswidgetregistryservice.cpp --- a/contentstorage/caclient/stub/src/hswidgetregistryservice.cpp Tue Mar 23 23:28:12 2010 +0200 +++ b/contentstorage/caclient/stub/src/hswidgetregistryservice.cpp Tue Mar 23 23:42:03 2010 +0200 @@ -36,27 +36,27 @@ ?Qt_style_documentation */ HsWidgetRegistryServicePrivate::HsWidgetRegistryServicePrivate( - const QString& installationPath, HsWidgetRegistryService* ptrToPublic, - QObject* parent) : QObject(parent) + const QString &installationPath, HsWidgetRegistryService *ptrToPublic, + QObject *parent) : QObject(parent) { Q_UNUSED(ptrToPublic); QStringList manifestPaths; - + this->mInstallationPath = installationPath; QDir currentDir = QDir::current(); QString currentPath = currentDir.absolutePath(); - + //Check widget installation dirs from root of different drives QFileInfoList drives = QDir::drives(); - + // ? - for(int i=0; i < drives.count(); i++) { + for (int i=0; i < drives.count(); i++) { QFileInfo drive = drives.at(i); QString driveLetter = drive.absolutePath(); QString path = currentPath + "/" + mInstallationPath; QDir registryDir(path); - if(registryDir.exists()) { + if (registryDir.exists()) { // ? mManifestDirectories[path] = readManifestDirectories(path); } @@ -74,17 +74,18 @@ /*! ?Qt_style_documentation */ -QList HsWidgetRegistryServicePrivate::widgets() { - QList widgets; - QMapIterator i(mManifestDirectories); +QList HsWidgetRegistryServicePrivate::widgets() +{ + QList widgets; + QMapIterator i(mManifestDirectories); - while (i.hasNext()) { + while (i.hasNext()) { i.next(); QStringList manifestFileList = i.value(); QDir manifestDir(i.key()); - // ? - for(int h=0; h < manifestFileList.count(); h++) { + // ? + for (int h=0; h < manifestFileList.count(); h++) { widgets << readManifestFile(manifestDir.absoluteFilePath(manifestFileList.at(h))); } } @@ -94,15 +95,15 @@ /*! ?Qt_style_documentation */ -IHsWidgetProvider* HsWidgetRegistryServicePrivate::loadProviderFromPlugin( - const QString& pluginName) -{ +IHsWidgetProvider *HsWidgetRegistryServicePrivate::loadProviderFromPlugin( + const QString &pluginName) +{ QPluginLoader loader(pluginName); QObject *plugin = loader.instance(); IHsWidgetProvider *provider = qobject_cast(plugin); - + if (provider) { - // ? + // ? return provider; } @@ -111,7 +112,7 @@ //qDebug("Widget provider load - !provider, deleting plugin.") delete plugin; } - + // qDebug("Widget provider load failed - Not found.") return 0; } @@ -123,10 +124,10 @@ { QStringList widgetDirPaths; QDir registryDir(path); - QStringList widgetDirs = registryDir.entryList(QDir::AllDirs); - - // ? - for (int i=0; i < widgetDirs.count(); ++i) { + QStringList widgetDirs = registryDir.entryList(QDir::AllDirs); + + // ? + for (int i=0; i < widgetDirs.count(); ++i) { widgetDirPaths << registryDir.absoluteFilePath(widgetDirs.at(i)); } return widgetDirPaths; @@ -135,8 +136,8 @@ /*! ?Qt_style_documentation */ -void HsWidgetRegistryServicePrivate::doWidgetRemove(const QString &path, - const QStringList &originalList, const QStringList ¤tList) +void HsWidgetRegistryServicePrivate::doWidgetRemove(const QString &path, + const QStringList &originalList, const QStringList ¤tList) { Q_UNUSED(path); const int originalCount = originalList.count(); @@ -167,7 +168,7 @@ QStringList manifestDir = dir.entryList(filters, QDir::Files); if (!manifestDir.isEmpty()) { - // ? + // ? QString fileName = manifestDir.first(); if (fileName != "hsposterwidgetprovider.manifest") { @@ -177,18 +178,18 @@ widgets = manifest.widgets(); int widgetUid = dir.dirName().toUInt(0, 16); - // ? - for (int i=0; i HsWidgetRegistryService::widgets() { - return mPrivate->widgets(); + return mPrivate->widgets(); } /*! \fn HsWidgetRegistryService::widgetAddedToRegistry(const QList &widgetTokenList); Emitted when new widgets are added to registry. \a widgetTokenList contains list of widget tokens. -*/ +*/ /*! \fn HsWidgetRegistryService::widgetRemovedFromRegistry(int uid) - Emitted when a widget is removed from registry - -*/ + Emitted when a widget is removed from registry - +*/ + + /*! \fn HsWidgetRegistryService::posterWidgetRemovedFromRegistry(int posterWidgetId) - Emitted when a poster widget publisher is removed from cps + Emitted when a poster widget publisher is removed from cps \a posterWidgetId Poster widget id. -*/ +*/ /*! Emits the widgetAddedToRegistry() signal \a widgetsAdded Identifies the added widgets. -*/ +*/ void HsWidgetRegistryService::emitWidgetAddedToRegistry(const QList &widgetsAdded) { emit widgetAddedToRegistry(widgetsAdded); @@ -342,7 +343,7 @@ /*! Emits the widgetRemovedFromRegistry() signal \a uid HsWidget uid. -*/ +*/ void HsWidgetRegistryService::emitWidgetRemovedFromRegistry(int uid) { emit widgetRemovedFromRegistry(uid);