D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-12-04 Thread Kevin Funk
kfunk added a comment. In https://phabricator.kde.org/D3987#174960, @mkoller wrote: > I just found out that this change introduced wrong replacements. It did not, the changes are correct, though they're probably not what everyone expects. Please read through the comments in t

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-12-03 Thread Martin Koller
mkoller added a comment. I just found out that this change introduced wrong replacements. The changes in frameworks/kimageformats/src/imageformats like the following are incorrect, since the return type is not a pointer but an enum flags type, so it should still be 0, not nullptr. @@ -

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-03-23 Thread Friedrich W. H. Kossebau
kossebau closed this revision. REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D3987 To: kfunk, #frameworks, dfaure, kossebau Cc: skelly, kossebau, dfaure, graesslin

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-03-23 Thread Friedrich W. H. Kossebau
kossebau accepted this revision. kossebau added a comment. This revision is now accepted and ready to land. In https://phabricator.kde.org/D3987#96434, @kfunk wrote: > In https://phabricator.kde.org/D3987#96418, @kossebau wrote: > > > In https://phabricator.kde.org/D3987#95858, @kfunk

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-03-20 Thread Kevin Funk
kfunk added a comment. In https://phabricator.kde.org/D3987#96418, @kossebau wrote: > In https://phabricator.kde.org/D3987#95858, @kfunk wrote: > > > Closing. This Diff refactored the code technically correct. > > > Technically correct, as in: it builds. > But semantically it

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-03-20 Thread Friedrich W. H. Kossebau
kossebau added a comment. In https://phabricator.kde.org/D3987#95858, @kfunk wrote: > Closing. This Diff refactored the code technically correct. Technically correct, as in: it builds. But semantically it is incorrect and a regression when it comes to flags, especially as high l

D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-03-18 Thread Kevin Funk
kfunk added a comment. Closing. This Diff refactored the code technically correct. If you want to replace `MyFlags flags = nullptr` by `... = {}` please do so in a follow-up patch/review. REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D3987 To: kfunk, #framework

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

2017-01-18 Thread David Faure
dfaure added a comment. The signature of KUrl::queryItems is queryItems(const QueryItemsOptions &options = 0), i.e. = {}, so the caller should just not pass any value ;-) But otherwise I agree, being explicit on the calling side is the best option. REPOSITORY R280 Prison REVISION

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

2017-01-18 Thread Stephen Kelly
skelly added a comment. It's true that QFlags has a ctor taking a nullptr. The bindings-related problem was in our handling of enums by prepending a namespace, so we would end up with Qt::nullptr. I've fixed that in ECM, and also fixed handling of = {} for various types too. So, at leas

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. So seems everyone so far agrees that `{}` is best for the default value. What about the passed argument case? Let's look at the two respective samples: NETWinInfo info(QX11Info::connection(), win, QX11Info::appRootWindow(), {}, {}); QCOMPARE(QStringLis

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

2017-01-18 Thread Stephen Kelly
skelly added a comment. In https://phabricator.kde.org/D3987#78468, @dfaure wrote: > {} sounds like the best solution to me. I think that should be used instead of nullptr anyway. void foo(const QModelIndex& idx = {}); is obviously better than void foo(const QModelIn

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

