D26448: Add KRecentFilesMenu to replace KRecentFileAction

Elvis Angelaccio noreply at phabricator.kde.org
Mon Jan 6 13:00:28 GMT 2020


elvisangelaccio added inline comments.

INLINE COMMENTS

> krecentfilesmenu.cpp:31
> +    QSettings *m_settings;
> +    size_t m_maximumItems = 10;
> +};

Why not `int` since it's what we expose in the API anyway?

> krecentfilesmenu.cpp:53
> +    setIcon(QIcon::fromTheme(QStringLiteral("document-open-recent")));
> +    const QString fileName = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + QLatin1String("/") + QCoreApplication::applicationName() + QLatin1String("staterc");
> +    d->m_settings = new QSettings(fileName, QSettings::Format::IniFormat, this);

`QStringLiteral("...").arg()` would be more readable imho.

> krecentfilesmenu.h:32
> + *
> + * Replaces KRecentFilesAction from KConfigWidgets.
> + *

This is a porting guide, not sure it belongs in the main apidox of the class. (users of this new API may not know/care about KRecentFilesAction).

REPOSITORY
  R236 KWidgetsAddons

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

To: nicolasfella, #frameworks, dfaure
Cc: elvisangelaccio, 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/9deb744d/attachment.html>


More information about the Kde-frameworks-devel mailing list