[Differential] [Commented On] D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

Kevin Funk noreply at phabricator.kde.org
Wed Jan 18 16:26:35 UTC 2017


kfunk added a comment.


  In https://phabricator.kde.org/D3987#78420, @kossebau wrote:
  
  > In https://phabricator.kde.org/D3987#78383, @dfaure wrote:
  >
  > > I agree. But it's the default value anyway, so why not remove it completely, thus making everyone happy?
  >
  >
  > What do you mean by "remove"? In the samples from a few comments above, the `0` (or now `nullptr`) is used as (default) value for an argument:
  >
  >   +    NETWinInfo info(QX11Info::connection(), win, QX11Info::appRootWindow(), nullptr, nullptr);
  >   +    explicit KProgressDialog(QWidget *parent = nullptr, const QString &caption = QString(),
  >   +                             const QString &text = QString(), Qt::WindowFlags flags = nullptr);
  >   +    QCOMPARE(QStringList(queryUrl.queryItems(nullptr).keys()).join(", "),
  >   +                               KLocale::TimeFormatOptions timeOptions = nullptr,
  >
  >
  > How could that be removed here? Unless you mean replacing with the default constructor of the flags type? That might be even better for human readers at least, agreed :) Though not sure how easy that fix-up is, but maybe the clang  artist knows what to do?
  
  
  `Qt::WindowFlags flags = {}`, or
  `Qt::WindowFlags flags = Qt::WindowFlags()`

REPOSITORY
  R280 Prison

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kfunk, #frameworks, dfaure, kossebau
Cc: kossebau, dfaure, graesslin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170118/b0a0963c/attachment.html>


More information about the Kde-frameworks-devel mailing list