Write down which files are under CC0, and which under BSD.
Change-Id: Ifdbfa3393b2a0f0d857e6c569bd105426c0719cb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Windows CE is not supported since 5.6. No need to have checks anymore.
Change-Id: I384bd67e04dec06e83ee69b4ef5dc7dd97888c14
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
For WinRT QPrinter and co are disabled in the new configure system.
Still, we need to have printsupport enabled as a module, providing
no printer.
Task-number: QTBUG-56321
Change-Id: I95ce538e8f54073832af551ccf7f981e877a3b25
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Windows Information Protection is used for splitting corporate and
personal data, requiring connections to be established in a different
way instantiating ThreadNetworkContext.
Usage is enabled via the QT_WINRT_USE_THREAD_NETWORK_CONTEXT environment
variable.
Change-Id: I3aaa097b66fc616d42cd05a1e20bbcb004f6e467
Reviewed-by: James Tong
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The prior test deemed there to be narrowing if source and destination
integral-or-enum types didn't have the same signedness; but all values
of an unsigned source type can be represented in a larger signed
destination type, so there is no narrowing in this case.
Updated QObject test-case to match.
Change-Id: I517a5997adcad70e185d7469a8d26788e463cb75
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
In a case like the SVG iconengine there is no available sizes
implementation. However in that case we don't need to provide different
sizes as we can have SVG scale it for us to the one requested. So it is
assumed that with no available sizes implementation that the icon
engine will take care of this for us.
This ensures that SVG files can be used as icons inside the menu on
macOS.
Task-number: QTBUG-40225
Task-number: QTBUG-55932
Change-Id: If01ca582c4c07834e6de16652924e0b7e118c87c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
remove(int, int) with O(N) was used in a loop.
We had a quadratic complexity.
Use erase-remove idiom to fix it.
Change-Id: I643a2a75619ec5ea2bf99e48a25f64a7f69ba156
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Flushing all events to ensure that the expose (or other queued events) get
processed right away is dangerous. Instead, pass ExcludeUserInputEvents like
many other platform plugins do. This way queued input events do not get
processed at an unexpected point in time and so do not interfere with modal
dialogs for instance.
Task-number: QTBUG-57229
Change-Id: I9da09e62627d26485fb5a37fc190cb4a4bcb28b6
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Add new file for dynamically loading Window 10 Helpers via combase.dll
and add function qt_windowsIsTabletMode() querying
UIViewSettings::get_UserInteractionMode() for "Touch" mode.
The style hint QPlatformIntegration::ShowIsMaximized will then
reflect the tablet mode setting.
Task-number: QTBUG-56831
Change-Id: Ia361dd172fcf0e54fdfc70863c43527f3ea72fe2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
By templating on the <chrono> types and unconditionally using
duration_cast to coerce the duration into a milliseconds, we
allowed code such as
mutex.try_lock_for(10us)
to compile, which is misleading, since it's actually a zero-
timeout try_lock().
Feedback from the std-discussions mailing list is that the
wait_for functions should wait for _at least_ the duration
given, because that is the natural direction of variance
(tasks becoming ready to run might not get a CPU immediately,
causing delays), while an interface that documents to wait
_no more_ than the given duration is promising something it
cannot fulfill.
Fix by converting the given duration to the smallest number
of milliseconds not less than the original duration. If that
is not representable in an int, use INT_MAX, emulating the
effect of a spurious wakeup, which are allowed to happen if
the function returns false in that case.
In the above example, the try_lock_for call is now equivalent
to
mutex.tryLock(1);
The tryLock() docs state that the actual waiting time does
not exceed the given milliseconds, but fixing that is a
separate issue.
Change-Id: Id4cbbea0ecc6fd2f94bb5aef28a1658be3728e52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Found by ASan when it should have been found by me in the initial
review...
The old code did, in this order:
1. delete item->layout() (which deletes item, as QLayoutItem::layout()
is just a dynamic_cast implemented with virtual functions)
2. delete item->widget() (which is correct, but too late, as 'item'
may have already been deleted; this is the first use-after-free
bug)
3. delete item->spacerItem() (which is the second use-after-free).
Fix by deleting item->widget() (which may be a no-op), _then_ checking
for a QLayout, deleting all children (but not the layout), and finally
deleting item as a QLayoutItem.
Rename clearQLayoutItem() to clearAndDestroyQLayoutItem() to better
match what it actually does.
Change-Id: Id70a7a137dac5de466ef619f01bfd61dfc150418
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Show the tech preview license for commercial users if -confirm-license
is not set. This matches what the configure shell script is doing, too.
Task-number: QTBUG-55676
Change-Id: I69f5553ab53dfcdc14c200e682c024a6cebee8fe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
The previous documentation said:
"On OS X, the string returned resembles the sequence that is shown in
the menu bar."
That was not completely true because the string returned depends on the
format passed to the function.
Task-number: QTWEBSITE-744
Change-Id: I1b7d9367547326670d1b3a8cfe48f066910f5a10
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
The code coerced a -123 into a QFormLayout::ItemFlags, which, however,
being an enum with enumeration values 0..2, only has valid numerical
values 0..3.
Fix by using 3 as the value to represent the invalid enum value, and
store this in a constant so as not to distribute this magic number
all around the test class.
Change-Id: Ie5e93a69ef5a3acdde43030b022e0cce8aec484d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The logo (microsoft.windows.softwarelogo.showdesktop.exe) is otherwise
not found.
Change-Id: Ic52329462612a027e2928922a1f9a541dcbc67a3
Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We first hide identifier 'hr' and then later we check the one that was never
correctly initialized.
Task-number: QTBUG-57226
Change-Id: Ibbf1bb99aa752c2e4090caf4533dc5f5b71b5e41
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The time stamp is added at the end of the node information and
consequently this also bumps the version.
Task-number: QTBUG-57182
Change-Id: Ia10e006f28c0b168b2bcd74ed8b7098f84d10af3
Reviewed-by: hjk <hjk@qt.io>
Introduce helper functions switch_{on,off,from_to} to make
the code more readable, and prepare everything for later
optimizations reducing the sizes of critical sections (by
locking the mutex later, or even never).
This commit, however, is only concerned with shutting up
tsan.
In waitForResult(), simplified the code by removing an
unneeded if guard: the condition is checked in the while
loop immediately following in the then-block, and the
local variable declaration that precedes the loop is not
worth guarding.
Change-Id: I24bfd864ca96f862302536ad8662065e6f366fa8
Reviewed-by: David Faure <david.faure@kdab.com>
Change the main window to contain a QTabWidget and add a log widget
logging relevant events on the top level widgets for testing changes.
In the preview window, add new window flags of Qt 5 and output
geometry, margins and window state in addition.
Change-Id: Icec366223b6c163d58a69034687f3d9323a91533
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Add commercial licenses as an alternative to BSD for code that
is statically linked into applications by default. BSD requires
attribution even for commercial customers, which is not intended.
This is a manual backport of parts of change 71404b0be1 in 5.7,
and should be dropped when merging to 5.7.
[ChangeLog][License Changes] Static libraries that are linked
into executables (winmain and qopenglextensions) are
now licensed under BSD _and_ commercial licenses.
Change-Id: I0d33bc09c06548d63b11a39027e9bb12c1b9a915
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Chaining hooks together was mentioned by Ossi in the comments of
d953d9a4. This patch justs add a test that verifies that it works, and
also serves as an informal example for developers looking how to do it.
Change-Id: I53a014d5663c289ea0559e0926ed301f4e5110e6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
A test was directly accessing the .text member of QDateTimeParser
(which presently has nothing private). Use the virtual .displayText()
method of this base instead, to let the base have some hope of
data-hiding (maybe, some day).
Change-Id: I8b6e39fba130de56f117bffb2aec346197969c5b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This strips leading whitespace from asset catalog filenames, which was
causing installation to fail due to incorrectly calculated paths.
Task-number: QTBUG-57090
Change-Id: I80db627262f9d58f4403e2d8ab205bef2113992b
(cherry picked from commit addf1f45f3)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
the order of the arguments passed to addExclusiveBuilds() determines the
name of the CONFIG flag which actually enables the mode. that is
historically fixed to iphonesimulator_and_iphoneos and we cannot just
change the order.
to get around this, add a new "overload" of the function which allows
specifying the flag independently from the order of the builds, and make
use of it in ios' resolve_config.prf.
amends d2b4a789c.
Change-Id: Ia3fabea0c0c30beae680b57e75bdcdf35ef6503d
(cherry picked from 59985b3c29)
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This test fails on Windows occasionally with values just short of 800, the lowest
observed being 791. It is probably rounding somehow to 10ms segments, so allow
it to be up to 10 ms too fast.
Change-Id: Ie28e9f61588b68a9060a006f78eedc3a26d05155
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The outer scope it was in had a later clause with its own pos
variable.
Change-Id: I8d083d3d5935416ef82a78890ed145f02d6d6ded
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QModelIndex is not safe to be used to store an index as it is designed
to be discarded right after use as the index information can change.
Therefore a QPersistentModelIndex should be used instead to store the
index. Subsequently the m_index does not need to be updated whenever
the model changes anymore as this is already done for us.
Task-number: QTBUG-49907
Change-Id: Icc93e410de2821c503ea15a7a1dd9ae32634914e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
GCC warned:
tst_qtablewidget.cpp:30:
tst_qtablewidget.cpp: In member function ‘void tst_QTableWidget::mimeData()’:
qtestcase.h:66:52: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
if (!QTest::qVerify(static_cast<bool>(statement), #statement, "", __FILE__, __LINE__))\
^
tst_qtablewidget.cpp:1523:5: note: in expansion of macro ‘QVERIFY’
QVERIFY(data = table.mimeData(tableWidgetItemList));
^~~~~~~
Fix by adding the extra parentheses, as usual.
Change-Id: I2826d7a865b4113b468d5a958ede06e03aa0e278
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Even QByteArray::fromRawData() allocates memory.
Instead of QByteArray::contains() and indexOf(), use good ol'
strstr(), like already done elsewhere in the same function.
Apart from the memory allocations saved, this fixes a Coverity error
complaining that indexOf() can return -1. It's a false positive on the
first occurrence, because we didn't call that function unless we know
there is a "0x" in the string, but the second _was_ wrong, because we
applied it on a new buffer, with unknown content.
Coverity-Id: 11262
Change-Id: I18f352c5576e24f89a5c3ef7f2f1b2176f2a235d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Easy to miss otherwise and hasAcceptableInput() already references setValidator().
Change-Id: Id2d63050db670ab8f7150d7f76492664751cd2da
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This will be used in QtQuick to avoid costly string manipulation (which in turn
involves memory allocations).
Change-Id: I51a67a4cd97cc576f399483c9c0c13da1e1c6e72
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>