Commit Graph

45592 Commits

Author SHA1 Message Date
Marc Mutz
4ab2abf379 QDuplicateTracker: add rvalue overload
We have at least one user that only ever passes rvalues.

Change-Id: I3f190b8d074e40a23c52e791635c9a1c45ba00ab
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 18:58:32 +02:00
Marc Mutz
900e8b023b QChar: make std::hash'able
Change-Id: I2164df19cd17ab96a39020de66a3fe9fec838a36
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-05 18:58:26 +02:00
Marc Mutz
0bed456f47 QStandardItemModel: port a local QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: I59242287debfd1e41c663aa2b88d0d3ea44f43fb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 18:58:23 +02:00
Lars Knoll
a1947aeffe Port qmake over to user QRegularExpression
Use the DotMatchesEverythingOption for all places
where we interpret .pro files, to increase compatibility
with QRegExp.

Change-Id: I347d6b17858069f3c9cedcedd04df58358d83f27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-05 18:41:27 +02:00
Lars Knoll
412dd857b8 Compile QRegularExpression into qmake
This is required to be able to port qmake over to use
QRegularExpression instead of QRegExp.

Change-Id: I0ad2c19bf3c0a28e52c1e12b4d3daa0300a75ed2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-05 18:41:20 +02:00
Lars Knoll
52f3a7d9d4 Build qmake with QT_USE_STRINGBUILDER
Should improve performance and is going to be required in
the future anyway.

Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-05-05 18:41:10 +02:00
Friedemann Kleint
ae7e701074 uic: Generate string-based connections for custom slots
Qt Designer let's you add custom slots and signals to the main
form; they should use string-based connection syntax since the
class is not known in setupUI(). Amends
da3cb1deb6.

Task-number: QTBUG-76375
Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-05 15:35:51 +02:00
Kai Koehne
ca33e7a740 Fix solaris build
Fixes enabling of fPIC that got removed as a side-effect of commit 39fc377bf.

Fixes: QTBUG-83949
Change-Id: I2bed7edb5b1f97192cbcf9e12dd927a17803d864
Pick-to: 5.15
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-05 15:34:16 +02:00
Marc Mutz
af96dc62c8 QGridLayoutEngine: port to QHVContainer
Change-Id: Iadb069ecdf67d72fa1b3be9198e90eeda8e98d54
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-05-05 15:34:15 +02:00
Marc Mutz
46a1cf9150 Long live QHVContainer!
Various places in Qt use arrays indexed by some function of
Qt::Orientation input. None document their dependence on the numerical
values of the Qt::Orientation enum, some waste space, none is
type-safe.

QHVContainer is a private container of two values, one for
Qt::Horizontal and one for Qt::Vertical. Its salient API is the
indexing operator, taking Qt::Orientation, thus making the class
type-safe.

Use it to port QGridLayoutItem and QAbstractScrollAreaPrivate.

Change-Id: I0d9f17431a5eb141bfb0763c83155710bb82a537
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-05-05 15:34:15 +02:00
Shawn Rutledge
8ad1643895 Fix crash in QEglFSKmsGbmCursor::setPos() when cursor is disabled
This happens when there are two screens (configured in the json file),
QT_QPA_EGLFS_HIDECURSOR is set, and the mouse moves to the secondary
screen: m_bo is null.

Pick-to: 5.15
Change-Id: I5cef9835e7c9a6a39264bf9a028bf1feeabc6995
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-05 13:34:15 +00:00
Edward Welbourne
ca222646ff Purge from Q(Date|Time)+ most things marked to go at Qt 6
Change-Id: Ib3f48c74132b47649dc7b4cbacf2cefed5a57687
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-05 15:34:15 +02:00
Mårten Nordheim
9c85078dc2 Support special casing in configure.cmake
Change-Id: Ib899a5446a81e2604ba3642b9ad37aedc18ca650
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-05 15:34:15 +02:00
Edward Welbourne
1673e66047 Re-order the sub-dirs to catch real culprits before things they break
A failure in testlib is apt to imply misleading failures elsewhere, so
catch those first. Likewise, broken tools or corelib break
everything. Put the rest of the list in alphabetic order.

