[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdemultimedia/noatun/library
From: Stefan Gehn <mETz81 () web ! de>
Date: 2007-01-31 20:28:51
Message-ID: 1170275331.813027.31581.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 628888 by metz:
- Add temporary hack to fill KAboutData for loaded plugins
M +1 -2 noatun/plugin.h
M +20 -1 plugin.cpp
--- trunk/KDE/kdemultimedia/noatun/library/noatun/plugin.h #628887:628888
@@ -1,7 +1,6 @@
#ifndef NOATUN__PLUGIN_H
#define NOATUN__PLUGIN_H
-//#include <qobject.h>
#include <kgenericfactory.h>
#include <kxmlguiclient.h>
#include <noatun/plugininterfaces.h>
@@ -157,7 +156,7 @@
{
if (!componentName())
{
- kWarning() << "Noatun::PluginFactory: instance requested but no "
+ kWarning(66666) << "Noatun::PluginFactory: instance requested but no "
"instance name or about data passed to the constructor!" << endl;
s_instance = new KComponentData();
}
--- trunk/KDE/kdemultimedia/noatun/library/plugin.cpp #628887:628888
@@ -4,12 +4,12 @@
#include "noatun/frontend.h"
#include "noatun/plugin.h"
#include "noatun/player.h"
-#include "noatun/plugininterfaces.h"
#include "noatun/stdaction.h"
#include "noatun/pluginloader.h"
#include "noatun/global.h"
#include <kdebug.h>
+#include <kaboutdata.h>
#include <kplugininfo.h>
#include <kmainwindow.h>
#include <kxmlguifactory.h>
@@ -41,6 +41,25 @@
d->plugInto = PlugNowhere;
d->nInstance = nInstance;
+
+ // ===================
+ //FIXME: temporary hack to see where aboutdata is actually fetched from
+ const KPluginInfo *plugInfo = pluginInfo();
+ KAboutData *aboutData = const_cast<KAboutData *>(instance.aboutData());
+ if (plugInfo && aboutData)
+ {
+ kDebug(66666) << k_funcinfo << "Setting KAboutData from KPluginInfo" << endl;
+ aboutData->setProgramName(plugInfo->name().toAscii());
+ aboutData->setShortDescription(plugInfo->comment().toAscii());
+ /*if (!plugInfo->icon().isEmpty())
+ aboutData->setProgramLogo(KIcon(plugInfo->icon()));*/
+ aboutData->setVersion(plugInfo->version().toAscii());
+ aboutData->addAuthor(plugInfo->author().toAscii(), 0, plugInfo->email().toAscii(), 0);
+ aboutData->setHomepage(plugInfo->website().toAscii());
+ }
+ // ===================
+
+
connect(nInstance->frontend(), SIGNAL(newFrontend()), SLOT(slotNewFrontend()));
connect(nInstance->playlist(), SIGNAL(newPlaylist()), SLOT(slotNewPlaylist()));
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic