[Differential] [Changed Subscribers] D4827: possibility to use a fallback chain as prefix

Kai Uwe Broulik noreply at phabricator.kde.org
Mon Feb 27 16:45:56 UTC 2017


broulik added inline comments.

INLINE COMMENTS

> framesvgitem.cpp:287
> +            m_frameSvg->setElementPrefix(prefix);
> +            break;
> +        }

Maybe print a warning if none found? Or how did the old code behave where we would always call this no matter if we had it?

> framesvgitem.cpp:321
> +        prefixList << prefixes.toString();
> +    } else if (prefixes.canConvert<QStringList>()) {
> +        prefixList = prefixes.toStringList();

Sure that QML gives you a QStringList?

> framesvgitem.cpp:438
> +    //if the theme changed, the available prefix may have changed as well
> +    for (const QString &prefix : m_prefixes) {
> +        if (m_frameSvg->hasElementPrefix(prefix)) {

I think this loop which is in three places should be turned into a private method void applyPrefixes(const QStringList &prefixes)

> framesvgitem.h:122
>       * for a list of paths and prefixes
> +     * It cal also be an array of strings, specifying a fallback chain in case
> +     * the first element isn't found in the theme, eg ["toolbutton-normal", "normal"]

*can

REPOSITORY
  R242 Plasma Framework (Library)

REVISION DETAIL
  https://phabricator.kde.org/D4827

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: mart, #plasma
Cc: broulik, plasma-devel, #frameworks, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170227/a61ed537/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list