Restructure auto.pro to use conditional SUBDIRS += (in the right
order) instead of setting SUBDIRS to a full list and then doing
conditional SUBDIRS -= for most entries. This more closely matches the
way the generated cmake config does things, although it still doesn't
regenerate cleanly.

Change-Id: Idc15326c3534eb4fdce55394269f2dfbc17fcd99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-05 15:34:15 +02:00
Marc Mutz
4eba90c922 QGraphicsGridLayout: simplify a loop over Qt::Orientation values
Instead of selecting a Qt::Orientation value based on the integer loop
variable, just loop over the possible Qt::Orientation values directly.

Change-Id: I25b6f0d49c9b5a7e16e974dcc37668f801e65224
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-05-05 15:34:15 +02:00
Volker Hilsheimer
7db59f458b Add virtual QWindow::closeEvent handler
The default implementation does nothing; the processing of accepted
close events remains in the QWidget::event handler, so that subclasses
don't have to call the super class in order to free window system
resources and emit lastWindowClosed signals.

QWidgetWindow::event is reimplemented to handle QEvent::Close as well,
calling QWidgetPrivate::close_helper, which then delivers a separate
QCloseEvent to the widget.

The order of execution for widgets is after this change:

1) QWidgetWindow::event
2) QWidgetWindow::handleCloseEvent (calls QWidget::event/closeEvent)
3) QWindow::event
4) QWindow::closeEvent <- does nothing, not overridden
5) default cleanup handling in QWindow::event

and for Qt Quick after the corresponding change in qtdeclarative:

1) QQuickWindow::event
2) QWindow::event
3) QQuickWindow::closeEvent <- emits closed
4) default cleanup handling in QWindow::event

[ChangeLog][QtGui][QWindow] closeEvent has been added as a virtual
function.

Task-number: QTBUG-31019
Change-Id: I201f5ee9c6a73b949986648e3bd288d2c7898f28
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-05-05 13:34:15 +00:00
Giuseppe D'Angelo
b8668257e6 QPlatformTheme: Use operator| instead of operator+ to define a shortcut
Follow the surrounding code.

Change-Id: I2d4789162ea91328dfa00ac9b4c2fc6a8e6ed261
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 13:34:15 +00:00
Thiago Macieira
419f429031 QCoreApplication: force the process locale codec to UTF-8
As discussed in the mailing list and in the Qt Contributor Summit 2019.

Tested on Linux, macOS and FreeBSD, showing these fallbacks:
OS        environment         setlocale() call
FreeBSD   empty               "C.UTF-8"
FreeBSD   LC_ALL=C            "C.UTF-8"
Linux     empty               "C.UTF-8"
Linux     LC_ALL=C            "C.UTF-8"
Linux     LANG=en_US          "en_US.UTF-8"
Linux     LANG=de_DE@euro     "de_DE.UTF-8"
Linux     LANG=en_GB.iso885915 "en_GB.UTF-8"
Linux     LANG=hy_AM.armscii8 "hy_AM.UTF-8"
Linux     LANG=ja_JP.sjis     "ja_JP.UTF-8"
Linux     LANG=ru_RU.koi8r    "ru_RU.UTF-8"
macOS     empty               "UTF-8"
macOS     LC_ALL=C            "UTF-8"

Versions tested: FreeBSD 12.1, Linux w/ glibc 2.30, macOS 10.14.2.

See
* https://wiki.qt.io/Qt_Contributor_Summit_2019_-_QtCore
* https://lists.qt-project.org/pipermail/development/2019-October/037791.html

Change-Id: Ia2aa807ffa8a4c798425fffd15d97ddb4f35b0ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 15:34:15 +02:00
Laszlo Agocs
a206f52acd Hotfix for int->qsizetype fallout in QShader
The proper solution is to use qint32 everywhere, but that is left as
a separate exercise.

