Commit cbb065ad authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Unload QML engine when layout object gets deleted

This allows the QML items to assume that the layout object always exists.
parent 590ae75b
......@@ -69,6 +69,11 @@ KeyboardLayoutEditor::KeyboardLayoutEditor(QWidget* parent):
}
KeyboardLayoutEditor::~KeyboardLayoutEditor()
{
m_view->setSource(QUrl());
}
void KeyboardLayoutEditor::openKeyboardLayout(DataIndexKeyboardLayout* dataIndexKeyboardLayout)
{
DataAccess dataAccess;
......
......@@ -34,6 +34,7 @@ class KeyboardLayoutEditor : public AbstractEditor, private Ui::KeyboardLayoutEd
Q_PROPERTY(int zoomLevel READ zoomLevel WRITE setZoomLevel NOTIFY zoomLevelChanged)
public:
explicit KeyboardLayoutEditor(QWidget* parent = 0);
~KeyboardLayoutEditor();
void openKeyboardLayout(DataIndexKeyboardLayout* dataIndexKeyboardLayout);
void clearUndoStackForKeyboardLayout(DataIndexKeyboardLayout* dataIndexKeyboardLayout);
......
Supports Markdown
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