[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 08:22:44 UTC 2017
kfunk added a comment.
In https://phabricator.kde.org/D3987#78257, @kossebau wrote:
> Seems the porting script had a few wrong matches, where 0 values for enums were misinterpreted as pointer:
>
> E.g.
>
> @@ -1015 +1015 @@ void KWindowSystemPrivateX11::setShowingDesktop(bool showing)
> - NETRootInfo info(QX11Info::connection(), 0, NET::WM2ShowingDesktop);
> + NETRootInfo info(QX11Info::connection(), nullptr, NET::WM2ShowingDesktop);
> @@ -1021 +1021 @@ void KWindowSystemPrivateX11::setUserTime(WId win, long time)
> - NETWinInfo info(QX11Info::connection(), win, QX11Info::appRootWindow(), 0, 0);
> + NETWinInfo info(QX11Info::connection(), win, QX11Info::appRootWindow(), nullptr, nullptr);
>
>
> (snip)
This is transformation (0->nullptr) is fine though. Just check the declared QFlags ctor:
Q_DECL_CONSTEXPR inline QFlags(Zero = Q_NULLPTR) Q_DECL_NOTHROW : i(0) {}
This is what we are using now and were using before. Seeing `MyFlags(nullptr)` may look odd at first, but it's totally fine.
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/d333c833/attachment.html>
More information about the Kde-frameworks-devel
mailing list