summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-05-15 15:10:52 +0200
committerErich Eckner <git@eckner.net>2019-05-15 15:10:52 +0200
commit2730a86d56f323aa3a143dae0999505a3b4cd85b (patch)
tree2cb70049a1af5f255ae3a5f246824a80006d6f76 /src
parent1ea3b6f64f9198c5ede2420b8ff83c4339b754ee (diff)
downloaddbmodel-2730a86d56f323aa3a143dae0999505a3b4cd85b.tar.xz
fix casting
Diffstat (limited to 'src')
-rw-r--r--src/diagramitem.cpp4
-rw-r--r--src/items/database/columnlistmodel.cpp1
-rw-r--r--src/items/database/databasetableproperties.cpp2
-rw-r--r--src/line.cpp2
4 files changed, 4 insertions, 5 deletions
diff --git a/src/diagramitem.cpp b/src/diagramitem.cpp
index cd591ec..23cd83b 100644
--- a/src/diagramitem.cpp
+++ b/src/diagramitem.cpp
@@ -40,7 +40,7 @@ DiagramItem::document() const
void
DiagramItem::loadFromXml(QDomElement element, DiagramDocument *)
{
- setId(element.attribute("id", QUuid()));
+ setId(element.attribute("id", QUuid().toString()));
setPos(readPointElement(element, "position"));
}
@@ -48,7 +48,7 @@ void
DiagramItem::saveToXml(QDomDocument doc, QDomElement element)
{
element.setAttribute("type", typeName());
- element.setAttribute("id", id());
+ element.setAttribute("id", id().toString());
appendPointElement(doc, element, "position", pos());
}
diff --git a/src/items/database/columnlistmodel.cpp b/src/items/database/columnlistmodel.cpp
index 84ba804..6863a11 100644
--- a/src/items/database/columnlistmodel.cpp
+++ b/src/items/database/columnlistmodel.cpp
@@ -44,7 +44,6 @@ ColumnListModel::setColumnList(ColumnList *columnList)
connect(m_columnList, SIGNAL(columnRemoved(int)), this, SLOT(_columnRemoved()));
connect(m_columnList, SIGNAL(columnChanged(int)), this, SLOT(_columnChanged(int)));
}
- reset();
}
int
diff --git a/src/items/database/databasetableproperties.cpp b/src/items/database/databasetableproperties.cpp
index 779b4bc..14c1fe9 100644
--- a/src/items/database/databasetableproperties.cpp
+++ b/src/items/database/databasetableproperties.cpp
@@ -151,7 +151,7 @@ DatabaseTableProperties::updateProperty(const QString &name, const QVariant &val
d->nameEdit->setText(value.toString());
}
else if (name == "color") {
- d->colorPicker->setCurrentColor(qVariantValue<QColor>(value));
+ d->colorPicker->setCurrentColor(value.value<QColor>());
}
}
diff --git a/src/line.cpp b/src/line.cpp
index 527fab3..bb58e1e 100644
--- a/src/line.cpp
+++ b/src/line.cpp
@@ -94,7 +94,7 @@ Line::saveToXml(QDomDocument doc, QDomElement element)
if (connector->hub()) {
QDomElement hubElement = doc.createElement("hub");
connectorElement.appendChild(hubElement);
- hubElement.setAttribute("owner", connector->hub()->owner()->id());
+ hubElement.setAttribute("owner", connector->hub()->owner()->id().toString());
}
}
}