fix: adjust processUnitName

`<2` should be fine to make later two takeLast work fine and avoid crash.

It seems that `<3` will
make kde scope (without launcher in unit name) not working.
This commit is contained in:
black-desk 2023-08-29 10:19:31 +08:00
parent 6adc02375f
commit b0dd943e1d

View File

@ -443,7 +443,7 @@ inline QPair<QString, QString> processUnitName(const QString &unitName)
auto app = unitName.sliced(0, lastDotIndex);
auto components = app.split('-');
if (components.size() < 3) {
if (components.size() < 2) {
qDebug() << unitName << "is not a xdg application ignore";
return {};
}