Commit Graph

41350 Commits

Author SHA1 Message Date
Tor Arne Vestbø
401e81063f Replace use of deprecated API in macOS event dispatchers
Change-Id: I077ba12b406f662ba22b2f2cddf0171963335739
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-28 01:13:11 +02:00
Qt Forward Merge Bot
fbda189e08 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-28 01:01:03 +02:00
Qt Forward Merge Bot
e8d7df4cb2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I98086dc1584e90a24a4f90cd7b86582df047e81d
2019-09-28 01:00:51 +02:00
Friedemann Kleint
d35de9e1b2 Windows/MinGW: Fix posted events timer not stopping
Specify the type of the enum value SendPostedEventsWindowsTimerId
to be UINT_PTR to work with the g++ interpretation of enumeration
signedness and use the correct type for the returned timer id.

Fixes: QTBUG-78491
Change-Id: I7b3f306d3f60da7a21500ece5243ac90854ccf1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 20:44:31 +02:00
Friedemann Kleint
e7272ee9bd Re-enable tst_QOpenGLWindow on Win32
The test was found crashing with software rendering in Qt 5.7.

Removing the insignification revealed that there are failures
on WinRT as well, blacklist them for the moment.

Task-number: QTBUG-78802
Fixes: QTBUG-49630
Change-Id: Ib1a3efe69d7b63cdd98c6da364ab09e0e2dbdf62
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2019-09-27 20:41:55 +02:00
Albert Astals Cid
d12bf4eb83 Port two examples from QTime to QElapsedTimer
Change-Id: I23d13bf1e909801797a8fc2785c46f341ef5ee77
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-09-27 18:01:58 +02:00
Alexander Volkov
388d539865 doc: Fix variable name in QDBusArgument snippet
Change-Id: I751802d3f9f389e80cbb9aabcdb637d4742d3832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 18:27:17 +03:00
Joerg Bornemann
21d988a199 Doc: Document CONFIG values that are worth documenting
Fixes: QTBUG-538
Change-Id: Id06e316e7ae3d59b63b256ef565a1ad6dc5d9dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-09-27 15:51:25 +02:00
Leena Miettinen
f92a7c1288 I18N: Load qtbase_ translation catalogs in examples
...instead of the qt_ meta catalogs. The qt_ catalogs
are needed for backwards compatibility and depend on
translations for now deprecated modules, such as qtscript,
that might not be installed in the system. This causes
loading the translation to fail.

Instead of the qt_ catalogs, the examples should use the
translation files for the Qt modules used, here qtbase_.

Task-number: QTBUG-69203
Change-Id: I13f5a3d6653cef8379a712fbc02ec320eea4e51a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-27 13:48:53 +00:00
Edward Welbourne
25430f90e6 Fix documentation of qfloat16
Various methods were undocumented and even one that was lacked a \since 5.14

Change-Id: I1e65ed1bb9c5b9de06210d7e18af36539aafc4ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 13:56:59 +02:00
Edward Welbourne
72457ed076 Fix doc of QDateTime::YearRange; include its \since 5.14
Change-Id: I2e6c27953ecce95df3ac4868a6d953596ba115f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 13:56:55 +02:00
Marc Mutz
e24c387413 Short live QtPrivate::{condition_variable,mutex}!
This is a temporary measure to work around an implementation bug on
Integrity: For all other platforms, QtPrivate::condition_variable is
just std::condition_variable. On Integrity, it's a class that wraps
QWaitCondition to provide the interface of std::condition_variable.

This allows the use of std::condition_variable across Qt without
running into the Integrity issue. Once we can depend on an more modern
Integrity toolchain, removing QtPrivate::condition_variable is a
simple mechanical change:

   s/QtPrivate::condition_variable/std::condition_variable/g;
   s/QtPrivate::mutex/std::mutex/g;

Task-number: QTBUG-78450
Change-Id: I293a99d1cdc48691817b926aa51ecd84556e5e90
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 07:04:42 +00:00
Allan Sandfeld Jensen
0a8be8127b Fix robustness detection for windows
Fixes detecting requested robustness for OpenGL < 4.0.

Fixes: QTBUG-78781
Change-Id: I6a10f3ed925dd05d5caa7d6b6e12935e27eed3e9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-27 06:44:59 +00:00
Christian Ehrlicher
efb9f2e1e4 tst_QListView: cleanup
Cleanup QListView autotest:
 - fix indentation
 - use QCoreApplication::sendEvent instead of QApplication::sendEvent

Change-Id: If6bb686502f6b4f2bc2dd0db52b331b2c35cf36d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-26 17:29:50 +00:00
Dmitry Kazakov
5839714d98 Fix QRandomGenerator initialization on AMD CPUs
Some AMD CPUs (e.g. AMD A4-6250J and AMD Ryzen 3000-series) have a
failing random generation instruction, which always returns
0xffffffff, even when generation was "successful".

