Commit Graph

38315 Commits

Author SHA1 Message Date
Christian Ehrlicher
b8720e3e7a Cleanup Widgets examples - Validator example
Cleanup the widgets examples - move the ValidatorWidget class into its
own source/header file instead of implementing it in main.cpp

Change-Id: I2b74ca4f2491168453dc31e0631f31e3ac83123c
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-17 19:50:23 +00:00
Christian Ehrlicher
7ec7f338bc XCB plugin: replace deprecated QList::swap()
QList::swap(int, int) was deprecated. Replace it with swapItemsAt()

Change-Id: I077c5b7222e40b928ee9035b8cbf4ebcc91aa15e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-17 19:50:11 +00:00
Christian Ehrlicher
4c522e0226 QPalette: mark foreground()/background() as deprecated
QPalette::foreground()/background()/ColorRole::Foreground/Background
are deprecated since Qt4 times. Therefore mark them as deprecated so
they can be removed in Qt6.

Change-Id: I24a47e080241b7f16b8adde1f9f16e29133462a7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-12-17 19:49:57 +00:00
Christian Ehrlicher
f4d72b3a12 Styles: replace deprecated QPalette functions
QPalette::foreground()/background() are deprecated since 5.13 - replace
those functions with their successors.

Change-Id: I158b6403437d3d48c0859360823133ca4ced2c23
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-17 19:49:03 +00:00
Christian Ehrlicher
108f0cc998 Widgets: replace deprecated QPalette functions
QPalette::foreground()/background() are deprecated since 5.13 - replace
those functions with their successors.

Change-Id: I80e49dadd7be1007d73ac920f6db2b8e608db06a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-17 19:46:51 +00:00
Sergio Martins
9c2cb3d83e Remove x11Info() and x11PictureHandle() from QPixmap docs
These functions were removed in Qt 5.

Also removed old note about X11 QPixmap being invalid after
QApplication is destroyed. It was redundant as that's the case
with many other Qt classes.

Change-Id: I9dfe2679057fbd4d7b69ca94affb673c383cf519
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-12-16 19:30:24 +00:00
Qt Forward Merge Bot
911fd6f2f7 Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev 2018-12-15 01:03:08 +00:00
Qt Forward Merge Bot
4b04e47be9 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
2018-12-15 01:00:31 +01:00
Thiago Macieira
5384b1f2c8 Repack some classes in Moc to avoid padding holes
Change-Id: I8f261579aad648fdb4f0fffd155385477abadf9e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-12-14 22:12:37 +00:00
Thiago Macieira
e9c08f8287 Mark ICC 18 & 19 as warning-free
Change-Id: I052407b777ec43f78378fffd15311de83f978817
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-12-14 18:25:46 +00:00
Thiago Macieira
3e4f8aa8f4 Doc: fix null pointer passing to fprintf
When these docs were written, the context.file and context.function
pointers were never null. But in commit d78fb442d7
(Qt 5.4), we made the logging pass null pointers in release builds. The
C standard does not say that passing null pointers is permitted. In
fact, it says "If no l length modifier is present, the argument shall be
a pointer to the initial element of an array of character type." and
that's pretty explicit that it needs to point to the initial element of
a string.

Fixes: QTBUG-72478
Change-Id: I4ac1156702324f0fb814fffd156f624ffefa1445
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-12-14 18:25:28 +00:00
Friedemann Kleint
3c3a2eb3ce uic: Generate version check macros around newly introduced palette color role
Change ebd3a13b80 introduced a new
QPaletter::PlaceholderText color role which causes the uic-generated
code not to compile when using Qt Designer embedded in Qt Creator with
older (5.9 LTS) kits. Generate a version check macro to fix this.

Change-Id: I6d9f7edb0c6047c2f64ef3357b29f91655c52aac
Fixes: QTBUG-72555
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-12-14 18:20:41 +00:00
Friedemann Kleint
a8cb177d31 Fix build with win32-clang-msvc and win32-icc
fbbe8aba9d introduced a check for
MSVC_VER to qmake, which is not set in win32-clang-msvc,
causing the build to fail:

Mkspec does not specify MSVC_VER. Cannot continue.
Unable to generate output for: .../config.tests/verifyspec/Makefile

Extract a minimal msvc-based-version.conf which determines
MSVC_VER from QMAKE_MSC_VER for win32-clang-msvc and win32-icc.

