Commit d35ef225 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Make the widgets "thingie" an actual QML module

parent 06be2332
......@@ -26,6 +26,8 @@
#endif
#include <QDebug>
#include <QFileInfo>
#include <QDir>
#include <QDeclarativeView>
#include <QDeclarativeEngine>
#include <QDeclarativeContext>
......@@ -59,6 +61,10 @@ int main(int argc, char *argv[])
QString main = KStandardDirs::locate("appdata", "plugins/widgets/KAlgebraMobile.qml");
// QString main = KStandardDirs::locate("appdata", "plugins/Tables.qml");
QDir dir = QFileInfo(main).dir();
dir.cdUp();
view.engine()->addImportPath(dir.path());
view.setSource(main);
#ifdef __arm__
......
import QtQuick 1.0
import org.kde.analitza 1.0
import "widgets"
import widgets 1.0
KAlgebraPage
{
......
import QtQuick 1.0
import org.kde.analitza 1.0
import "widgets"
import widgets 1.0
KAlgebraPage
{
......
import QtQuick 1.0
import org.kde.analitza 1.0
import "widgets"
import widgets 1.0
KAlgebraPage
{
......
import QtQuick 1.0
import org.kde.analitza 1.0
import "widgets"
import widgets 1.0
KAlgebraPage
{
......
add_subdirectory(${MOBILE_BACKEND})
\ No newline at end of file
add_subdirectory(${MOBILE_BACKEND})
install( FILES
qmldir
DESTINATION ${DATA_INSTALL_DIR}/kalgebramobile/plugins/widgets/
)
Label 1.0 Label.qml
Button 1.0 Button.qml
CalcButton 1.0 CalcButton.qml
ExpressionInput 1.0 ExpressionInput.qml
RealInput 1.0 RealInput.qml
ToolTip 1.0 ToolTip.qml
SimpleListView 1.0 SimpleListView.qml
KAlgebraPage 1.0 KAlgebraPage.qml
KAlgebraMobile 1.0 KAlgebraMobile.qml
\ No newline at end of file
......@@ -40,7 +40,7 @@ PluginsModel::PluginsModel(QObject* parent) :QStandardItemModel(parent)
QList<QStandardItem*> items;
Q_FOREACH(const QString& file, foundPlugins) {
KConfig info(file);
KConfig info(file, KConfig::SimpleConfig, "appdata");
KConfigGroup cg = info.group("Desktop Entry");
QStandardItem* item = new QStandardItem;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment