ASN UTCTime uses two characters to encode a year (YY). When converting it
into QDate, it's quite naive to just add 2000. According to RFC 2459,
these YY represent dates in the range [1950, 2049].
This patch also introduces a helper function doing the checked conversion
from a string to int (to be reused in the following-up patches).
Task-number: QTBUG-61934
Change-Id: I3f6f471d24e8357b83b2f5973023b2b842751389
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Task-number: QTBUG-61987
Change-Id: I27219a6d06d7a81514e3f7b2ad5469676f724e04
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Adds the hints that are read and used by the plasma-integration platform
theme, so naked Qt applications can integrate just as well on this
front.
Change-Id: I45a113e0081ea96c8cf543c22b28b69280ae7619
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
Revert SHA1 - b1708efeeb as it causes a
problem with QtMultimedia.
Change-Id: I0ba366fa6ddccff3715917f5f455b20c73c2e49e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Sometimes AppKit will pass in a proposed size that's smaller than the
geometry of the screen. We don't know why, but shouldn't assert.
Change-Id: I9970c5f587e1e0fb3f2fa932de5a32ac4e1eb76d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A deadlock can occur if the user does
QLocalSocket *ls = new QLocalSocket;
ls->moveToThread(t);
...
delete ls;
Then QLocalSocket calls QWindowsPipeReader::stop() in a different thread
than the I/O operation is running in. The waitForNotified(-1) call would
then wait indefinitely until the I/O thread is in alertable wait state
again. Especially on application shut down this might never be the case,
and the application would deadlock.
Solve this by detaching the Overlapped object from the
QWindowsPipe{Reader|Writer} in stop() and delete it in the callback.
Task-number: QTBUG-61643
Change-Id: Ie262d75c5fd92ac7cf7dfcdbf1519050be9fd3c4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Do not try to set the default value of dialog buttons in fusion, but
let the common style handle it that asks the platform theme.
This adds icons to dialog buttons on platforms that usually has that
(such as KDE).
Change-Id: I29cfa49cfd993224220bc992c523f5b2df20870d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
The old docs contained obsolete information. Also, the new docs
match the new docs for the other Apple OS deployment targets.
Change-Id: Id773fa2086f291d8a2552fe1b339ec1e13c19d74
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
The following variables were not documented:
- QMAKE_IOS_DEPLOYMENT_TARGET
- QMAKE_TVOS_DEPLOYMENT_TARGET
- QMAKE_WATCHOS_DEPLOYMENT_TARGET
Change-Id: I5cfb6c0024d92e943aed882fd01bc2a4f2c7c042
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
We forgot to update the warnings when removing qt_cancelIo.
Also, use %p instead of %x, because HANDLE is void*.
This amends commit fade2958.
Change-Id: Ia11d7d094aa6beb939e0be4bbe4ab3654eaa1c02
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
de63bbd2f8 introduced a new
QPlatformTheme::standardButtonShortcut which would then unconditionally
overwrite the QPushButton shortcut, even when empty, breaking activating
mnemonics potentially included in the button's text.
Task-number: QTBUG-61197
Change-Id: I2a5a460a820a5ab4054eb44f349066aaeca1436f
Reviewed-by: Marco Martin <notmart@gmail.com>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
silent.prf modifies the compiler commands by prefixing them with a
silencing echo command. For MSVC, the used $< syntax is only valid in
inference rules. However, the PCH rule is not an inference
rule and breaks when silent.prf is used.
Remove the echo command for MSVC. The compiler already outputs the
currently compiled file. There's no need to do it twice.
Task-number: QTBUG-61688
Change-Id: I7e2c1211e471c9c149c16cac8e87406e88ee2d97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The classes themselves and their equality operators are used in
constexpr functions/ctors (in QKeyValueIterator) so Visual Studio 2017 expects
them to be marked constexpr as well. Currently this causes a compilation error
when instantiating a QKeyValueIterator using either of these iterators.
Change-Id: I2e3eeaf3b3f11f381a63875e6575dfd82fe56fcb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The references to the this pointer look somewhat alien in the
documentation, because it isn't part of the signature. Rather make
the relationship explicit.
Change-Id: I6de516e165ea6e9c4ee2898836e9490fbaf4545c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Consider the raw string \\\\. The previous algorithm would consider
the last 3 \ to be escaped because the previous character is a \ and
thus calculating a maxLength of 3.
But this should be treated as two escaped \ with a maxLength of 2.
Change-Id: I6c4b8d090a2e1c6e85195d5920ce8b80aea1bc2d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The documentation claims that QGuiApplication forwards the top-level
windows. However this appears to be a search & replace mistake from the
QApplication <> QGuiApplication separation times. Only QApplication
forwards the event to top-level widgets and changeEvent() is a virtual
method of QWidget. Nothing is implemented for plain QGuiApplication and
QWindow.
Change-Id: I71b05ecebc90f7c28e150590764438ebaa90e88f
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Change-Id: I419f884f4145dbe2b60751bf6cde3968cf34fe4a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QVariant claims to be able to QVariantHash and QVariantMap, but the
actual conversion implementation is missing.
Task-number: QTBUG-61471
Change-Id: I0cba74642aa77dc423effed289bc7619922a89eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Clip buffers being converted to those being worked on so we don't write
outside the lines.
Task-number: QTBUG-61863
Change-Id: Icc7c6c0946fa522b5afeca0663fc2b45151b1897
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Use QT_ARCH instead of legacy QMAKE_TARGET.arch, which is not
defined for MinGW.
Change-Id: I5a1298321f696cf1bc30613283174ecfa0139600
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
On VMWare Workstation 12 it will indicate OpenGL 2.1 support but it is
not sufficient enough as it is lacking things needed to use QtWebEngine
without crashing. Falling back to d3d9 works fine in this case as d3d11
also crashes.
Change-Id: I404867045a74f37d3ecc7e04e669dd305570deeb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Older versions of CMake expanded `@var@` in CMake code, so this could be
expanded at this location rather than the `string(CONFIGURE)` call if
`module` were set inadvertently. Instead, hide the literal `@` symbol
from CMake, but not from the string.
This avoids a CMP0053 warning for projects using Qt5 with a minimum
version set lower than 3.1 and silent bugs with projects explicitly
setting CMP0053 to OLD.
Change-Id: I0e4a86469fdf69b8706387799ab9b17498b8d1ca
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
It's a Linux-specific call that was added to the kernel in pre
historical times (before Git). Sqlite3 uses mremap(2) but it has its own
checking. Nothing else in Qt uses this.
Looks like the last user was the QPF font engine, removed in commit
d7e424ee66 almost four years ago. And
that's considering that the QPF font engine wasn't in use since Qt 5.0
because QWS was no more...
Change-Id: Idaa189413f404cffb1eafffd14ceee7488514c1d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This was accidentally removed when we revamped the document
mode tabs appearance.
In retrospect, we should also consider adding CE_TabBarTabIcon
so that we can set the relative position of the icon w.r.t.
the tab title.
Change-Id: Ic8c3a69c31837018bfdd60f8084120cae47e91f8
Task-number: QTBUG-61092
Task-number: QTBUG-61742
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Bail out of QStorageInfoPrivate::doStats() should an error occur
and set the ready/valid flags accordingly.
Task-number: QTBUG-6039
Change-Id: Id5354b31329d951599ae991aa7edde0515c90514
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Pass SHGFI_USEFILEATTRIBUTES/FILE_ATTRIBUTE_NORMAL to ShGetFileInfo() in
case a file does not exist to obtain an icon.
SHGFI_USEFILEATTRIBUTES cannot be used unconditionally as it
breaks custom directory icons.
The functionality is then on par with XCB which obtains icons
via QMimeDatabase look-up.
Task-number: QTBUG-25319
Change-Id: Icd894d97fd8d1a2c4d5d39e86afe89843e6720c4
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The original version (8758f532ae) of
this file was full of things that are irrelevant for XCB GL plugins.
Most of this has been cleaned out as side effect of porting to the
new configure system. This patch cleans up the remaining pieces.
It does not matter for XCB GL plugins if Qt was configured with
-qt-xcb or -system-xcb as those are dependencies of xcb_qpa_lib-private
and are not used directly by these plugins.
The only XCB dependencies that are directly used by these plugins
are libxcb-glx and libxcb, which are managed directly in xcb_glx.pro:
qtConfig(xcb-glx): QMAKE_USE += xcb_glx
Change-Id: I2175185902bb028de142c8ff6e0b0a3b76a09703
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QObject when it should include QtCore/QObject
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtCore/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QList when it should include QtGui/QList
QtInputSupport: WARNING: qtbase/src/platformsupport/input/integrityhid/qintegrityhidmanager.h includes QThread when it should include QtCore/QThread
Amends 88f30250eb.
Change-Id: Ia56fdd87871fdeae8fe34752c61a66195100ceb7
Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io>
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
We can't open a file for reading if the file is open by another process
(or by ourselves) without sharing permitted. So ask for no access just
so we can get a handle to it.
Change-Id: I998653739e1cec2a58a07a6593b6ff87c1d59dd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QFileSystemEngine::id() will stat(2)/CreateFile in order to get the ID
of the file anyway, so we don't need to use QFile::exists() to check if
the destination exists. Instead, rely on id() returning a null value to
indicate error. On Windows, it's possible that the calls to either
GetFileInformationByHandle or GetFileInformationByHandleEx might fail,
but we ignore those.
Change-Id: I1eba2b016de74620bfc8fffd14ccaebcbed64419
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>