Change-Id: Id0c06b102b56a1b3b48dd67c6c29c28da7d1f22d
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-05-05 11:34:39 +02:00
Paul Wicking
538223d10d Doc: Enable snippet compilation
Enable compilation of snippets in network, widgets, and testlib.

Task-number: QTBUG-74787
Task-number: QTBUG-81497
Done-with: Nico Vertriest <nico.vertriest@qt.io>
Done-with: Kai Koehne <kai.koehne@qt.io>
Change-Id: Ifdc7c06698bdee5fd423a145320f6cc0db63622b
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2020-05-05 11:17:48 +02:00
Lars Knoll
e7efa77bb3 Compile fixes for clang10
Fix some warnings that are flagged as errors on clang10.

Change-Id: I906634c8b2bd94db42d74a7f3d10efb086e373cc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit bc726ed5d9)
2020-05-05 10:53:52 +02:00
Assam Boudjelthia
dbaf62033a Android: fix mimeTypes handling for file dialog
Since Android native file manager supports mimeTypes, I use
QMimeDatabase to get the correct mime type for the nameFilter
used with the file dialog.

[ChangeLog][Android] Support setting mimetypes and and namefilters for
Android native file dialog.

Task-number: QTBUG-83089
Change-Id: I46545576dc9b51aa872bb37dbf4fe12b2533bdd9
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-05-05 10:29:15 +03:00
Kai Koehne
540b6f6d64 Doc: Fix compilation of testlib snippets if sql, widgets are missing
Change-Id: Ibcc872408ba829085809737004d9d3186bd20bab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-05 08:33:49 +02:00
Kai Koehne
fcceae605a Allow switching of QT_NO_CREATE_VERSIONLESS_TARGETS
Fixes: QTBUG-83774
Change-Id: Ib3f2507a917046426b94a779e205012ce52cbfe9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-05 08:33:40 +02:00
Kai Koehne
ec2ac17c10 Improve QTranslator documentation code snippet
Use :/i18n/, because this is the place where translations are stored
by default if using qmake's CONFIG += lrelease embed_translations.

Also revert change of app.exec() done in 16da0b2cf8. First of all,
both QGuiApplication and QApplication feature overloads of exec(),
so using QCoreApplication::exec() might miss functionality.
Anyhow, while it's true that all of them are static member functions,
the vast majority of our examples and templates call them with
class member access syntax, so let's try to be consistent.

Finally, the example since a while uses QCoreApplication::translate,
not tr(), so let's not mention it in the description.

Change-Id: Ic6e5d91cf04d3f0d1a4296c5c09e790773e6fc62
Reviewed-by: Miłosz Kosobucki <milosz@kosobucki.pl>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-05 08:33:31 +02:00
Marc Mutz
616000ed7f torrent example: fix premature pessimisation
Use case-insensitive endsWith() instead of lowering a QString and then
comparing case-sensitively.

As a drive-by, replace ascii string literal with char16_t one.

Change-Id: Id4d8e5b197baba7aa3ae4c2ae57414c1242b3827
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-05 05:28:19 +00:00
Marc Mutz
c86aa00431 QItemSelectionModel: port a local QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: I5d7d32c52ad19d37c0e1191e822304349944d7e6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 07:27:35 +02:00
Marc Mutz
f5a32861e3 QResource: port a local QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: If059f2ac66967168fe269cd62aaee9cfeb10f17e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-05 07:24:42 +02:00
Marc Mutz
a6a412dbb6 QItemSelectionModel: replace a QPair with a dedicated struct
Pairs are easy to use, but they have no semantics attached: Two
QPair<int, int> compare equal, e.g., even though one is used as a
coordinate and the other as, say, a fraction. It also carries no
information for the reader of the code, as exemplified by the urge to
comment on the content of the pairs in both functions that use them.

So, write a minimal struct with equality and qHash() instead. The
comments are now no longer needed.

