D28590: Add a QString Solid::Device::displayName, used in Fstab Device for network mounts

David Faure noreply at phabricator.kde.org
Sat May 23 11:43:00 BST 2020


dfaure requested changes to this revision.
dfaure added inline comments.
This revision now requires changes to proceed.

INLINE COMMENTS

> fstabdevice.cpp:73
> +    if (m_displayName.isEmpty()) {
> +        QStringList currentMountPoints = FstabHandling::currentMountPoints(m_device);
> +        if (currentMountPoints.isEmpty()) {

`const`

> fstabdevice.cpp:75
> +        if (currentMountPoints.isEmpty()) {
> +            QStringList mountPoints = FstabHandling::mountPoints(m_device);
> +            m_displayName = mountPoints.isEmpty() ? m_description : mountPoints.first();

`const` so that first() doesn't detach.

> device.h:93
> +    /**
> +      * Retrieves the display Name to use for this device.
> +      * Same as description when not defined.

Why "Name" with an uppercase letter?

> device.h:96
> +      *
> +      * @return the display Name
> +      * @since 5.71

(same)

REPOSITORY
  R245 Solid

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

To: meven, #frameworks, bruns, sitter, dfaure
Cc: dfaure, broulik, ervin, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200523/b9d4f684/attachment.htm>


More information about the Kde-frameworks-devel mailing list