From fa330c109dcf3399b5fdc27b188c0bafbb6e6016 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 3 Sep 2020 18:33:12 +0200 Subject: themeeditor: Make it compile with current Qt5. - Replace use of obsolete members with their replacements. - Fix type issue that requires explicitly creating the right object now. - Update project file to work with Qt5. Change-Id: I3af2b1520796e977e58c0a01e165c77c469a23b9 --- utils/themeeditor/models/parsetreemodel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'utils/themeeditor/models') diff --git a/utils/themeeditor/models/parsetreemodel.cpp b/utils/themeeditor/models/parsetreemodel.cpp index 37ec9b01da..cc1e9777bd 100644 --- a/utils/themeeditor/models/parsetreemodel.cpp +++ b/utils/themeeditor/models/parsetreemodel.cpp @@ -242,7 +242,7 @@ bool ParseTreeModel::setData(const QModelIndex &index, const QVariant &value, free(param->data.text); param->type = skin_tag_parameter::STRING; - param->data.text = strdup(value.toString().trimmed().toAscii()); + param->data.text = strdup(value.toString().trimmed().toLatin1()); } else if(tolower(param->type_code) == 'i') { @@ -265,7 +265,7 @@ bool ParseTreeModel::setData(const QModelIndex &index, const QVariant &value, return false; free(element->data); - element->data = strdup(value.toString().trimmed().toAscii()); + element->data = strdup(value.toString().trimmed().toLatin1()); } emit dataChanged(index, index); @@ -330,7 +330,7 @@ RBScene* ParseTreeModel::render(ProjectModel* project, if(sbsModel) sbsModel->deleteLater(); - sbsModel = new ParseTreeModel(QString(sbs.readAll()).toAscii()); + sbsModel = new ParseTreeModel(QString(sbs.readAll()).toLatin1()); if(sbsModel->root != 0) { @@ -391,7 +391,7 @@ void ParseTreeModel::setChildrenUnselectable(QGraphicsItem *root) root->setFlag(QGraphicsItem::ItemIsSelectable, false); root->setFlag(QGraphicsItem::ItemIsMovable, false); - QList children = root->children(); + QList children = root->childItems(); for(QList::iterator i = children.begin() ; i != children.end(); i++) setChildrenUnselectable(*i); -- cgit v1.2.3