diff options
-rw-r--r-- | editor/tool.cc | 2 | ||||
-rw-r--r-- | editor/tool.h | 2 | ||||
-rw-r--r-- | editor/widget.cc | 4 | ||||
-rw-r--r-- | editor/widget.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/editor/tool.cc b/editor/tool.cc index c4686d2..9deaee7 100644 --- a/editor/tool.cc +++ b/editor/tool.cc @@ -34,7 +34,7 @@ #include <QDomElement> -Tool::Tool(QDomNode &node) +Tool::Tool(QDomNode node) : QLabel() { this->node = node; diff --git a/editor/tool.h b/editor/tool.h index 8561f94..9015079 100644 --- a/editor/tool.h +++ b/editor/tool.h @@ -35,7 +35,7 @@ class Tool : public QLabel { Q_OBJECT public: - Tool(QDomNode &node); + Tool(QDomNode node); protected: void mousePressEvent(QMouseEvent *event); diff --git a/editor/widget.cc b/editor/widget.cc index cb006f9..79957bd 100644 --- a/editor/widget.cc +++ b/editor/widget.cc @@ -50,10 +50,10 @@ #include "widgetwrapper.h" #include "propertieseditor.h" -Widget::Widget(QDomNode &node) +Widget::Widget(QDomNode node) : QWidget() { - elem = node.toElement(); + elem = node.cloneNode(true).toElement(); iscontainer = false; if(elem.hasAttribute("layout")) { diff --git a/editor/widget.h b/editor/widget.h index eda50b5..48d8d99 100644 --- a/editor/widget.h +++ b/editor/widget.h @@ -36,7 +36,7 @@ class Widget : public QWidget { Q_OBJECT public: - Widget(QDomNode &node); + Widget(QDomNode node); void setValue(QString name, QString value); QString toXml(QString tabs); |