Fix FTBFS for ubuntu bionic beaver

This commit is contained in:
joshua
2021-11-01 13:36:41 +01:00
parent 58a3e72abe
commit 3e5713a512
2 changed files with 8 additions and 12 deletions

View File

@@ -162,11 +162,7 @@ class RealTerminal
auto is_draw = xml_element.attribute(QStringLiteral("is_draw")) == QLatin1String("true")
? true : false;
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
auto uuid_ = QUuid::fromString(xml_element.attribute(QLatin1String("uuid")));
#else
auto uuid_ = QUuid(xml_element.attribute(QStringLiteral("uuid")));
#endif
QUuid uuid_(xml_element.attribute(QStringLiteral("uuid")));
if (is_draw) {
for (auto terminal : terminal_vector) {

View File

@@ -114,21 +114,21 @@ void TerminalStripTreeWidget::dropEvent(QDropEvent *event)
//Move terminal
if (old_parent->type() == FreeTerminal && //From free to strip
overred_item->type() == Strip) {
emit terminalAddedToStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
QUuid::fromString(overred_item->data(0, UUID_USER_ROLE).toString()));
emit terminalAddedToStrip(QUuid(dragged_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 ...
{
if (overred_item->type() == FreeTerminal) //Free terminal
{
emit terminalRemovedFromStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
QUuid::fromString(old_parent->data(0, UUID_USER_ROLE).toString()));
emit terminalRemovedFromStrip(QUuid(dragged_item->data(0, UUID_USER_ROLE).toString()),
QUuid(old_parent->data(0, UUID_USER_ROLE).toString()));
}
else if (overred_item->type() == Strip) //To another strip
{
emit terminalMovedFromStripToStrip(QUuid::fromString(dragged_item->data(0, UUID_USER_ROLE).toString()),
QUuid::fromString(old_parent->data(0, UUID_USER_ROLE).toString()),
QUuid::fromString(overred_item->data(0, UUID_USER_ROLE).toString()));
emit terminalMovedFromStripToStrip(QUuid(dragged_item->data(0, UUID_USER_ROLE).toString()),
QUuid(old_parent->data(0, UUID_USER_ROLE).toString()),
QUuid(overred_item->data(0, UUID_USER_ROLE).toString()));
}
}