Change-Id: I51f6ff049a5f8fa61c51856376ac2fcbfb8dd506
Reviewed-by: David Faure <david.faure@kdab.com>
2020-05-05 07:24:26 +02:00
Giuseppe D'Angelo
2eee9e6fcf QKeySequence: remove docs of methods recently removed
Amends dccf28b7c3.

Change-Id: Ic4eeda8706b58fdff716e8f86a2bf7cc77ec0c7a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-05 00:32:27 +00:00
Giuseppe D'Angelo
3aadbec516 QAbstractScollArea: Cast an enumerator to int before doing math on it
Change-Id: I78288c7d104a33936b6f1f3f7bff9a076845cfc8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 00:32:01 +00:00
Giuseppe D'Angelo
ca88c6ab58 QFileDialog: fix enumeration mismatch
To define a shortcut a Qt::ArrowType enum value was getting
mixed with a keyboard modifier. An actual mistake spotted
by blocking mixed-enum operations!

Change-Id: I4df56ee411599937c243288e8518b5c1df446397
Pick-To: 5.15
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 00:31:57 +00:00
Giuseppe D'Angelo
2c9a29a09a QHashFunctions: port to if constexpr
Condition is a compile-time one.

Change-Id: I6e60f12cc51e96b2528c375017357c0631e2fc0b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2020-05-05 02:31:54 +02:00
Yuhang Zhao
317383217b Add more entries for QMAKE_TARGET_XXX
Change-Id: I1cf4a8f19ec47247fbe469b9cc81ed80f6ba5a82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-05 08:24:22 +08:00
Qt Forward Merge Bot
5e94fdc488 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-05-04 23:12:40 +02:00
Thiago Macieira
8f7e21bc50 Don't compile pcre2 if we will use the system library
Change-Id: I99ab0f318b1c43b89888fffd160b4923a06c4585
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-04 12:49:30 -07:00
Sona Kurazyan
ed6fbeffb2 Port more tests from qtbase/tests/auto/corelib/io/ to CMake
Change-Id: I56427e3e1908047a0674c8c80c24eeda80e947c2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-04 19:21:15 +02:00
Qt Forward Merge Bot
0f7987f0c9 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/text/qlocale.cpp
	src/network/access/qnetworkaccessmanager.cpp

Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt

Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
2020-05-04 17:38:40 +02:00
Volker Hilsheimer
112c285fcc QFile::moveToTrash: use $XDG_DATA_HOME/Trash as the trash directory
The code assumed that files in $HOME should be moved into $HOME/.Trash,
which is not what the spec says. The "home trash" is defined to be
$XDG_DATA_HOME/Trash, and we can expect $XDG_DATA_HOME to exist. If it
doesn't, then we can safely fail, as the environment is not compliant
with the Desktop Base Directory Specification [1] anyway.

[1] http://www.freedesktop.org/Standards/basedir-spec

This will make the tests fail on such non-compliant environments, such
as server versions of the distribution. That's acceptable.

[ChangeLog][QtCore][QFile] moveToTrash now creates the trash folder on
Linux as $XDG_DATA_HOME/Trash, as required by the freedesktop.org spec.

Change-Id: I7ef73c0c268ef5ea4df141bb7831b93a65ad213a
Fixes: QTBUG-83933
Pick-to: 5.15
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-05-04 16:26:26 +02:00
Marc Mutz
ea7d85457d QFileSystemEngine: port a local QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

Change-Id: Ife8e09b4a54060ef52c9aac43e400736ea398c29
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-04 08:53:52 +02:00
Lars Knoll
7f02abd301 Fix 64bit size issues in QCache
size() and count() should return a qsizetype in Qt 6 in line
with QHash and other containers.

Add a cast in keys(), as QVector still needs to get converted to use
qsizetype for it's length.

Change-Id: I64a9d16ec4279d3dbb35c718b16a741665b9769e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-05-04 08:31:05 +02:00
Friedemann Kleint
da3cb1deb6 uic: Generate Qt 5 connection syntax
Add a enum and formatting for member function pointer based
connections. Now preferably use member function pointer for Qt classes
or parameterless connections.

This should not require qOverload() within Qt classes after the
Signal/Slot disambiguation.

