bind runnermodel in core

This commit is contained in:
Marco Martin 2012-10-03 15:55:11 +02:00
parent 95e5431610
commit 43846dde0e
3 changed files with 12 additions and 1 deletions

View File

@ -29,10 +29,12 @@
#include <Plasma/FrameSvg>
#include <Plasma/Svg>
#include <Plasma/QueryMatch>
#include "datasource.h"
#include "datamodel.h"
#include "framesvgitem.h"
#include "runnermodel.h"
#include "svgitem.h"
#include "theme.h"
#include "dialog.h"
@ -86,6 +88,10 @@ void CoreBindingsPlugin::registerTypes(const char *uri)
qRegisterMetaType<Plasma::ServiceJob*>("ServiceJob");
qmlRegisterType<QAbstractItemModel>();
qmlRegisterType<RunnerModel>(uri, 0, 1, "RunnerModel");
qmlRegisterInterface<Plasma::QueryMatch>("QueryMatch");
qRegisterMetaType<Plasma::QueryMatch *>("QueryMatch");
/*qmlRegisterInterface<Plasma::DataSource>("DataSource");
qRegisterMetaType<Plasma::DataSource*>("DataSource");*/
}

View File

@ -21,12 +21,15 @@
#include <QtDeclarative/qdeclarative.h>
#include <KDebug>
#include <Plasma/QueryMatch>
#include "../core/runnermodel.h"
void RunnerModelPlugin::registerTypes(const char *uri)
{
kWarning() << "Using deprecated import org.kde.runnermodel, please port to org.kde.plasma.core";
Q_ASSERT(uri == QLatin1String("org.kde.runnermodel"));
qmlRegisterType<RunnerModel>(uri, 0, 1, "RunnerModel");
qmlRegisterInterface<Plasma::QueryMatch>("QueryMatch");

View File

@ -22,7 +22,9 @@
#include <QDeclarativeExtensionPlugin>
/*
* FIXME: This plugin is deprecated, it should be removed for plasma2
*/
class RunnerModelPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT