mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Fix FTBFS for ubuntu bionic beaver
This commit is contained in:
@@ -162,11 +162,7 @@ class RealTerminal
|
|||||||
auto is_draw = xml_element.attribute(QStringLiteral("is_draw")) == QLatin1String("true")
|
auto is_draw = xml_element.attribute(QStringLiteral("is_draw")) == QLatin1String("true")
|
||||||
? true : false;
|
? true : false;
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
QUuid uuid_(xml_element.attribute(QStringLiteral("uuid")));
|
||||||
auto uuid_ = QUuid::fromString(xml_element.attribute(QLatin1String("uuid")));
|
|
||||||
#else
|
|
||||||
auto uuid_ = QUuid(xml_element.attribute(QStringLiteral("uuid")));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (is_draw) {
|
if (is_draw) {
|
||||||
for (auto terminal : terminal_vector) {
|
for (auto terminal : terminal_vector) {
|
||||||
|
|||||||
@@ -114,21 +114,21 @@ void TerminalStripTreeWidget::dropEvent(QDropEvent *event)
|
|||||||
//Move terminal
|
//Move terminal
|
||||||
if (old_parent->type() == FreeTerminal && //From free to strip
|
if (old_parent->type() == FreeTerminal && //From free to strip
|
||||||
overred_item->type() == Strip) {
|
overred_item->type() == Strip) {
|
||||||
emit terminalAddedToStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
emit terminalAddedToStrip(QUuid(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
||||||
QUuid::fromString(overred_item->data(0, UUID_USER_ROLE).toString()));
|
QUuid(overred_item->data(0, UUID_USER_ROLE).toString()));
|
||||||
}
|
}
|
||||||
else if (old_parent->type() == Strip) //From strip to ...
|
else if (old_parent->type() == Strip) //From strip to ...
|
||||||
{
|
{
|
||||||
if (overred_item->type() == FreeTerminal) //Free terminal
|
if (overred_item->type() == FreeTerminal) //Free terminal
|
||||||
{
|
{
|
||||||
emit terminalRemovedFromStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
emit terminalRemovedFromStrip(QUuid(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
||||||
QUuid::fromString(old_parent->data(0, UUID_USER_ROLE).toString()));
|
QUuid(old_parent->data(0, UUID_USER_ROLE).toString()));
|
||||||
}
|
}
|
||||||
else if (overred_item->type() == Strip) //To another strip
|
else if (overred_item->type() == Strip) //To another strip
|
||||||
{
|
{
|
||||||
emit terminalMovedFromStripToStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
emit terminalMovedFromStripToStrip(QUuid(dragged_item->data(0, UUID_USER_ROLE).toString()),
|
||||||
QUuid::fromString(old_parent->data(0, UUID_USER_ROLE).toString()),
|
QUuid(old_parent->data(0, UUID_USER_ROLE).toString()),
|
||||||
QUuid::fromString(overred_item->data(0, UUID_USER_ROLE).toString()));
|
QUuid(overred_item->data(0, UUID_USER_ROLE).toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user