remove useless define and ifdef/error, and check for a more appropriate
function.
Change-Id: I1a1622cc157c49ebb6787068ade7b33e45e228ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
these would be caught by the central verifyspec test, if we even got
that far.
Change-Id: I3eda80c4614b94f869d907f0a40166f4914ea692
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
- #error hack for MIPSpro compiler from unix/clock-*
- irix exclusions from unix/*iconv
- hpux defines from unix/{getifaddrs,ipv6ifname} (the obsolete
hpuxi-g++-64 spec would add them automatically anyway)
Change-Id: Ib227e5626c0e8c8f6faebf76c312d77955f80b92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
amends b4525b3407, which gives no indication for why this was done.
judging by other tests, it wasn't cargo-culted. i presume it was just
about disabling debug-and-release, and the debug choice was arbitrary.
the central system nowadays does the same, just that it uses release.
amends 1533bfc5fc, which certainly _was_ cargo-culted from the former.
as a side effect, this removes some other CONFIG manipulations which are
handled centrally or are wholly ineffective nowadays.
Change-Id: Ib9af2837925a2f19af05506e798a26d363635735
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
in the gles tests, use #ifdef __APPLE__ directly instead of defining
BUILD_ON_MAC. this is consistent with the desktop gl test, less magic,
and corresponds with the later usage (which does #ifdef Q_OS_MAC).
amends f3d82a89.
in the desktop gl test, clean out the dead Q_OS_MAC define from the
project file (added in 45dc5852 concurrently to the more direct fix in
864815ef).
Change-Id: Ieebad3c7e87218b887f61485c331b93eadfcf406
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
CID 11161 (#1 of 1): Missing break in switch (MISSING_BREAK)
unterminated_case: The case for value Qt::BottomToolBarArea is not terminated by a 'break' statement.
Coverity-Id: 11161
Change-Id: Ie254d0339e41a58004632e9997febac4a1ab4edd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
The coordinates need to be representable in signed 16-bit not unsigned.
Task-number: QTBUG-62251
Change-Id: I1d4aaa2fb90b8f428380277d5b4e416a4672ee6a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Commit 9e64fc9e1c caused a regression
which stored all QDateTime entries as if they were in localtime,
which causes them to be offset by the amount of local timezone
offset. This is fixed by adding "Z" if the time should be in UTC or
using "+/-hh:mm" if it should use fixed UTC offset or specific
timezone.
Task-number: QTBUG-57138
Change-Id: Ie60905dfb3a517db442b636ca41daf8348753d84
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
For clang -Os is very similar to -O2 and doesn't really reduce size much.
-Oz is usually what you want to use with clang for code reduction.
Now clang binaries are only 9% bigger than gcc's, instead of 22%.
Change-Id: Ib0ba560be26db68aeb21c13df4b151b7fbd81431
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This is shown in the file properties, and in crash dialogs.
Task-number: QTBUG-61970
Change-Id: Icf12fabb7fad30638c4e94c8ea8729c9106d01d9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
If ibus has been set, but either isn't installed or doesn't launch, all
composition fails on xcb. This ensures we fallback to "compose" which
is needed for working composition on XCB.
Change-Id: Ic2061c330bcb907759a13920c3eede14f3036563
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This reverts 2bc619c30e, which tried to
fix an unspecified problem by regarding all fonts with EBDT tables as
potential bitmap fonts. The change log does not have any reference to
a bug report or a problematic font. It also singled out Windows and GDI
as the only font engine where this was necessary, which caused difference
in behavior between different platforms, and even a difference in
behavior on Windows when setting the hinting preference or turning on
high-DPI scaling.
The fact is that any font may have an EBDT table, and Microsoft has this
for the smaller pixel sizes of many of their default fonts, e.g. Calibri.
The result was that Qt would detect these as bitmap fonts and refuse to
use distance field rendering for them.
If there are fonts where it is a real problem that some glyphs only exist
as bitmaps, we first need to know about them. Then we need to find some
other solution than a blanket blacklist of all fonts with EBDT tables.
For instance, we could separate the bitmap glyphs into their own QGlyphRuns
and use native rendering only for those specific glyphs.
[ChangeLog][Windows][Fonts] Some key fonts, such as Calibri, were being
detected as bitmap fonts and not rendered correctly in Qt Quick. This has
now been fixed.
Task-number: QTBUG-62176
Change-Id: If892390cc74f180c5df9ef80484ba2eb0319f987
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
A three-way if/else-if/else had the same line of code as all three
branches and a TODO to fix that. As it happens, the flags being
tested here are irrelevant; they indicate whether the transition time
(which is always given in UTC) was *specified* (i.e. the how a
relevant authority identified the transition time) in terms of local
wall-clock time, local standard time or UTC. The correction
contemplated by TODO (and experimented with in an earlier version of
this change, that broke correct tests) has in fact been done for us by
the zoneinfo package's zic (zone-info compiler) in the course of
writing the binary file we're parsing. These flags are only present
in the binary file to enable the date command to correctly handle
POSIX-style values for the TZ environment variable.
We consequently have no need for the tz_ttisgmt or tz_ttisstd fields
of our QTzType and can save the bother of recording them, when reading
their part of the file.
Change-Id: Ia33e87291ecc383eb5cb796d7b8a5213a94f1648
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Check we do handle DST after epoch and don't before.
Check we do notice various unusual transitions.
Check we do handle non-whole-hour-offset zones.
(Unfortunately, MS-Win lacks data for some of the zones and is wrong
about the two date-line crossers, so we skip those for it.)
Change-Id: If420d61b9db7f914ca25c22297c16e917ad2307a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Previously, the updating of drives in QFileSystemModel was connected
to a signal triggering when a drive containing watched files was
removed via QFileSystemWatcher notification. This did not trigger
when a drive that was not expanded in the view was removed, since
no files were watched.
Since QFileSystemModel is not interested in the path of the drive
being removed, add a generic signal triggered by
DBT_DEVTYP_VOLUME/DBT_DEVICEREMOVECOMPLETE and use that to update
the drives.
Complements 8e79806d08.
Task-number: QTBUG-18729
Task-number: QTBUG-53436
Change-Id: Ibcde4665824c41151042237d4d620c48bc1e2e18
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Move the logic to set default values for VERSION,
QMAKE_TARGET_DESCRIPTION to qt_app.prf. This way,
a lot more executables get sane defaults.
Change-Id: I8394418c118a8877cec792eddc8894397c0fbf2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Make the tool description even simpler so that e.g. moc shows up as
"Qt Moc". The 'description' is shown in various places as the mere
title, so it shouldn't be too verbose.
This augments change ad68bf51e7.
Task-number: QTBUG-61970
Change-Id: I4b30b95a10d597a9a8a2c388c2381ea38a340be6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
QWinEventNotifiers were limited to 62 instances, because of
WaitForMultipleObject's limitation to MAXIMUM_WAIT_OBJECTS - 1 handles.
Use the RegisterWaitForSingleObject API which does not have this
restriction and executes waits in threads managed by the system. A
central manual reset event per event dispatcher is signaled in the
RegisterWaitForSingleObject callback and waited for in the event loop.
Task-number: QTBUG-8819
Change-Id: I3061811c18e669becf9de603bbdd7ba96e4d2fcd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When ::WSAIoctl() reports 1 byte available for reading, we are trying
to peek an incoming datagram to ensure that the data is actually
delivered. But, according to MSDN docs, we are not allowed to pass NULL
as 'lpNumberOfBytesRecvd' parameter to ::WSARecvFrom() call, if
'lpOverlapped' parameter is also NULL.
The case with an empty datagram is fixed accordingly.
Change-Id: Id13038245332d3fb4bc18038d44a7cfd7ce04775
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Restrict the checking to the internal window handle to prevent it being
thrown off by other WM_USER messages used by applications.
Complements change 124b9a6ff8.
Task-number: QTBUG-62083
Change-Id: Ifb1b00e4ff70cb7e53873943e46cea0d72ff6257
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
MinGW 7.1 claims the qUuidOf<> specializations are unused:
In file included from accessible\qwindowsaccessibility.cpp:59:0:
accessible\iaccessible2.h:274:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessible2]' defined but not used [-Werror=unused-function]
IID qUuidOf<IAccessible2>() { return IID_IAccessible2; }
^~~~~~~~~~~~~~~~~~~~~
In file included from accessible\qwindowsaccessibility.cpp:59:0:
accessible\iaccessible2.h:58:5: error: 'IID qUuidOf() [with DesiredInterface = IAccessibleComponent]' defined but not used [-Werror=unused-function]
IID qUuidOf<IAccessibleComponent>() { return IID_IAccessibleComponent; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends 4f599c5ea1.
Change-Id: Iafcfe8b8d8ca9cdf00663f39ad491347b51d3ace
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Split the test in two: one test that requires the symlinks
and test files and one that does not need them.
In the test with test files, verify each step and the deletion
of the files.
Task-number: QTBUG-58654
Task-number: QTBUG-50835
Change-Id: I14de57ce7a1df2d834d5a7565c804dead1d89088
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The test is just wrong.
It suggests, that it tests minimal block size,
but in reality it is checking if a maximal peak of block size
is bigger then expected minimum block size.
The minimal block size is 1, not 1024 / ideal threads count and
it is defined in BlockSizeManagerV2.
The maximal block size is defined and it is fixed, but it is an
implementation detail, probably not worth testing.
The test is based on a race condition as peakBegin and
peakBlockSize are modified in parallel from multiple threads,
without any synchronization.
Change-Id: I430eedcf83b0fa3e2ce2cfd294eaee7b301e48ae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Instead of forwarding the flush to the view, using CoreGraphics to blit
the backing store to the window, we do everything in flush(), and use
higher level AppKit APIs to do the blit.
This simplifies the flow and code quite a bit, and also supports blitting
of individual regions in a flush instead of the whole bounding rect.
Change-Id: I2173c1a7763fe652a94125c7e3ae93a655412cd3
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In QFileDialog, when a resolved symlink gets deleted, the actual target
it points to gets deleted instead of the symlink itself. The patch is to
delete the symlink rather than actual target by doing the following:
1. In QFileDialog, if a directory being deleted is a resolved symlink,
do not remove the directory. Instead, call QFileSystemModel to remove
the model index.
2. In QFileSystemModel::remove(), use the full file path instead of
the resolved file path for deletion. For a symlink, delete the symlink
itself.
The patch is for Windows and Linux.
Task-number: QTBUG-29770
Change-Id: I4db545f0b5963acde3f89a8ee858338c23104804
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
QDateTime takes dd and yyyy. It is confusing when the example format
strings don't work because they use DD YYYY, and it is a silent error
with the characters not getting substituted and can be easy to miss.
Improved Qt::ISODate, TZD isn't a format character so skip writing out
a bad format example.
Task-number: QTBUG-62111
Change-Id: Ia61d561074ae885fc0a99238d93cb34aaa9953bb
Reviewed-by: David Fries <david@fries.net>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This fixes a problem introduced in a60571b370
The problem happens when an application like Kate (actually, ktexteditor)
uses QSaveFile to save files. So if you open a secretfile.txt file (with
permissions 0600), edit and save it, then QSaveFile currently
generates a temporary file with 0666 that afterwards gets chmod'ed to
0600 again, but in between, some other user in the system can open the
temporary file and get a file descriptor that would allow him/her to read
the contents of a file with 0600 permissions.
Change-Id: I824025f54d6faf853da88e4dfcb092b577b4df04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Before we generated the following content:
set(_qt5_corelib_extra_includes "${_qt5Core_install_prefix}/X:/src/qt5.9/qtbase/mkspecs/win32-msvc")
Which lead to the following error when used:
CMake Error at Z:/build/qt59/qtbase/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
The imported target "Qt5::Core" references the file
"Z:/build/qt59/qtbase/X:/src/qt5.9/qtbase//mkspecs/win32-msvc"
=> We prefixed an absolute path with another absolute path which is
obviously wrong
After the patch we generate this content:
set(_qt5_corelib_extra_includes "X:/src/qt5.9/qtbase/mkspecs/win32-msvc")
This patch ensures we never prefix an absolute path additionally
Patch by Konstantin Tokarev
Change-Id: I05dab7f681958723594ceb78064be41798e83fb8
Task-number: QTBUG-61768
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
This needs a zone with transitions near the epoch; and the only CET
with DST that winter was Italy (copied by Malta), for which the Olson
database had a recent (2016) correction to its data, for that winter.
That means we get inconsistent results on O/Sen of different ages.
So add a separate testEpochTranPrivate(), alongside testCetPrivate(),
and test it with America/Toronto. (Unfortunately, MS-Win gets the
date wrong on the first transition after the epoch, so we have to code
round that.)
Since information before the epoch isn't reliably available, only test
the search backwards if nextTransition does find something before it.
(We can safely assume all real transitions happened since 1601;
non-celestial time-keeping wasn't accurate enough, before that, for
anyone to synchronize with anything but celestial time.)
Change-Id: I984b46938a2805b93bb2afd6855e317b5d66b386
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Found while working on suppressing the warning about the return value
(which is either 0 or -1) was being ignored.
Task-number: QTBUG-61968
Change-Id: I02d22222fff64d4dbda4fffd14d148b1724547ca
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A crash has been observed on Windows in the use case below:
1) In a non-native QFileDialog, select a file and press "Del" key to
delete it, and a warning message box appears for user to confirm the
deletion.
2) Delete the file in the Windows Explorer.
3) Click "Yes" on the warning message box, a crash happens
In QFileDialog::_q_deleteCurrent(), use QPersistentModelIndex
instead of QModelIndex to ensure that the index is valid to be
deleted. The change is intended to fix .
The patch is to use QPersistentModelIndex instead of QModelIndex
in QFileDialog::_q_deleteCurrent() to ensure that the index is
valid to be deleted.
Change-Id: I8959124dc071f7cf0ab47f954d611211a789978d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Passing a null pointer as a parameter to the setChild function no
longer crashes when calling the
QStandardItemModelPrivate::itemChanged signal. The child is removed
from the model.
The patch also fixes the behavior of deleting a item. A
dataChanged signal is emitted.
Change-Id: I027e8b0d84fe33c5fca056df870f0e60a020824b
Reviewed-by: David Faure <david.faure@kdab.com>
This patch avoids intermediate copying of the data by writing SSL
decryption data directly into the outer socket's read buffer.
Change-Id: I19e5b6087595f280436a99fb2ca93cc6793c8f36
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
This reverts commit 346cd79192. The bug
report was incorrect, since the suggested file name is actually valid,
it just happens to name an Alternate Data Stream (ADS) "20:803Z.txt" in
file "testLog-03".
[ChangeLog][QtCore][QFile] Reverted an incorrect change from Qt 5.9.0
that forbade the creation and access to Alternate Data Streams on NTFS
on Windows. This means that file names containing a colon (':') are
allowed again, but note that they are not regular files.
Task-number: QTBUG-57023
Change-Id: I81480fdb578d4d43b3fcfffd14d4f2147e8a0ade
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Output family and format error message using _comerror struct.
QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed (The operation completed successfully.)
becomes
QWindowsMultiFontEngine::loadEngine: CreateFontFromLOGFONT failed for "8514oem": error 0x88985002 : Indicates the specified font does not exist.
Change-Id: Iccd4622127d94870b4b7465a4b4fdbf34ad1c434
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
OpenType support missing for script 11
becomes:
OpenType support missing for "SimSun", script 11
Change-Id: I562e20d630c9cdd888f75fd99b987de5152cd77e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The test is marked as expected failure for the last 3 years, in CI it
is proven to be somehow flaky and it is failing now because of XPASS
which is not covered by blacklist feature.
This patch extends efforts of 7eba6d039d
and 03b4838cb5 by blacklisting the test
completely.
Change-Id: Ia295d61620fa6bc97b168d4de9456a18ed5c064f
Task-number: QTQAINFRA-1333
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I5a2758065d3155f4f33b76c022c43955a9b096c2
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>