read the kind of components from plasmarc
This commit is contained in:
parent
06bbb405c5
commit
28f573d18f
@ -27,22 +27,8 @@ install(DIRECTORY qml/ DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/compone
|
||||
|
||||
|
||||
|
||||
ADD_DEFINITIONS(-DTOUCH)
|
||||
#The platform specific stuff, overwrites a copy of the desktop one
|
||||
|
||||
set(plasmacomponentstouch_SRCS
|
||||
plasmacomponentsplugin.cpp
|
||||
qrangemodel.cpp
|
||||
enums.cpp
|
||||
qmenu.cpp
|
||||
qmenuitem.cpp
|
||||
kdialogproxy.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
add_library(plasmacomponentstouchplugin SHARED ${plasmacomponentstouch_SRCS})
|
||||
target_link_libraries(plasmacomponentstouchplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY})
|
||||
|
||||
install(TARGETS plasmacomponentstouchplugin DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
|
||||
install(TARGETS plasmacomponentsplugin DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
|
||||
install(DIRECTORY qml/ DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
|
||||
install(DIRECTORY platformcomponents/touch/ DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
|
||||
|
@ -24,6 +24,8 @@
|
||||
|
||||
#include "qrangemodel.h"
|
||||
|
||||
#include <KSharedConfig>
|
||||
|
||||
#include "enums.h"
|
||||
#include "qmenu.h"
|
||||
#include "qmenuitem.h"
|
||||
@ -33,14 +35,17 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
|
||||
{
|
||||
Q_ASSERT(uri == QLatin1String("org.kde.plasma.components"));
|
||||
|
||||
KConfigGroup cg(KSharedConfig::openConfig("plasmarc"), "Plasma-components-platform");
|
||||
const QString componentsPlatform = cg.readEntry("name", "desktop");
|
||||
|
||||
qmlRegisterType<QMenuProxy>(uri, 0, 1, "Menu");
|
||||
qmlRegisterType<QMenuProxy>(uri, 0, 1, "ContextMenu");
|
||||
qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
|
||||
|
||||
#ifndef TOUCH
|
||||
qmlRegisterType<KDialogProxy>(uri, 0, 1, "QueryDialog");
|
||||
#endif
|
||||
|
||||
if (componentsPlatform == "desktop") {
|
||||
qmlRegisterType<KDialogProxy>(uri, 0, 1, "QueryDialog");
|
||||
}
|
||||
|
||||
qmlRegisterType<Plasma::QRangeModel>(uri, 0, 1, "RangeModel");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user