This code checks if hardware random generator generates four consecutive
equal numbers. If it does, then we probably have a failing one and
should disable it completely.

Change-Id: I38c87920ca2e8cce4143afbff5e453ce3845d11a
Fixes: QTBUG-69423
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-26 19:52:50 +03:00
Laszlo Agocs
fc8d6d3ea1 rhi: gl: Fix not resetting color write bits when switching pipeline
This was visible in the triquadcube test when enabling transparent window
background: the cube on the left was rendered incorrectly because alpha
was not written out due to not setting glColorMask() back to the defaults
when switching to another pipeline.

Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:43 +02:00
Laszlo Agocs
0628932fef Move cache key calculation to QOpenGLProgramBinaryCache
This class will likely be used by the OpenGL backend of QRhi as well.
Therefore, we need to make it more self-contained and independent.

Change-Id: If046ed41e25c70cc9abb45219b451f9179feaa1c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:39 +02:00
Laszlo Agocs
c06627a230 rhi: metal: Eliminate redundant setCullMode and setFrontFaceWinding calls
Task-number: QTBUG-78605
Change-Id: Icc3a9636055b5f45418da28cc05aa02e19370c02
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:28 +02:00
Laszlo Agocs
22d22eb282 rhi: Add a --transparent option to manual tests
This will also cause clearing to 0,0,0,0.

Essential in order to allow fast testing of window transparency
issues in combination with QRhi and the various backends.

Change-Id: Iee2763c1d06f1d3e5d59a9142abaf30fab1dc543
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:12 +02:00
Laszlo Agocs
30e27328e3 rhi: Unify handling of special cases for scissor and viewport rects
With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative
width or height. Everything else is allowed. This is also the semantic we wish to
keep for QRhiViewport and QRhiScissor.

This raises some problems. For instance, when we do bottom-left - top-left
rectangle conversion, the case of partially out of bounds rects needs to be
taken into account.

Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when
the QQuickWindow size is decreased so the content does not fit because that will
then start generating negative x, y scissors for clipping (which is perfectly
valid but the QRhi backends need to be able to deal with it)

Then there is the problem of having to clamp width and height carefully, because
some validation layers for some APIs will reject a viewport or scissor with
partially out of bounds rectangles.

To verify all this, add a new manual test, based on the cubemap one. (cubemap was
chosen because that is an ideal test scene as it fills the viewport completely, and
so it is visually straightforward when a scissor rectangle is moving around over it)

Fixes: QTBUG-78702
Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2019-09-26 17:02:05 +02:00
Eskil Abrahamsen Blomfeldt
d5abda313d iOS: Fix fallback fonts on iOS 13+
Since iOS 13, the cascade list for the default UI font contains
meta-families for several writing systems, such as CJK. Since
these font families were never populated to the database, we ignored
them in Qt, and thus got missing glyphs for the characters in question.

The fix is to make sure these fonts are populated in the database.
It contains a partial backport of 922d195020,
which adds the qt_isFamilyPopulated() accessor to allow us to check
if the family has been populated in the font database. In Qt 5.14,
there is public API for this in QPlatformFontDatabase, so this is
a temporary resolution until then.

Fixes: QTBUG-77467
Change-Id: Ia9ebb8a19ad2367eb764ae1496a52966b465336b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-26 10:32:25 +00:00
Edward Welbourne
06a7aba731 Fix QCalendar::isValid(): make it const
Spotted in API change review, thanks to Albert Astals Cid.
Also added documentation of this method.

Change-Id: I2ef2c526a98b571a3cb3bb5f93d1952b1b0d63a9
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-09-26 09:53:23 +00:00
Christian Ehrlicher
2431765d57 tst_QItemView: cleanup
Cleanup QItemView autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: I46edc2dc5bbaa09fb11710fa34ef4c6639181f62
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-25 17:19:05 +02:00
Friedemann Kleint
dc042c6dee Windows: QSysInfo::prettyProductName(): Improve version formatting
For Windows 10 and higher, the SP version and major/minor versions
are not relevant any more; the release id (displayed by the winver
tool as "Version" should be displayed instead. Add helpers and
change the output accordingly.

For Windows 7, output the build number.

[ChangeLog][QtCore][Windows] QSysInfo::prettyProductName()
now returns a version including the Windows 10 release id or Windows 7
build number respectively, resembling the version string displayed by
the winver tool.

Change-Id: Ia783272a0da234d2f7ff35c4a9a6fc296da277e0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-25 17:15:29 +02:00
Tor Arne Vestbø
fc4a6b0b97 Fix rpath on UIKit systems
Change-Id: I0b35c32f3730dc15d868b10489abeda909bbe926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-25 15:39:10 +02:00
Tor Arne Vestbø
9a1eb86f3d macOS: Prevent warnings about object files without any symbols
Change-Id: Iafe976bdd27da0476b2e6bb6d84db8ca34aa0a62
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-25 15:39:02 +02:00
David Faure
947883141d QWidget::setFocusProxy: adjust focus widget properly
My commit 3e7463411e adjusted the focus widget by setting
QApplicationPrivate::focus_widget directly, while there is a method for
doing this properly, including setFocus_sys() and emitting signals.

Fixes: QTBUG-77364
Change-Id: I218acf7a9de39173d282ced46def4f65594f80b4
Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-09-25 15:21:15 +02:00
Friedemann Kleint
8810f82f3f QWizard/Aerostyle: Fix "&Next" shortcut
The fix for QTBUG-35203 set the Alt+Right shortcut on the next
button, clobbering the Alt+N shortcut from parsing the text (similar
for other languages). Add a separate shortcut for Alt+Right since a
button may not have several shortcuts.

Amends 6714196f45.

Fixes: QTBUG-78604
Change-Id: I1367da739c35fbd011d11f850c9bc3915113c644
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-25 15:14:36 +02:00
Allan Sandfeld Jensen
d512f5ac3a Handle returned bitmap glyph when not requested
Add back code to handle bitmap glyphs returned when we did not request
a bitmap glyph. This is a can happen on some configurations where
bitmaps are not suppressed.

Fixes: QTBUG-78116
Change-Id: Ie0c6cfbf9c50456431b0e3a23e568f3399e5a879
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-09-25 14:46:36 +02:00
Mårten Nordheim
65cb6f5f29 tst_qsslsocket: Update some QSslConfiguration usage
Following the deprecation of add[Default]CaCertificate[s] let's update
the uses of it. While we're doing this, let's also use QSslConfiguration
more in some places where it makes sense.

Change-Id: I2c9e7c73fee8a405492410378f2babe67d3a3f25
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-09-25 14:13:58 +02:00
Mårten Nordheim
665b387d68 QSslSocket: Deprecate add[Default]CaCertificate[s]
As a separation of concerns the QSslSocket should not be dealing what is
QSslConfiguration's job. The other related functions
(e.g. setCaCertificates) was deprecated in Qt 5.5.

Change-Id: I3f214148adc5270ae651d0b27d83fe374b1516b8
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-25 14:13:48 +02:00
Mårten Nordheim
1068d579ee QSslConfiguration: Add functions for adding CA certificates
The QSslSocket versions of these will be deprecated.

Change-Id: I88c788f88e13f190e015d6a78b958e81c2d483a1
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-25 14:13:37 +02:00
Andy Shaw
c3faeb8528 Fix CVE-2019-16168 in SQLite
v3.29.0 is the latest and there is no indication as to when the next
release is so we will apply this separately for now and it can be
reverted once it is in a release that we ship with.

This patch is taken from https://www.sqlite.org/src/info/98357d8c1263920b

Change-Id: I82d398b093b67842a4369e3220c01e7eea30763a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-25 10:09:50 +02:00
Andy Shaw
f88476569a sqlite: Update to v3.29.0
[ChangeLog][QtSQL][sqlite] Updated to v3.29.0

Change-Id: Ibf61c829dcd24dc8cdf00f5b57078255b0ad5ef1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-25 10:09:34 +02:00
Christian Ehrlicher
c5c51f442a tst_QHeaderView: cleanup
Cleanup QHeaderView autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: I4df0b46c58ae9ae9dd4d9762390a2b14886aa68f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-09-25 08:21:21 +02:00
Thiago Macieira
abfac029ce QFileInfo: clarify documentation about handling of symlink attributes
On Windows, shortcut ".lnk" files are treated as symlinks, and
attribute queries on a shortcut file return the results for the
shortcut target.

Fixes: QTBUG-77523
Change-Id: I907a43cd9a714da288a2fffd15bada7eba37d3ba
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-09-25 01:25:30 +00:00
Thiago Macieira
1872d1a41d Doc: Q_FLAG should be applied to the enum, not the QFlags
moc extracts he name that is inthe Q_FLAG macro and that gets used in
qDebug(). As the documentation described, qDebug would have printed:

  QFlags<LoadHints>(QLibrary::ResolveAllSymbolsHint)

which doesn't compile (though we could have partially specialized
QFlags<QFlags<E>> to be QFlags<E>). The semantically correct output is:

  QFlags<LoadHint>(QLibrary::ResolveAllSymbolsHint)

which is what this change gets. The ideal output would be:

  LoadHints(QLibrary::ResolveAllSymbolsHint)

But that's not a doc change.

Fixes: QTBUG-77216
Change-Id: I0635172f4f2a4c51a435fffd15b59a859886e90c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 18:25:21 -07:00
Thiago Macieira
70e6e9fe59 Filesystem: avoid crashes on exit in case the locale codec is null
On exit, QLocale::codecForLocale() can return null as the codec may have
already been destroyed. In that case, pretend that Latin1 was the
locale, so any file name is acceptable. This matches QString:

    QTextCodec *codec = QTextCodec::codecForLocale();
    if (codec)
        return codec->toUnicode(str, size);
 #endif // textcodec
    return fromLatin1(str, size);

Note that if we're wrong and the locale was *not* Latin1, files that you
had a name to may not be encoded or decoded the same way.

Fixes: QTBUG-78446
Change-Id: Iece6e011237e4ab284ecfffd15c54077728a17ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-24 18:24:00 -07:00
Shawn Rutledge
06cc5d3071 Ensure that QFont::fromString() doesn't parse empty font specifications
Fixes: QTBUG-78236
Change-Id: Iba060e7a24080cdc8f317ecb6dc616b2cd918acb
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-24 14:38:40 +02:00
Friedemann Kleint
74179a209a Revert "BLACKLIST insert_remove_loop for msvc-2019"
The error was due to a compiler optimization bug, which is fixed
in 16.3.0.

This reverts commit 305f2c3aa6.

Fixes: QTBUG-77239
Change-Id: Idfb86ad5c3ec026518f0713c41f7ad744ab4d5db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-24 10:26:00 +02:00
Friedemann Kleint
27782af821 QWizard: Use member initialization in private classes
Remove superfluous constructors.

Task-number: QTBUG-78604
Change-Id: I8a422cfeaaedf89ce310e06d5db80907cd1102d4
Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
2019-09-24 09:50:14 +02:00
Andy Shaw
fdae0ccc5f Fix connection string code snippet for ODBC on Windows
Fixes: QTBUG-15133
Change-Id: I86d77aec039fdfaf262ad056c944c7cfc30e0041
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-09-24 08:42:11 +02:00
Oliver Wolff
f72dfdb9af Skip tst_QDateTime::systemTimeZoneChange for UWP configurations
Due to their sandboxed nature, UWP applications do not have access to
system settings like time zone.

Fixes: QTBUG-71185
Change-Id: I567a255f8adc18838fff79b81210faa094674722
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-24 06:18:07 +02:00
Andy Shaw
54d3059ccf Move DialogButtonBoxLayout case to be before MouseDoubleClickDistance
This amends 9be66cb282 so that the
DialogButtonBoxLayout case is moved to be before the
MouseDoubleClickDistance one in case the fallthrough is triggered.

Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-09-24 06:17:20 +02:00
Frank Richter
36a5b00a92 QVulkanWindow: Allow to change queues to create
This allows users to request queues beyond the default graphics queue without having
to completely reimplement Vulkan device initialization or giving up the convenience
of QVulkanWindow.

[ChangeLog][QtGui] Extended QVulkanWindow to allow user to specify additional queues
to be created.

Change-Id: I96d8d4bcc4da3ffedca3d25c87547669f5b18e40
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-24 04:16:36 +00:00
Qt Forward Merge Bot
9a09af1cb7 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-09-24 01:00:54 +02:00
Qt Forward Merge Bot
a211c240a9 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9ec6345a38ada55219f3cdfb6bd0d6e9169fe880
2019-09-24 01:00:43 +02:00
Christian Ehrlicher
0c15cf66a4 tst_QListWidget: cleanup
Cleanup QTreeWidget autotest:
 - use range-based for loops
 - use nullptr
 - use member initialization
 - use new signal/slot syntax
 - use static invocations
 - use override

Change-Id: Ied5c0b12c0d3338469e50f3b30892557c9b4479d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-23 22:38:31 +02:00
Christian Ehrlicher
70c053ee68 QAbstractSpinBox css: properly honor spincontrol-disable-on-bounds
The css style 'spincontrol-disable-on-bounds' was not properly honored
within QAbstractSpinBox::initStyleOption() because the affected widget
was not passed to QStyle::styleHint(). Therefore QStyleSheetStyle did
not find the correct render rule.
Fix it by passing 'this' as third argument to QStyle::styleHint().

Fixes: QTBUG-18008
Change-Id: Iabcebf0b83143f45309b4e7066bccb8d20bd0419
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-09-23 18:39:08 +02:00
Tor Arne Vestbø
1d1ed01711 Xcode: Ensure there's always a CFBundle[Short]Version[String] set
Leaving it empty resulted in errors from Xcode when compiling the app.

Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-09-23 16:02:59 +00:00