Task-number: QTBUG-63512
Change-Id: Ia6de8c4b1aae2ae1962cf4e60e3e6d51fdbbbabe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-14 18:20:26 +00:00
Oswald Buddenhagen
852b1afa56 qmake: don't misuse cache()
... when QMAKE_DEFAULT_{INC,LIB}DIRS cannot be determined.

it would have been nicer to actually persist empty results, but cache()
won't do that, and fixing it doesn't seem worth the effort now.

Change-Id: I95d5645e40a0da572f0def16462703373eaeb804
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-14 17:57:20 +00:00
Oswald Buddenhagen
74cdd89e0f qmake: don't assign fallbacks for QMAKE_DEFAULT_{INC,LIB}DIRS in x-builds
these cannot be possibly correct, and might mislead.

Change-Id: Ie10531807978def04768e2429304949415cafb2a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-14 17:57:11 +00:00
Oswald Buddenhagen
9d76beee5b qmake: don't mess up linking order of libraries
... which are specified by full filepath, by making the de-duplication
consistent with that applied to libs specified with -l, that is, last
one wins.

the problem existed "forever", but it became more visible after the
recent configure changes.

fwiw, Win32MakefileGenerator is not affected, because it has the
opposite problem: it de-duplicates everything (including object files)
in "last one wins mode". it might make sense to change that as well.

Change-Id: Id7ef1d394fcc9d444450672c06a6f11af2b19eab
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
2018-12-14 17:20:11 +00:00
Topi Reinio
d900463283 Doc: Fix linking from Qt Test to Qt Quick Test
Change-Id: I5552fde06f7cc383e1b16cd90ca9fe7cfeb3a436
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-12-14 12:42:48 +00:00
Bernhard M. Wiedemann
1ffcca4cc2 rcc: Use SOURCE_DATE_EPOCH for mtime
Use the standard variable name in addition to the QT-specific one
to make builds reproducible out-of-the-box.

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Task-number: QTBUG-62511
Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-14 12:09:06 +00:00
Mårten Nordheim
81dd1bcad1 QSslSocket Doc: Don't refer to obsoleted functions
Update references in documentation from the obsoleted/deprecated version
because it doesn't make sense here to refer to these versions.

Change-Id: I5e9bdf46191e3ba0c7d91855cb3ccc30097cd412
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-12-14 10:38:18 +00:00
Lars Knoll
d545d36c8e Remove QRegExp dependency from QtXml
Use QRegularExpression instead.

Change-Id: I6fc9400064ef6b7e425b140f5ffac0c9248c1ec0
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2018-12-14 07:52:39 +00:00
Lars Knoll
88d5eb13d7 Use QRegularExpression instead of QRegExp
Change-Id: I14abbf81a9d0fb72f75417da06b6456b8f1a20a2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2018-12-14 07:52:27 +00:00
Lars Knoll
43720ec200 Deprecate QObject::findChildren(const QRegExp &, ...)
Use the overload using QRegularExpression instead.

Change-Id: I1bf468b248c0a3f5b2304b1831379a127093df06
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-12-14 07:52:10 +00:00
Giuseppe D'Angelo
13ba85a70d OpenSSL: remove some more pre-1.0 fallbacks
Again, 1.0 is required now.

Change-Id: Icca5dc38eb33c1579653d96d6c079b335a401aad
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-14 02:16:54 +00:00
Daniel Wingerd
27d3c14ab6 qmake: enable rtti config option for g++/clang
Fixes: QTBUG-26595
Change-Id: Ic996c8e27ef4b79c91c5afa0ad55ef0fc07b6004
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-13 20:51:39 +00:00
Christian Ehrlicher
588bd92228 Cleanup Widgets examples - parent ctor
Cleanup the Widgets examples - add missing parent parameter

Change-Id: I5cd7aa333dbb8e6e4b7b9e05c085120733da83ec
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-12-13 16:57:05 +00:00
Giuseppe D'Angelo
fd83e03e7f OpenSSL: remove some < 1.0 codepaths
We require OpenSSL >= 1.0 now.

Change-Id: I6ffe8b2dd606d600671565ebc8bc8ac2b9e0d6c2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-13 16:00:36 +00:00
Giuseppe D'Angelo
455951f590 OpenSSL: drop support for SSLv2 and SSLv3
As per RFC 6176 (2011) and RFC 7568 (2015).

