Unsolved Why is there no description of QRegExpValidator in qt6.0.1? Is it abandoned?
-
hello,why is there no description of QRegExpValidator in qt6.0.1? Is it abandoned?
-
-
@canid said in Why is there no description of QRegExpValidator in qt6.0.1? Is it abandoned?:
Is it abandoned?
Yes.
QRegExp
was deprecated in Qt 5, replaced byQRegularExpression
.Similarly,
QRegExpValidator
was replaced byQRegularExpressionValidator
. -
@JKSH It's getting more verbose with each iteration. Still better to use than
std::regex
! 😉 -
@J-Hilk said in Why is there no description of QRegExpValidator in qt6.0.1? Is it abandoned?:
It's getting more verbose with each iteration.
This change makes it consistent with one of Qt's API design principles ("Avoid abbreviations"): https://wiki.qt.io/API_Design_Principles#The_Art_of_Naming
Still better to use than
std::regex
! 😉Well... "better than
std
" is not that hard to achieve, really... 😉The STL and other
std::
APIs seem to be designed for raw performance and compatibility with general templates; they don't seem to be designed for readability and ease-of-use (although things have been improving lots from C++11 onwards) -
@JKSH So, renamed. Replaced is not incorrect, but sounds like a bigger change than renamed.
-
@Bo-Katan Hi and welcome to devnet,
No, it's not a renaming, QRegExp and friend classes have been deprecated in Qt 5 and removed in Qt 6. QRegularExpression and friends are new classes built on top of PCRE.