Add command line option to force either syntax for all connections.

Task-number: QTBUG-76375
Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-04 08:12:33 +02:00
Eskil Abrahamsen Blomfeldt
8231614661 Fix QTextDocumentLayout test with certain fonts
If there is a negative right bearing on the last character of the string,
it will stretch past the tab position (which aligns the advance position,
and not the right edge of the glyph). For certain fonts, this would cause
the actual ideal width to be calculated as 301 instead of 300 (which is
the right alignment edge set in the code).

Pick-to: 5.15
Fixes: QTBUG-46206
Change-Id: I03e8b8fb86e9ebe5337d3ba3384ade73d2ccdd69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-04 08:00:37 +02:00
Eskil Abrahamsen Blomfeldt
7a18b7e2c2 Fix font height metrics with embedded bitmaps
For fonts with embedded bitmaps, we cannot trust the HHEA and
OS/2 tables, since there are a different set of font metrics
in the EBLC/CBLC tables for each of the predefined bitmap
sizes.

In this case, we can safely fall back to the metrics returned
by the system, as the inconsistency we were originally fixing
was only between OS/2 and HHEA and will not matter for the
bitmap fonts.

This patch also simplifies the code path through the font
engines a bit. Instead of setting the system metrics in the
processHheaTable() function when the table cannot be found,
we instead always fetch the system metrics at the very start
of initializeHeightMetrics() and then override if there are
no embedded bitmaps, and if the HHEA and OS/2 tables are
available. This also reduces the number of virtual functions
needed to sort out the height metrics.

Fixes: QTBUG-83754
Change-Id: Ib9dc6fc6cf972e48209a4a272469d2b4bd1ebffe
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-05-04 05:46:25 +00:00
Paul Wicking
b7e3a9e504 Fix typo in readme
Change-Id: I6066eb5309ff7e6e4e6fd1b8dff65957be6d5a55
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-04 07:01:55 +02:00
Kai Koehne
e720b7ff47 Doc: Small fixes in qt5_wrap_cpp documentation
Pick-to: 5.15
Change-Id: I0cc066eb5b53c7efb94a9f94cf574b2507f90cf8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-03 10:30:46 +02:00
Marc Mutz
0f2869fcdc QDirIterator: port visitedLinks from QSet to QDuplicateTracker
Apart from a more fitting, minimal, API, QDuplicateTracker also
transparently uses C++17 pmr::monotonic_buffer_resource to avoid, or
at least reduce, memory allocations.

The old code performed the visitedLinks check unconditionally, but
since we add entries to visitedLinks only when following symlinks (and
this property cannot be changed under iteration, as `iteratorFlags` is
a const member), the new code only performs the check conditionally,
with unchanged semantics.

Change-Id: Ia2c2dda16136ef5256e2c345b8ecba530883ee37
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-03 08:16:33 +02:00
Marc Mutz
1ba42c10bb QDirIterator: move a guard condition from caller to callee
The private pushDirectory() method is only called from the
QDirIterator ctor and from checkAndPushDirectory(). Moving the loop
check from checkAndPushDirectory() to pushDirectory() therefore
doesn't change anything, since, for the ctor case, it will always
fail.

This is preparation of using QDuplicateTracker for `visitedLinks`.

Change-Id: I609934002dabebf0a3e7a516b8398eae7db770d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-03 08:16:23 +02:00
Marc Mutz
e62f6ffcb3 QDirIterator: make a confusing condition less so
The old code checked for non-empty-ness before asking whether it
contains a certain path. But an empty container cannot contain any
path.

Simply remove the isEmpty() check.

Change-Id: Ie40279a8db4900c2f7892c2a058206d622565b10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-03 08:16:16 +02:00
Lars Knoll
74306a02ce Don't use a QTextStream to read lines from a file
QFile::readLine() can do the same at a fraction of the cost
of QTextStream.

Change-Id: I8c542756bcbd893dfa76d03e76e3ce0810aa2871
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-02 21:32:05 +02:00