qt5base-lts/tests/auto/corelib/io
Marc Mutz dfc2a4a537 QLoggingRegistry: remove rules vector
It only contained a concatenation of the individual rule sets,
probably to fix their order in a central place, as well as
simplifying iteration in defaultCategoryFilter().

Fix these two issues differently, but introducing a RuleSet
enum that lists rule sets in the order in which they should
be applied by defaultCategoryFilter(), and turn individual
rule sets vectors into a C array of vectors.

This enables two nested loops in defaultCategoryFilter to
replace the one loop over 'rules'. Apart from building up
'rules' in updateRules(), this was the only access to that
member. That leaves updateRules() with just the task of
running defaultCategoryFilter() on the new rule sets.
Consequently, a call to updateRules() can now replace the
identical loop in installFilter().

Performance should not suffer. Iterating over a fixed-size
array of vectors is hardly any slower than iterating over
a single vector, and while the construction of 'rules'
was probably a one-off task in most programs, this way
of keeping the rules also saves memory because rules are
not kept in two different vectors.

It is also more maintainable, of course.

Change-Id: Ibc132d096c8137dd02b034752646212e51208637
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-04-21 07:16:33 +00:00
..
largefile Merge remote-tracking branch 'origin/5.8' into 5.9 2017-04-06 14:16:31 +02:00
qabstractfileengine Merge remote-tracking branch 'origin/5.6' into dev 2016-01-26 16:27:28 +01:00
qbuffer Updated license headers 2016-01-21 18:55:18 +00:00
qdatastream QDataStream: add operator<< and >> for std::nullptr_t 2017-04-07 17:41:06 +00:00
qdataurl Updated license headers 2016-01-21 18:55:18 +00:00
qdebug Merge remote-tracking branch 'origin/5.6' into 5.7 2016-06-10 23:27:10 +02:00
qdir Fix QDir::mkpath() when the path contains "symlink/../" 2017-04-07 20:26:02 +00:00
qdiriterator Merge remote-tracking branch 'origin/5.7' into dev 2016-06-13 12:46:46 +02:00
qfile Fix tst_QFile for qemu 2017-04-06 12:19:55 +00:00
qfileinfo Use QT_CONFIG(library) instead of QT_NO_LIBRARY 2017-03-06 11:27:20 +00:00
qfileselector Merge remote-tracking branch 'origin/5.8' into 5.9 2017-04-18 10:46:22 +02:00
qfilesystementry Updated license headers 2016-01-21 18:55:18 +00:00
qfilesystemmetadata tests: Unify license to GPL-EXCEPT 2017-04-03 07:18:46 +00:00
qfilesystemwatcher Merge remote-tracking branch 'origin/5.7' into 5.8 2016-11-01 06:02:55 +01:00
qiodevice Revert blacklisting of two tests now the fix is in 2016-05-30 17:39:37 +00:00
qipaddress Merge remote-tracking branch 'origin/5.6' into 5.7 2016-04-13 06:55:37 +02:00
qlockfile Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-21 19:07:53 +01:00
qloggingcategory Updated license headers 2016-01-21 18:55:18 +00:00
qloggingregistry QLoggingRegistry: remove rules vector 2017-04-21 07:16:33 +00:00
qnodebug Updated license headers 2016-01-21 18:55:18 +00:00
qprocess Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-13 15:55:44 +01:00
qprocess-noapplication macOS: Don't build auto-tests as application bundles unless explicitly requested 2016-10-23 10:39:56 +00:00
qprocessenvironment QtCore: Remove Windows CE. 2016-03-30 11:22:47 +00:00
qresourceengine Fix missing last modification time stamp in qrc content 2016-11-22 04:57:02 +00:00
qsavefile Updated license headers 2016-01-21 18:55:18 +00:00
qsettings Merge remote-tracking branch 'origin/5.8' into 5.9 2017-02-08 15:49:18 +01:00
qstandardpaths Merge remote-tracking branch 'origin/5.8' into dev 2016-12-13 09:39:20 +01:00
qstorageinfo Merge remote-tracking branch 'origin/5.7' into dev 2016-05-23 21:09:46 +02:00
qtemporarydir Add a convenience function QTemporaryDir::filePath() 2016-09-05 15:55:11 +00:00
qtemporaryfile Merge remote-tracking branch 'origin/5.7' into dev 2016-08-01 18:20:00 +02:00
qtextstream Properly use the "process" feature 2017-02-27 15:44:46 +00:00
qurl tst_qurl: skip test with ':' in filename, on Windows 2017-03-21 13:15:53 +00:00
qurlinternal Use qtConfig throughout in qtbase 2016-08-19 04:28:05 +00:00
qurlquery Updated license headers 2016-01-21 18:55:18 +00:00
qwinoverlappedionotifier Updated license headers 2016-01-21 18:55:18 +00:00
io.pro Merge remote-tracking branch 'origin/5.8' into 5.9 2017-03-27 10:42:08 +02:00