Code-wise, we're left with the decision of what to do with a few
enumerators in QSsl::Protocol; I've made TlsV1SslV3 act as TlsV1,
and adjusted the description of AnyProtocol.
A new test was introduced - deprecatedProtocol() - to test that
we, indeed, do not allow use of SSL v2 and v3. protocol() and
protocolServerSide() were reduced to exclude the (now) no-op
and meaningless tests - neither client nor server side can
start a handshake now, since we bail out early in initSslContext().

[ChangeLog][QtNetwork][SSL] Support for SSLv2 and SSLv3
sockets has been dropped, as per RFC 6176 (2011)
and RFC 7568 (2015).

Change-Id: I2fe4e8c3e82adf7aa10d4bdc9e3f7b8c299f77b6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-12-13 15:59:37 +00:00
Nick D'Ademo
3364be7859 QDockWidget: Make floating docks respect DockWidgetMovable feature
Currently, even if DockWidgetFeature::DockWidgetMovable is unset
(i.e. moving docks to different dock areas is disabled), it is still
possible to move a dock to a different dock area after it is made
floating (i.e. the DockWidgetMovable setting is ignored). This
change prevents this unexpected/inconsistent behavior.

Fixes: QTBUG-71703
Change-Id: Iaecc293a5ba12dd5b53f5f0bd0cfe77ae54ab393
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-13 12:45:47 +00:00
Mitch Curtis
32fd79a20f QAbstractSlider: fix invertedControls having no effect for left/right keys
There was a comment in the code that said:

// It seems we need to use invertedAppearance for Left and right, otherwise, things look weird.

It's not clear what that was referring to, but in its current state,
a slider with invertedControls set to true will not behave as expected:
pressing the left arrow key will decrease its value instead of increasing it,
and vice versa for the right arrow key.

As stated in the documentation (and by its name), invertedAppearance only
controls the appearance of the slider, and not the effect of key events.

Remove the comment and use invertedControls instead.

Change-Id: I13296cbda9244413978ef0d7f0856065f74fd0bf
Fixes: QTBUG-25988
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-13 10:46:22 +00:00
Mitch Curtis
35602d75d3 Refactor tst_QAbstractSlider::keyPressed()
Don't do several tests at once in the test function. Instead, move
the extra tests to the data function. This makes it possible to easily
add a self-contained test (i.e row) for an upcoming fix.

Task-number: QTBUG-25988
Change-Id: I65c8d7620f01107f8f59c96896b1a641d97f5fdc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-13 10:46:18 +00:00
Friedemann Kleint
e6d1071dd3 uic: Refactor DOM class lookup in class Driver
Change the API to take const Dom * classes and use a helper
function to do the insertion.

Task-number: PYSIDE-797
Change-Id: I079f5c92bae85d6246c14077db06e381b572cda5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-13 07:14:53 +00:00
Friedemann Kleint
4aac7b92c4 QFusionStyle: Fix deprecation warning about QFontMetrics::width()
Fix an oversight of 4d88d79aa5.

Change-Id: I03e403c6d6aefc4f3118ea8efd822fc563b7a514
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-12-13 07:13:36 +00:00
Friedemann Kleint
a0f3b2b503 QtGui: Use Q_DISABLE_COPY_MOVE for QPA interface classes
Introduce Q_DISABLE_COPY_MOVE or replace existing Q_DISABLE_COPY
and add default constructors where needed.

Change-Id: Ibd14ee9d1d69e64f6289efe789d4b64a3d6cb998
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-12-13 07:13:26 +00:00
Friedemann Kleint
ac7265e950 uic: No longer generate static_cast for enum values in legacy forms
Add a lookup for the affected enum values and use the names instead.

Task-number: PYSIDE-797
Change-Id: I6be166409000aff83d9465c9a3b2f37b44c5c085
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-13 07:11:12 +00:00
Qt Forward Merge Bot
4e2e7078b8 Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev 2018-12-13 02:30:54 +00:00
Qt Forward Merge Bot
ad4f359f80 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
2018-12-13 01:00:11 +01:00
Allan Sandfeld Jensen
fc2ec95587 Add Grayscale16 Image Format
[ChangeLog][QtGui][QImage] Added support for 16-bit grayscale format.

Together-with: Aaron Linville<aaron@linville.org>
Task-number: QTBUG-41176
Change-Id: I5fe4f54a55ebe1413aa71b882c19627fe22362ac
Reviewed-by: Nick D'Ademo <nickdademo@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-12 22:26:49 +00:00
Oswald Buddenhagen
69f6d3bd44 configure: fix $$qtConfFindInPath() on windows
uses of this function (or the "files" stanza in configure.json) which
don't explicitly target windows don't specify the .exe extension, so we
need to add it automatically if it's missing.

Task-number: QTBUG-57436
Change-Id: I1994378399bc3466c32ee065e752516f42652975
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-12 17:35:27 +00:00
Nico Vertriest
4e54ac7c89 Doc: correct syntax error in qmake manual
Change-Id: I600f8c9ea8e55dad19345bd4d726cf8d5438e9ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-12-12 17:24:54 +00:00
Oswald Buddenhagen
bccb964b9a escape literal backslashes in qmake files
Task-number: QTBUG-70765
Change-Id: I56abbf19be88d01b2964980fb741567f28e4f0fa
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-12-12 17:24:39 +00:00
Thiago Macieira
d20c980576 Resources: reject compressed content we can't decompress
This solution is composed of two features:

1) C++ code generated by RCC uses two symbols exported from QtCore that
are only present if the feature was compiled in. If the feature was not
compiled in, this will cause a linker error either at build time or at
load time (if they were functions, the error could be at runtime).

2) Binary files generated by RCC have a new header field containing
flags. We're currently using two flags, one for Zlib and one for
Zstandard.

This means we now have binary RCC format version 3.

Change-Id: I42a48bd64ccc41aebf84fffd156545fb6a4f72d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-12 16:36:09 +00:00
Thiago Macieira
2c6ec2c653 Fix tautological compare in error checking
size is size_t, so it's never less than zero.

Fixes: QTBUG-72286
Change-Id: Idd0c85a4e7b64f9c9c7dfffd156d404d0de5ed8d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-12-12 16:30:20 +00:00
Friedemann Kleint
d1cafa3eba qt_imageFromWinHBITMAP(): Fix memory corruption when converting from bitmaps with low depths
Insufficient memory was allocated when asking GetDIBits() to convert to 32bit.
Fix allocation size and use a QScopedArrayPointer.

Fixes: QTBUG-72343
Change-Id: I45f79c913a243316e01bc6efed08e50ccc7d25f4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-12-12 16:08:10 +00:00
Vitaly Fanaskov
ceebad9bd2 tst_QMessageBox: Modernize and simplify code
Changed 0 to nullptr, used more C++-style casts, simplified some
code for searching a button, and changed foreach to range-based for
loop.

Task-number: QTBUG-44131
Change-Id: I211b12751b0e2591d1d14294c31b51d52bb4e3f6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2018-12-12 13:58:16 +00:00
Sergio Martins
da37291f28 When warning about invalid style override also print available ones
Change-Id: Ia017a342648a1f1e1185e74ddec1a77cb6dcfebe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-12 13:33:34 +00:00
Ryan Chu
c820e0b117 Revert "Disable Docker-based test servers on Linux temporarily"
This reverts commit 4b1ce72c23.

The required SHA-1 updates were integrated as:
qt/qt5    ce3791a214f69b6f0310bfe1d5bcc12ac6927c49
qt/qtbase 75ee55e22a

Change-Id: Ic389128ea9b507c506b18a47090930329a4ff6a2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-12-12 09:12:16 +00:00
Lars Knoll
c47b3f61af Use a QMultiMap for the weighted rules
and get rid of one usage of insertMulti()

Change-Id: I26a61dcdd4d778590145c38ae7f39d77ad39a51f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-12 07:43:48 +00:00
Lars Knoll
51dc108e10 Use QMultiMap::insert() instead of insertMulti()
Change-Id: Ia989347730e68f9af0638292f76205bdca61d04f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-12-12 07:43:36 +00:00
Lars Knoll
4e507464e4 Use a QMultiMap for issuer/subjectInfo
The map can contain multiple entries for one key,
so a multi map is the correct data structure.

Change-Id: I852ba3548f46415d8078fd0e8fdd7953ec6c370b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-12 07:43:30 +00:00
Lars Knoll
5823d391b4 Use QMultiMap::insert() instead of insertMulti()
Change-Id: Idaeb99562d39abfd020ff81b1818cba825c4e802
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-12-12 07:43:24 +00:00