correctly load the dialog component
This commit is contained in:
parent
edda55f015
commit
4f711a67fc
@ -27,11 +27,13 @@
|
|||||||
#include "qrangemodel.h"
|
#include "qrangemodel.h"
|
||||||
|
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
|
#include <KDebug>
|
||||||
|
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "qmenu.h"
|
#include "qmenu.h"
|
||||||
#include "qmenuitem.h"
|
#include "qmenuitem.h"
|
||||||
#include "kdialogproxy.h"
|
#include "kdialogproxy.h"
|
||||||
|
#include "fullscreendialog.h"
|
||||||
|
|
||||||
Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
|
Q_EXPORT_PLUGIN2(plasmacomponentsplugin, PlasmaComponentsPlugin)
|
||||||
|
|
||||||
@ -52,7 +54,7 @@ EngineBookKeeping *EngineBookKeeping::self()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDeclarativeEngine *EngineBookKeeping::engineFor(QObject *item) const
|
QDeclarativeEngine *EngineBookKeeping::engineFor(QObject *item) const
|
||||||
{
|
{return m_engines.values().first();
|
||||||
foreach (QDeclarativeEngine *engine, m_engines) {
|
foreach (QDeclarativeEngine *engine, m_engines) {
|
||||||
QObject *root = engine->rootContext()->contextObject();
|
QObject *root = engine->rootContext()->contextObject();
|
||||||
QObject *candidate = item;
|
QObject *candidate = item;
|
||||||
@ -96,6 +98,7 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
|
|||||||
qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
|
qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qmlRegisterType<FullScreenDialog>(uri, 0, 1, "FullScreenDialog");
|
||||||
qmlRegisterType<Plasma::QRangeModel>(uri, 0, 1, "RangeModel");
|
qmlRegisterType<Plasma::QRangeModel>(uri, 0, 1, "RangeModel");
|
||||||
|
|
||||||
qmlRegisterUncreatableType<DialogStatus>(uri, 0, 1, "DialogStatus", "");
|
qmlRegisterUncreatableType<DialogStatus>(uri, 0, 1, "DialogStatus", "");
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
QMenuProxy::QMenuProxy (QObject *parent)
|
QMenuProxy::QMenuProxy (QObject *parent)
|
||||||
: QObject(parent),
|
: QObject(parent),
|
||||||
m_status(DialogStatus::Closed)
|
m_status(DialogStatus::Closed)
|
||||||
{qDebug()<<"AAAAAA"<<EngineBookKeeping::self()->engineFor(this);
|
{
|
||||||
m_menu = new QMenu(0);
|
m_menu = new QMenu(0);
|
||||||
connect(m_menu, SIGNAL(triggered(QAction *)),
|
connect(m_menu, SIGNAL(triggered(QAction *)),
|
||||||
this, SLOT(itemTriggered(QAction *)));
|
this, SLOT(itemTriggered(QAction *)));
|
||||||
|
Loading…
Reference in New Issue
Block a user