2017-01-18 Thread David Faure
dfaure added a comment. {} sounds like the best solution to me. 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, graess

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. Seems the nullptr for QFlags values also breaks Python binding generation: > Attempting to build the python bindings now fails because our scripting to > generate sip files (or sip itself - I didn't investigate further because it > seems obvious that the

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. In https://phabricator.kde.org/D3987#78427, @kfunk wrote: > 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 remov

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. In https://phabricator.kde.org/D3987#78426, @kfunk wrote: > In https://phabricator.kde.org/D3987#78421, @kossebau wrote: > > > void foo(T* t); > > void foo(QFlags flags); > > > > > Both `foo(0)` & `foo(nullptr)` would call `void foo(T* t)`, no? =

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

2017-01-18 Thread Kevin Funk
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

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

2017-01-18 Thread Kevin Funk
kfunk added a comment. In https://phabricator.kde.org/D3987#78421, @kossebau wrote: > Another possible issue with using `nullptr`as value for flags: it might break calling methods with overloads when once a pointer type and once a flags type is used. Not seen, but there is a risk. >

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. Another possible issue with using `nullptr`as value for flags: it might break calling methods with overloads when once a pointer type and once a flags type is used. Not seen, but there is a risk. void foo(T* t); void foo(QFlags flags); REPOSITORY R280 P

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. 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

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

2017-01-18 Thread David Faure
dfaure added a comment. I agree. But it's the default value anyway, so why not remove it completely, thus making everyone happy? REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D3987 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To:

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

2017-01-18 Thread Friedrich W. H. Kossebau
kossebau added a comment. > This is what we are using now and were using before. Seeing MyFlags(nullptr) may look odd at first, but it's totally fine. I agree that it is fine from a compiling POV. But from a human-reading-code POV having a nullptr (thus a pointer) being assigned to a bit

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

2017-01-18 Thread Kevin Funk
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 s

[Differential] [Requested Changes To] D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-01-17 Thread Friedrich W. H. Kossebau
kossebau requested changes to this revision. kossebau added a reviewer: kossebau. kossebau added a comment. This revision now requires changes to proceed. To have this somehow flagged as broken I set it now to "Request Changes". Please close again once there is a new separate diff opened. REP

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

2017-01-17 Thread Friedrich W. H. Kossebau
kossebau reopened this revision. kossebau added a comment. This revision is now accepted and ready to land. Seems the porting script had a few wrong matches, where 0 values for enums were misinterpreted as pointer: E.g. @@ -1015 +1015 @@ void KWindowSystemPrivateX11::setShowingDesk

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

2017-01-16 Thread Kevin Funk
kfunk added a comment. In https://phabricator.kde.org/D3987#77726, @dfaure wrote: > In https://phabricator.kde.org/D3987#77725, @kfunk wrote: > > > Want me to do a `s/Q_NULLPTR/nullptr/`, too? > > > This would make things consistent and avoid confusing future contributors about

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

2017-01-16 Thread David Faure
dfaure added a comment. In https://phabricator.kde.org/D3987#77725, @kfunk wrote: > Want me to do a `s/Q_NULLPTR/nullptr/`, too? This would make things consistent and avoid confusing future contributors about which one to use, so I'd say yes. REPOSITORY R280 Prison REVISION DE

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

2017-01-16 Thread Kevin Funk
kfunk added a comment. Hmm, one thing I forgot to ask: Want me to do a `s/Q_NULLPTR/nullptr/`, too? REPOSITORY R280 Prison REVISION DETAIL https://phabricator.kde.org/D3987 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, #frameworks, dfau

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

2017-01-16 Thread Kevin Funk
This revision was automatically updated to reflect the committed changes. Closed by commit R280:42ae697a1afe: Use nullptr everywhere (authored by kfunk). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D3987?vs=9785&id=10206#toc REPOSITORY R280 Prison CHANGES SINCE LAST UPDATE https://

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

2017-01-16 Thread Kevin Funk
kfunk updated the summary for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D3987 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, #frameworks, dfaure Cc: dfaure, graesslin

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

2017-01-06 Thread dfaure (David Faure)
dfaure accepted this revision. dfaure added a reviewer: dfaure. dfaure added a comment. This revision is now accepted and ready to land. Change it all. One note about "what is a public header" -- the rule is that any private header (i.e. not installed) is called _p.h The rule isn't 100%

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

2017-01-06 Thread kfunk (Kevin Funk)
kfunk added inline comments. INLINE COMMENTS > graesslin wrote in job.h:50 > Question: is this change API and ABI stable? Definitely ABI stable, since default arguments are not part of the function signature. I'm not aware this could break API compat either (well, only in case the compiler co

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

2017-01-05 Thread Martin Gräßlin
graesslin added inline comments. INLINE COMMENTS > job.h:50 > KIOCORE_EXPORT QString buildHTMLErrorString(int errorCode, const QString > &errorText, > -const QUrl *reqUrl = 0, int method = -1); > +const QUrl *reqUrl = nullptr, int method = -1); > Question: is this change API

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

2017-01-05 Thread kfunk (Kevin Funk)
kfunk updated the summary for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D3987 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, #frameworks

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

2017-01-05 Thread kfunk (Kevin Funk)
kfunk updated the summary for this revision. REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D3987 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: kfunk, #frameworks

[Differential] [Request, 2,027 lines] D3987: Use nullptr in all Frameworks (just diff in KIO shown here)

2017-01-05 Thread kfunk (Kevin Funk)
kfunk created this revision. kfunk added a reviewer: Frameworks. kfunk set the repository for this revision to R241 KIO. Restricted Application added a project: Frameworks. REVISION SUMMARY The full patch (all Frameworks ported to using nullptr instead of null literals) changes around 9000 line