summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/models/parsetreemodel.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-09-03 18:33:12 +0200
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2020-09-03 18:45:48 +0200
commitfa330c109dcf3399b5fdc27b188c0bafbb6e6016 (patch)
treee9e96d7f507404e4936ef681f03630aa1e3affae /utils/themeeditor/models/parsetreemodel.cpp
parentff38666a19b09169b1a7cf1f0eda20374bc390de (diff)
downloadrockbox-fa330c109d.tar.gz
rockbox-fa330c109d.tar.bz2
rockbox-fa330c109d.zip
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
Diffstat (limited to 'utils/themeeditor/models/parsetreemodel.cpp')
-rw-r--r--utils/themeeditor/models/parsetreemodel.cpp8
1 files changed, 4 insertions, 4 deletions
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<QGraphicsItem*> children = root->children();
+ QList<QGraphicsItem*> children = root->childItems();
for(QList<QGraphicsItem*>::iterator i = children.begin()
; i != children.end(); i++)
setChildrenUnselectable(*i);