[kcmkwin/rules] Return absolute path of decoration color scheme

Summary:
We need to return the absolute path instead of base name so decoColorToCombo
can return the correct index.

Test Plan:
* Go to System Settings > Window Management > Window Rules;
* Create a new rule for Konsole to force the Oxygen color scheme,
  close the dialog, and click the Apply button;
* Open the rules dialog (you don't have to modify anything), click OK button, then Apply button.

Without this patch, Breeze color scheme will be forced after the
last step.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: graesslin, broulik, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D17655
This commit is contained in:
Vlad Zagorodniy 2019-01-14 22:03:15 +02:00
parent 2df9d22a08
commit de04d362da

View file

@ -629,7 +629,7 @@ Rules* RulesWidget::rules() const
CHECKBOX_SET_RULE(below,);
CHECKBOX_SET_RULE(noborder,);
auto comboToDecocolor = [this](int index) -> QString {
return QFileInfo(decocolor->itemData(index).toString()).baseName();
return decocolor->itemData(index).toString();
};
COMBOBOX_FORCE_RULE(decocolor, comboToDecocolor);
CHECKBOX_SET_RULE(skiptaskbar,);