When checking whether a slot is connected to a signal, we need to
hold the signalSlotLock to be sure about the answer, or we can
get crashes when a connection gets removed while doing the check.
The check in activate() can handle some uncertainty as it's only
a shortcut to the longer path.
Fixes: QTBUG-74604
Change-Id: I3fc822455fbadc0223ef68632f5fb3df3ff3e86d
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
[ChangeLog][QtCore][QVariant] Fixed a bug that caused isNull() to be
true after downcasting a QObject* payload using convert().
Fixes: QTBUG-73196
Change-Id: Ifda15952f873d7142c95609b69ac424bbf16b723
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
In release mode, MSVC linker will enable it by default
while clang-cl won't. So enable it explicitly.
Change-Id: Iabfd8698d426290fee59662acf6c124b9f226c11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Subjective, but for me its easier to follow code flow if
indentation is not interrupted.
Change-Id: If811ba1b975189c94a671627be8eb3a1fd67aeb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
A QCOMPARE(..., true) isn't much use; and failure would have set the
object's .errorString(), which seems like it'd be worth reporting, so
use QVERIFY2() instead.
Change-Id: I2f3f9379984694891de81d2ffebc696d91eec70f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The rules of std don't permit us to add an overload for
fpclassify(qfloat16), so we need our own equivalent that we *can*
overload. Deploy it in the few places we use fpclassify().
Extended qnumeric's testing to cover qFpClassify().
Change-Id: Ie5a0a5cc24599d1571404c573d33c682b0d305a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Renamed the test, since it covers both, verified slightly more and
added checks that QCOMPARE() copes as intended. Fixed some minor
coding-style defects in the process.
Change-Id: I49c2ffa0568a29e9e4b7f7395d4cacdeb0401da0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This scans the public suffix list and emits suitable content for the
header. Made some modest efficiency gains while hopefully making the
code easier to understand. Check for success when opening files.
Change-Id: If6b25c5c85f86209b33d9188743e820690e7dc05
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
src/network/ssl/qsslsocket.cpp:1501: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1482: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1513: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCaCertificates()'
src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::setDefaultCiphers()'
src/network/ssl/qsslsocket.cpp:1119: (qdoc) warning: Can't link to 'QSslConfiguration::defaultCiphers()'
src/gui/opengl/qopengltexture.cpp:4137: (qdoc) warning: Can't link to 'setComparisonFunction()'
src/widgets/dialogs/qfilesystemmodel.cpp:1215: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/graphicsview/qgraphicswidget.cpp:1229: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/graphicsview/qgraphicsscene.cpp:3313: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/gui/painting/qpaintengine_raster.cpp:3438: (qdoc) warning: Undocumented return value (hint: use 'return' or 'returns' in the text
src/widgets/widgets/qtextedit.cpp:2544: (qdoc) warning: Overrides a previous doc
src/widgets/widgets/qplaintextedit.cpp:2932: (qdoc) warning: (The previous doc is here)
Change-Id: I0c68c59a87eb6a5d9e974f857af6aca0c6e0672d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Split apart the #ifdef so that qdoc on non-Windows systems sees
Q_SECURITY_ATTRIBUTES and Q_STARTUPINFO, fixing:
LOG Build & visit PCH for QtCore
src/corelib/io/qprocess.h:204:9: error: unknown type name 'Q_SECURITY_ATTRIBUTES'
src/corelib/io/qprocess.h:205:9: error: unknown type name 'Q_SECURITY_ATTRIBUTES'
src/corelib/io/qprocess.h:210:9: error: unknown type name 'Q_STARTUPINFO'
Change-Id: I50b4ee6113da4cd49b6b08b84e6e6590438c5573
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Add missing forward declaration, fixing:
src/gui/image/qicon.h:93:16: error: unknown type name 'QPainter'
This apparently only happens for qdoc.
Change-Id: I39e78258f16628d477b629778241c4f5031820c4
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
When the toolbar was moved from one position to another it could end up
increasing the size of the saveState data due to extra lines. This
removes any needless ones that should not be included.
Change-Id: I1c5d094ae1405d6a82db5fcdc3cd081904706837
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
emscripten sends a touchstart event for every touch point when a new
touch point happens, so this makes them moved or stationary if already
known.
This allows QtQuick PinchArea to work.
Task-number: QTBUG-72214
Change-Id: I8e7c0cd2d78b07cfeae21491846cc31092359050
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The editor geometry was adjusted in RTL but not in LTR mode before
Qt5.11. 3ed91da499 fixed this but now all
editors are shown with their default size instead adjusting to the item
width. This works in most cases but fails for small column widths and
e.g. a QDoubleSpinBox. Therefore adjust the size policy for the editors
so their default size is ignored and therefore the column width is used.
Don't do this for a QDateTimeEdit since this makes no sense to only show
a cut of part of the editor.
Fixes: QTBUG-74327
Change-Id: Ie526155571bf24a2d8f38e988d8b2af4bfcc92ba
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Since faff43348b the min/maxSectionSize is
respected when setting the current/default section size programatically.
This is not honored when writing out the properties and therefore the
default section size is not correctly set when it's smaller then the
default minimum section size.
Therefore make sure to set min/maxSectionSize property before all other
properties.
Fixes: QTBUG-74352
Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
If QtCore is being compiled to a system with FP16 support, then all
applications are too and, therefore, we don't need the tables. Saves 12k
of read-only data.
Change-Id: I46363e5b8944459e8c48fffd158bb53d906df297
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
In commit ec97be5585 an invisible frame calculation was added for
Windows 10 that fixes QWidget::move(0,0) for main windows and dialogs.
But because e.g. Qt::ToolTip windows do not have a window frame, the
invisible margin calculation causes them to pop-up in the wrong
position (off by a few pixels).
[ChangeLog][Windows] Fixed QToolTip pop-ups and QComboBox animation
pop-ups being off by a few pixels on Windows 10.
Fixes: QTBUG-74062
Change-Id: I218e8409a250a8b81ecd1d409b597ebd01fb255f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Split up the code detecting the GPUs into small helpers. Add a
QDirect3D9Handle class providing Direct3D9 functionality, add
GpuDescription::detectAll() and add a QVariantList "gpuList" property to the
native interface.
Task-number: QTBUG-50371
Task-number: QTBUG-65882
Change-Id: I8673542d327837babc2ad8f507da76e8ff5524ea
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
xcb_timestamp_t is a 32-bit unsigned value in miliseconds, so it
wraps after 49.7 days. When it happens, QXcbConnection::m_time stops
updating and copy & paste in an application would not work until the
application is restarted. This patch detects the timer wrap and
allows m_time to wrap too. The fix was verified in KDE desktop with
applications running for 51 days.
Fixes: QTBUG-65145
Change-Id: I328c4179c1b1f71914adda6f9a0ca3991a7e808e
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
If the QT_IM_MODULE environment variable is set, then it loads the
IM module accordingly, otherwise it is using the PPS one, if it is
available.
Task-number: QTBUG-54576
Change-Id: Icb8b474805053d8297029096365783c2cabc2cbc
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
(cherry picked from commit 8a7c373f8e)
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
While touching the code, deduplicate some methods.
Change-Id: I28f469f0e9ae000a34466b0ecc604b5f3bd09e63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We've so far made our public API match the TinyCBOR error codes, so the
conversion is trivial. Having the two functions allows us to change
that, if it becomes necessary.
It also effectively concentrates the Coverity warning about mixed enums
in a single pair of functions.
>>> CID 190307: Incorrect expression (MIXED_ENUMS)
>>> Mixing enum types "CborError" and "QCborError::Code" for "err".
Change-Id: Ifbadc62ac2d04a9a8952fffd1589e739c7a5b745
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
After e89fbd8c, QString depends on QStringView.
Fixes: QTBUG-74340
Change-Id: I9cba49db73b74deca05b9a9ddfeec580f30b5e35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
FBOs cannot be shared. Streamline the remainder of the sentence.
Change-Id: I654b23f86f4ee4ea2ca8e71958464d9f55394297
Reviewed-by: Martin Smith <martin.smith@qt.io>
The documentation for QByteArray and QString is using different
notations for '\0'-terminated strings. Unify them by using
'\0'-terminated everywhere.
Change-Id: Ia26ec5c50635bebba1b54b7fe227ff0bcca4f2ad
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
After the 'other' parameter in the "defaulted" definitions was
removed to get rid of 'unused variable' error, docs were not
updated properly, still referring to non-existing 'other'
parameter.
Change-Id: I3acbebfa5f1cf915d46a5bbf1b4a1ea18374b565
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
moc now successfully parses enum values, that have been deprecated with
[[deprecated]]. This is valid c++17 and should be handled correctly.
By adding that functionality it is possible to parse Windows headers
which use this deprecation mechanism.
To make sure, that moc works correctly even on compilers that do not
support deprecated enum values yet, the auto test explicitly uses
[[deprecated]] enum values during moc run.
Fixes: QTBUG-74126
Change-Id: I7b9d9a49af6093a97f8fdb800ffbc5af3d54d262
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
A change to qstrtod() will give us a small performance improvement.
Because the qstrtod() function does not correctly parse the NaN values,
an appropriate check condition for NaN has been added.
Also changed code structure so now the double conversion function
is called only in one place.
Task-number: QTBUG-65748
Change-Id: I49d40e5157e79cc5fce35db4c4272d1ccd270c6b
Reviewed-by: Andy Shaw <andy.shaw@qt.io>