D28675: [KMimeTypeChooser] Add the ability to filter the treeview with a QSFPM

David Faure noreply at phabricator.kde.org
Sat Apr 11 10:33:40 BST 2020


dfaure added a comment.


  Nice work. But can you give the reasoning for removing the comment column? For non-english speakers this might be the only thing that's actually readable?
  
  I'm also curious about the use of QStandardItemModel which I consider to be at best a class for unittesting proxies and views. Just like QTreeWidgetItem it stores the data.
  Of course compared to QTreeWidgetItem it's one step into the "right" direction of item/view separation, so why not, but it's not exactly more efficient.

INLINE COMMENTS

> kmimetypechooser.cpp:44
>      void loadMimeTypes(const QStringList &selected = QStringList());
> +    QVector<const QStandardItem *> getCheckedItems();
>  

In my experience a vector of const pointers is usually a pain to work with, e.g. for find(). But you're lucky here it seems, it doesn't create trouble ;)

> kmimetypechooser.cpp:404
> +{
> +    QFontMetrics fm(font());
> +    const int viewableSize = fm.averageCharWidth() * 60;

QFontMetrics fm(fontMetrics());

REPOSITORY
  R236 KWidgetsAddons

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

To: ahmadsamir, #frameworks, cfeck, dfaure
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200411/2dab4cbd/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list