D17595: Upstream Dolphin's file rename dialog

Pino Toscano noreply at phabricator.kde.org
Sat Dec 15 08:01:47 GMT 2018


pino added inline comments.

INLINE COMMENTS

> renamefiledialog.cpp:50-51
> +{
> +    const QSize minSize = minimumSize();
> +    setMinimumSize(QSize(320, minSize.height()));
> +

why a minimum size is enforced?

> renamefiledialog.cpp:54
> +    const int itemCount = items.count();
> +    Q_ASSERT(itemCount >= 1);
> +    m_renameOneItem = (itemCount == 1);

assert in a library, especially when checking user input, is never a good idea...

> renamefiledialog.h:65-73
> +private:
> +    bool m_renameOneItem;
> +    QList<QUrl> m_renamedItems;
> +    QString m_newName;
> +    QLineEdit* m_lineEdit;
> +    KFileItemList m_items;
> +    bool m_allExtensionsDifferent;

an exported class must use a d-pointer for all the private variables & members

REPOSITORY
  R241 KIO

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

To: ngraham, #frameworks, #dolphin, broulik
Cc: pino, kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20181215/c1ffaff4/attachment.htm>


More information about the kfm-devel mailing list