Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Thiago Macieira
On Wednesday, 20 September 2023 02:53:37 PDT Volker Hilsheimer via Development wrote: > If we can have (1), i.e. > > using Qt::equals; > equals(a, b); > > why do we need qEquals? See my other email: the (1) is not discoverable, teachable, or particularly understandable by average C++ developer

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Thiago Macieira
On Thursday, 14 September 2023 03:47:05 PDT Marc Mutz via Development wrote: > Whenever you want to add an operation to _all_ types in the C++, > built-in, as well as user-defined one, you obviously cannot use > something that only works in classes: member functions don't work and > neither do clas

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Thiago Macieira
On Wednesday, 20 September 2023 07:35:24 PDT Marc Mutz via Development wrote: > But, as mentioned in this thread some weeks ago, we're currently lacking > public efficient API for "op== with Qt::CaseInsensitive". For the same > reason we need equal^WcomparesEqual and can't rely solely on > order^Wc

Re: [Development] qSwap (was: Re: C++20 comparisons @ Qt (was: Re: C++20 @ Qt))

2023-09-20 Thread Marc Mutz via Development
On 20.09.23 21:09, Marc Mutz via Development wrote: > Will un-deprecate and pour some TLC over it. → Chain ending in https://codereview.qt-project.org/c/qt/qtbase/+/505691 -- Marc Mutz Principal Software Engineer The Qt Company Erich-Thilo-Str. 10 12489 Berlin, Germany www.qt.io Geschäftsführ

[Development] qSwap (was: Re: C++20 comparisons @ Qt (was: Re: C++20 @ Qt))

2023-09-20 Thread Marc Mutz via Development
On 20.09.23 19:03, Ivan Solovev via Development wrote: > > We did _not_ deprecate qSwap(). > > Well, the source code shows that it _is_ deprecated: > https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qswap.qdoc [...] > I was not able to find a documentation page for qSwap in Qt 6.5, >

Re: [Development] QSortFilterProxyModel: recursiveFilteringEnabled

2023-09-20 Thread László Papp
Yes, I have tried that, thanks. bool TableProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); CustomModelItem* item = static_cast(index.internalPointer(

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Ivan Solovev via Development
> We did _not_ deprecate qSwap(). Well, the source code shows that it _is_ deprecated: https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qswap.qdoc I was not able to find a documentation page for qSwap in Qt 6.

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Marc Mutz via Development
On 20.09.23 14:42, Ivan Solovev via Development wrote: > We have deprecated qSwap() FTR: We did _not_ deprecate qSwap(). We banned it from inline Qt code when we know we can use one of the other ways: - lhs.swap(rhs); - std::swap(lhs, rhs); - qt_ptr_swap(lhs, rhs); We still use it in generic c

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Marc Mutz via Development
On 20.09.23 14:42, Ivan Solovev via Development wrote: [...] > > O = compareThreeWay, following std::compare_three_way > (https://en.cppreference.com/w/cpp/utility/compare/compare_three_way) > > E = comparesEqual > > > > The vast majority of code will use operators to compare two objects. > >

Re: [Development] QSortFilterProxyModel: recursiveFilteringEnabled

2023-09-20 Thread SanthoshKumar Selvaraj via Development
Hi Lazlo, How about adding a custom proxy model that inherits from QSortFilterProxyModel and override filterAcceptRow() for required data (like here adding a condition to validate for leaf node)? >From the stack overflow, I see your comment, that in practice it's not >possible, why do you thi

[Development] QSortFilterProxyModel: recursiveFilteringEnabled

2023-09-20 Thread László Papp
Hi, Would it make sense to split this property into two? https://doc.qt.io/qt-6/qsortfilterproxymodel.html#recursiveFilteringEnabled-prop A use case would be something like this: https://stackoverflow.com/questions/3384005/qt-table-and-tree-view-with-the-same-model You want to show the leaf no

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Ivan Solovev via Development
Hi, > Given the state of https://codereview.qt-project.org/c/qt/qtbase/+/481410/3 > right now (needs rebase, doesn’t build with either C++17 or C++20 for me on > macOS with apple’s clang) I have just rebased the chain on top of the latest dev and fixed the issue with qfloat16 and -Wfloat-equal

Re: [Development] C++20 comparisons @ Qt (was: Re: C++20 @ Qt)

2023-09-20 Thread Volker Hilsheimer via Development
On 19 Sep 2023, at 15:49, Marc Mutz via Development wrote: So I ask: Please let us roll out the framework with one of equal/eq/order/ordering/cmp (your choice, but quickly!), to set a status quo against which to benchmark any potentially-superior solutions, and then the ML can finish bikeshedddi