rbutil: Drop support for QT5, start cleaning up the warnings

* All deprecation warnings fixed
 * Explicitly set QT_NO_USE_NODISCARD_FILE_OPEN

Change-Id: Ice52133e93d4a01f12ff845a3056a81b100ed891
This commit is contained in:
Solomon Peachy 2026-06-21 08:56:09 -04:00
parent 22b4cd3232
commit e0bbf8f9da
11 changed files with 25 additions and 31 deletions

View file

@ -63,7 +63,7 @@ void RBTouchArea::paint(QPainter *painter,
void RBTouchArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if(action[0] == '&')
action = action.right(action.count() - 1);
action = action.right(action.size() - 1);
action = action.toLower();

View file

@ -482,7 +482,7 @@ void DeviceState::setData(QString tag, QVariant data)
break;
case Combo:
if(data.type() == QVariant::String)
if(data.typeId() == QVariant::String)
dynamic_cast<QComboBox*>
(found.second)->
setCurrentIndex(dynamic_cast<QComboBox*>

View file

@ -245,7 +245,7 @@ bool ParseTreeModel::setData(const QModelIndex &index, const QVariant &value,
}
else if(tolower(param->type_code) == 'i')
{
if(!value.canConvert(QVariant::Int))
if(!value.canConvert(QMetaType(QVariant::Int)))
return false;
param->type = skin_tag_parameter::INTEGER;

View file

@ -1078,7 +1078,7 @@ QVariant ParseTreeNode::evalTag(const RBRenderInfo& info, bool conditional,
child = val.toInt();
child = branches * child / 100;
}
else if(val.type() == QVariant::Bool)
else if(val.typeId() == QVariant::Bool)
{
/* Boolean values have to be reversed, because conditionals are
* always of the form %?tag<true|false>
@ -1096,7 +1096,7 @@ QVariant ParseTreeNode::evalTag(const RBRenderInfo& info, bool conditional,
else
child = 1;
}
else if(val.type() == QVariant::String)
else if(val.typeId() == QVariant::String)
{
if(val.toString().length() > 0)
child = 0;
@ -1180,18 +1180,18 @@ void ParseTreeNode::modParam(QVariant value, int index)
}
else if(param)
{
if(value.type() == QVariant::Double)
if(value.typeId() == QVariant::Double)
{
param->type = skin_tag_parameter::DECIMAL;
param->data.number = static_cast<int>(value.toDouble() * 10);
}
else if(value.type() == QVariant::String)
else if(value.typeId() == QVariant::String)
{
param->type = skin_tag_parameter::STRING;
free(param->data.text);
param->data.text = strdup(value.toString().toStdString().c_str());
}
else if(value.type() == QVariant::Int)
else if(value.typeId() == QVariant::Int)
{
param->type = skin_tag_parameter::INTEGER;
param->data.number = value.toInt();