D26448: Add KRecentFilesMenu to replace KRecentFileAction

Christoph Feck noreply at phabricator.kde.org
Mon Jan 6 05:26:09 GMT 2020


cfeck added a comment.


  Nice :)

INLINE COMMENTS

> krecentfilesmenu.cpp:34
> +
> +KRecentFilesMenu::KRecentFilesMenu(const QString& title, QWidget* parent)
> +    : QMenu(title, parent)

Here you switch from `Type *var` to `Type* var`

> krecentfilesmenu.cpp:41
> +
> +KRecentFilesMenu::KRecentFilesMenu(QWidget* parent)
> +    : QMenu(tr("Recent Files"), parent)

same

> krecentfilesmenu.cpp:81
> +
> +void KRecentFilesMenu::addUrl(const QUrl url, const QString& name)
> +{

same

> krecentfilesmenu.cpp:103
> +
> +void KRecentFilesMenu::removeUrl(const QUrl& url)
> +{

same

> krecentfilesmenu.cpp:215
> +{
> +    d->m_maximumItems = maximumItems;
> +}

Should we truncate the current list if the new max items is smaller?

> krecentfilesmenu.h:67
> +     */
> +    void addUrl(const QUrl url, const QString &name = QString());
> +

Missing reference

> krecentfilesmenu.h:79
> +     *
> +     * When the manimum url count is reached and a new URL is added the
> +     * oldest will be replaced.

manimum url → maximum URL

> krecentfilesmenu.h:104
> +    void rebuildMenu();
> +    std::list<QPair<QUrl, QString>>::const_iterator findUrl(const QUrl url);
> +

Weren't there ABI issues with std::list?

Also, missing reference on url.

REPOSITORY
  R236 KWidgetsAddons

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

To: nicolasfella, #frameworks, dfaure
Cc: cfeck, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200106/493406f8/attachment.html>


More information about the Kde-frameworks-devel mailing list