Commit 5bf83134 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

pk: QStringRef is so passe, now QStringView is cool

parent 0be95112
Pipeline #180922 passed with stage
in 1 minute
......@@ -775,11 +775,9 @@ bool PackageKitBackend::isPackageNameUpgradeable(const PackageKitResource *res)
// It's an optimisation as there's a bunch of allocations that happen from packageName
// Having packageName return a QStringRef or a QStringView would fix this issue.
// TODO Qt 6: Have packageName and similars return a QStringView
static QStringRef TransactionpackageName(const QString &packageID)
static QStringView TransactionpackageName(const QString &packageID)
QStringRef ret;
ret = packageID.leftRef(packageID.indexOf(QLatin1Char(';')));
return ret;
return QStringView(packageID).left(packageID.indexOf(QLatin1Char(';')));
QSet<QString> PackageKitBackend::upgradeablePackageId(const PackageKitResource *res) const
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment