D20209: Add support for KBookmarkOwner to communicate if it has tabs open

David Faure noreply at phabricator.kde.org
Mon Apr 22 21:55:48 BST 2019


dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  Thanks!

INLINE COMMENTS

> kbookmarkmenu.cpp:150
> +    d->numberOfOpenTabs = numberOfOpenTabs;
> +    m_bDirty = true;
> +}

Technically this is only needed if the number of open tabs went from "< 2" to ">= 2" or vice versa.
When going from, say, 20 to 21, we don't need to refill the menu.
So the code could be

  m_bDirty = (d->numberOfOpenTabs < 2) != (numberOfOpenTabs < 2);
  d->numberOfOpenTabs = numberOfOpenTabs;

> kbookmarkmenu.h:104
> +     */
> +    void setNumberOfOpenTabs(unsigned int numberOfOpenTabs);
> +    /**

All the "unsigned int" in this patch is a bit unusual in Qt/KDE code, we use int everywhere.

REPOSITORY
  R294 KBookmarks

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

To: hallas, #frameworks, ngraham, cfeck, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190422/4e2abf32/attachment.html>


More information about the Kde-frameworks-devel mailing list