forked from qt-creator/qt-creator
Modeling: Fix build with Qt6
QUuid constructor with QString became explicit. QStringRef gone. Task-number: QTCREATORBUG-24098 Change-Id: I76d74bbce788c2349b777e76416ddec4a5933eb1 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -80,7 +80,8 @@ void DiagramView::dragEnterEvent(QDragEnterEvent *event)
|
|||||||
QString key;
|
QString key;
|
||||||
dataStream >> key;
|
dataStream >> key;
|
||||||
if (!key.isEmpty()) {
|
if (!key.isEmpty()) {
|
||||||
if (m_diagramSceneModel->diagramSceneController()->isAddingAllowed(Uid(key), m_diagramSceneModel->diagram()))
|
if (m_diagramSceneModel->diagramSceneController()
|
||||||
|
->isAddingAllowed(Uid(QUuid(key)), m_diagramSceneModel->diagram()))
|
||||||
accept = true;
|
accept = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,8 +123,10 @@ void DiagramView::dropEvent(QDropEvent *event)
|
|||||||
QString key;
|
QString key;
|
||||||
dataStream >> key;
|
dataStream >> key;
|
||||||
if (!key.isEmpty()) {
|
if (!key.isEmpty()) {
|
||||||
if (diagramSceneController->isAddingAllowed(Uid(key), m_diagramSceneModel->diagram())) {
|
if (diagramSceneController->isAddingAllowed(Uid(QUuid(key)),
|
||||||
diagramSceneController->addExistingModelElement(Uid(key), mapToScene(event->pos()),
|
m_diagramSceneModel->diagram())) {
|
||||||
|
diagramSceneController->addExistingModelElement(Uid(QUuid(key)),
|
||||||
|
mapToScene(event->pos()),
|
||||||
m_diagramSceneModel->diagram());
|
m_diagramSceneModel->diagram());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -207,7 +207,8 @@ void ModelTreeView::dropEvent(QDropEvent *event)
|
|||||||
QString key;
|
QString key;
|
||||||
dataStream >> key;
|
dataStream >> key;
|
||||||
if (!key.isEmpty()) {
|
if (!key.isEmpty()) {
|
||||||
MElement *modelElement = treeModel->modelController()->findElement(Uid(key));
|
MElement *modelElement = treeModel->modelController()->findElement(
|
||||||
|
Uid(QUuid(key)));
|
||||||
if (modelElement) {
|
if (modelElement) {
|
||||||
if (auto modelObject = dynamic_cast<MObject*>(modelElement)) {
|
if (auto modelObject = dynamic_cast<MObject*>(modelElement)) {
|
||||||
if (auto targetModelPackage = dynamic_cast<MPackage *>(targetModelObject)) {
|
if (auto targetModelPackage = dynamic_cast<MPackage *>(targetModelObject)) {
|
||||||
|
@@ -124,7 +124,7 @@ bool QStringParser::Parser::scan(double *d, int *index)
|
|||||||
++(*index);
|
++(*index);
|
||||||
}
|
}
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
*d = m_source.midRef(startIndex, *index - startIndex).toDouble(&ok);
|
*d = m_source.mid(startIndex, *index - startIndex).toDouble(&ok);
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user