Qt Contributor Summit 2019 - QtCore
Jump to navigation
Jump to search
Session notes.
Recap:
Calendaring & time
- We have calendars!
- QDateTime internal state keeping requires cleanup (doable in Qt 6, e.g. remove the dpointer for good)
- Some API fixups also needed (but possibly after the internals have been cleaned up), no other deprecating expected
- Compatibility with C++20's calendaring: looking into it. Unfortunately we can't depend on it in time for 6.0, but Eddy is looking at it closely, to ensure maximum compatibility
Containers
- QList = QVector by default in Qt 6
- s/QList/QVector/g just before Qt 6 release to avoid merging nightmare
- Not sure if to keep Qt5List. We need more evaluation about how much code breaks (e.g. when Creator, KDE port it). Not so many fixes were required in Qt but this was after many fixes have already landed after Clazy passes in Qt itself.
- QPair=std::pair => no brainer
- QHash in terms of std::unordered_map: Lars, Peppe experimented on it, it "works", esp. after
- Concerns regards std::unordered_map itself -- it's not great in terms of performance (or: it's "as bad" as QHash, so the only save is the maintenance). Should we look at other unorderd_map implementations under BSD? What about qHash and the seeding?
- QMap => std::map, yes
- QLinkedList => Qt5LinkedList
- (Need to clarify what ends up in a Qt5Support library)
- Do we need to provide generic accessors for arbitrary containers, esp. in the light of ranges added to C++20? (And what about things like toSet, toList, etc.?) Concerns raised by starting including std headers all over the place.
QString, QStringView, QByteArray
Split-up of QtCore
- QtSCXML can be moved out (note that declarative depends on it)
- PROBABLY MORE STUFF
Codecs
- Legacy text codecs implementations in Qt are going to be dropped from Qt itself; anything but UTF- codecs will require 3rd party (ICU).
- Can we require the system to be properly set up? (locale not set => is it our problem?)
- QTextCodec as an API has a few defects
- Can we fix it? (What are the problems in the first place? Is there a bug report? Is QTextCodec a dead end / we need a new class? How much breakage?)
- Should it be moved out of QtCore?
- Concern is on low-end: do we want QtCore to unconditionally link to ICU, just for codecs?
- Well it's not just codecs: QLocale, QCollation, calendars all require ICU anyhow
- We don't strictly need this ICU linking anyhow: QTextCodec is extensible; we can move the ICU dependency to another library or plugin. Out of the box QTextCodec in Core will only provide UTF-.
- to/fromLocal8Bit and/or setCodecForLocale => deprecate and remove; conversions should be explicit...
- QXmlStream: those may require non UTF- codecs; there may be XML files in non UTF-8. How to handle those?
- Register text codecs when linking to QtTextCodecs? Circular dependency?
- Can QXmlStreamWriter write any other codec? Yes. Can we deprecate it right now?
- What does Qt assume on locale on UNIX systems?
- What happens if you haven't set anything?
- Thiago: assume it is C.UTF-8
- Peppe: crash
- What happens if you have set an encoding we would support (via QtTextCodecs or whatever), but not UTF-8?
- Special case: C (that we would support anyhow), but not C.UTF-8?
- Thiago: assume it is C.UTF-8
- What happens if you have set an encoding we do NOT support?
- Andre: override the user; assume it is UTF-8
- Peppe: at a minimum: every time we override, print a warning!
- Andre: override the user; assume it is UTF-8
- What happens to child processes?
- What happens if you haven't set anything?
Threading
- QRecursiveMutex split from QMutex
- QWaitCondition & QReadWriteCondition improvements?
- Future of QFuture
Paths/Filesystem
- If you know about Windows path handling: please help Eddy! (E.g. filesystem paths that are neither absolute or relative)
- Discuss if we want a dedicated filesystem path class -- we need to evaluate the impact on our API.
- We want overloads taking std::fs::path, but not sure about a dedicated class to store paths
Other
- Regexp
- Ville: performance concerns, std::regex implementations are still bad
- We can stick with QRegularExpression, but that poses a buildsystem question (getting rid of bootstrap). CMake may fix it. So far only a couple of bootsrapped tools will actually require it.