D5034: Add support for x-gvfs style options in fstab

Stefan Brüns noreply at phabricator.kde.org
Fri Apr 7 00:31:09 UTC 2017


bruns added inline comments.

INLINE COMMENTS

> fstabdevice.cpp:47
>  
> -    m_description = m_vendor + " on " + m_product;
> +    const QStringList &gvfsOptions = FstabHandling::options(m_device).filter("x-gvfs-");
> +

Why QStringList& instead of QStringList?

> fstabdevice.cpp:51
> +        if (option.startsWith(QLatin1String("x-gvfs-name="))) {
> +            const QStringRef &encoded = option.midRef(option.indexOf(QLatin1String("="), 11) + 1);
> +            m_description = QUrl::fromPercentEncoding(encoded.toLatin1());

Useless &
use indexOf('=', 11) (i.e. QChar)

> fstabdevice.cpp:54
> +        } else if (option.startsWith(QLatin1String("x-gvfs-icon="))) {
> +            const QStringRef &encoded = option.midRef(option.indexOf(QLatin1String("="), 11) + 1);
> +            m_iconName = QUrl::fromPercentEncoding(encoded.toLatin1());

use indexOf('=', 11)

REPOSITORY
  R245 Solid

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

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


More information about the Plasma-devel mailing list