Commit Graph

38751 Commits

Author SHA1 Message Date
Michal Klocek
3fe9f245e8 Add platform native interface to offscreen plugin
Adds trival support for querying "display" and "glxconfig" in case
offscreen plugin is compiled with xlib support.

This is required so this plugin could work with webengine.

Taks-number: QTBUG-63346
Change-Id: Ie0f29385cb44429ddf383ad459e0c9f3263ccffe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-02-12 12:57:26 +00:00
Samuli Piippo
7472415f3f tst_QMenu: skip part of menuSize_Scrolling test
Test fails on minimal and offscreen platforms.

Task-number: QTBUG-73522
Task-number: QTQAINFRA-2630
Change-Id: I6260454be35a8bbac1ab683d89fb7b262d3b69ab
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2019-02-09 13:48:16 +00:00
Christian Ehrlicher
1b5a17632e Fix deprecation warnings in widget autotests
Fix all deprecation warnings within tests/auto/widgets

Change-Id: I854f54c0a1dc0a0086f626b93cd39f63cb1b6033
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-08 18:00:51 +00:00
Friedemann Kleint
4ce485a2eb Fix some QPainter-related deprecation warnings
text/qtextdocument.cpp:2666:48: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
text/qtextdocumentfragment.cpp:545:87: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
text/qtextdocumentfragment.cpp:546:68: warning: ‘QString QTextCharFormat::anchorName() const’ is deprecated: Use anchorNames() instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3321:34: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3342:48: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainterpath.cpp:3366:47: warning: ‘void QPainterPath::addRoundRect(const QRectF&, int)’ is deprecated: Use addRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainter.cpp:4233:49: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
painting/qpainter.cpp:8349:27: warning: ‘void QPainter::setMatrixEnabled(bool)’ is deprecated: Use setWorldMatrixEnabled() instead [-Wdeprecated-declarations]
painting/qpdf.cpp:1545:28: warning: ‘void QDataStream::unsetDevice()’ is deprecated: Use QDataStream::setDevice(nullptr) instead [-Wdeprecated-declarations]
widgets/qtabbar.cpp:2096:17: warning: ‘void QPainter::initFrom(const QPaintDevice*)’ is deprecated: Use begin(QPaintDevice*) instead [-Wdeprecated-declarations]

Change-Id: I76d98ea8146e7586d3763a5610781c7736d37204
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-08 16:41:54 +00:00
Mårten Nordheim
c41efe7373 Schannel: slightly optimize memory-usage for encryption
Change-Id: I0f4b372ad3a0cd5e6730ed2e23e738fb06b2aad5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-08 14:37:50 +00:00
Liang Qi
26ebdeff75 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-02-08 14:27:19 +00:00
Oliver Wolff
30178a22ff Windows configure: Make dynamic opengl the default option
Most people expect dynamic opengl the default, when configuring Qt on
Windows and are not too happy if they have to reconfigure and rebuild when
they they find out, that the default is ANGLE.

Dynamic OpenGL is the way to go as the user can easily decide what to use
by setting the QT_OPENGL environment variable. Besides that, our packages
are built using dynamic OpenGL on Windows

[ChangeLog][configure] The default OpenGL configuration changed from ANGLE
to dynamic OpenGL.

Change-Id: Ia5688249e6d0a4d3ebe8cbe22e02fe290d9f0a4c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-02-08 13:20:07 +00:00
Liang Qi
fbfacd33be Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/android/templates/AndroidManifest.xml
	src/network/ssl/qsslsocket_mac.cpp
	src/widgets/styles/qstylesheetstyle.cpp
	tests/auto/corelib/kernel/qtimer/BLACKLIST
	tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
	tests/auto/testlib/selftests/expected_blacklisted.lightxml
	tests/auto/testlib/selftests/expected_blacklisted.tap
	tests/auto/testlib/selftests/expected_blacklisted.teamcity
	tests/auto/testlib/selftests/expected_blacklisted.txt
	tests/auto/testlib/selftests/expected_blacklisted.xml
	tests/auto/testlib/selftests/expected_blacklisted.xunitxml
	tests/auto/testlib/selftests/expected_float.tap
	tests/auto/testlib/selftests/expected_float.teamcity
	tests/auto/testlib/selftests/expected_float.txt
	tests/auto/testlib/selftests/expected_float.xunitxml

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
2019-02-08 12:31:02 +01:00
Morten Johan Sørvig
c1f4286a5c Wasm: Implement QThread::idealThreadCount()
Read the navigator.hardwareConcurrency property.

Task-number: QTBUG-64625
Change-Id: I2ad582b67e4b0ddac3e3c21febab55543b2e1d6d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 16:14:31 +00:00
Morten Johan Sørvig
de4f256d48 Wasm: enable thread support
configure.json: Make the “thread” feature be allowed
for wasm but disabled by default.

Change qmake.conf and wasm.prf to enable Emscripten
pthreads mode:
- Add USE_PTHREADS=1 linker flag
- Add PTHREAD_POOL_SIZE linker flag with a default pool size (4).
- Add TOTAL_MEMORY linker flag to set available memory (1GB)

It is possible to override options such as PTHREAD_POOL_SIZE
from the application .pro file using QMAKE_WASM_PTHREAD_POOL_SIZE
To change TOTAL_MEMORY, use QMAKE_WASM_TOTAL_MEMORY

Make qtloader.js work in pthreads mode:
- The Module.instantiateWasm callback must provide the module
  in addition to the instance to Emscripten.
- Set Module.mainScriptUrlOrBlob so that the pthreads web workers
  can access the main script

Task-number: QTBUG-64625
Change-Id: I1ab5a559ec97c27c5fc24500ba5f863bcd275141
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 16:13:26 +00:00
Morten Johan Sørvig
6e7a7d5fb9 Wasm: enable source map support for debug builds
The source map location can be configured by setting
QMAKE_WASM_SOURCE_MAP_BASE in the .pro file. Fall back
to “http://localhost:8000” if not set.

Task-number: QTBUG-72002
Change-Id: I9da80dacdefc272f267e5db4caac274d93ba4479
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 16:11:23 +00:00
Allan Sandfeld Jensen
60addee938 Improve ARGB32ToRGBA64 conversions
Improves the precision so 255 values map to 65535 exactly.

Change-Id: I366f408e8c6047d52acbed35e9d665249bbaba2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-07 14:27:47 +00:00
BogDan Vatra
74e04d6ace Android: follow official android flags for cmake
Update our cflags and lflags with the ones found in android.toolchain.cmake

Fixes: QTBUG-73274
Change-Id: Id9fd9bf04df959239abd3100090a1485e872b2f0
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-07 09:02:17 +00:00
Morten Johan Sørvig
928cab5ff1 wasm: add public API for local file access
The web sandbox restricts access to the local file system,
which means Qt needs new public API to provide such
access to applications.

This adds a new static, asynchornous getOpenFileContent()
function to QFileDialog, which will show a file dialog,
read the file contents once a file has been selected, and
finally call the user-provided callback with the selected
file name and file data.

  auto fileReady = [](const QString &fileName, const QByteArray &fileContents) {
    // Process file
  }
  QFileDialog::getOpenFileContent("*.*", fileReady);

This API can be expanded in at least two ways in the
future: allow reading multiple files, and allow file
streaming by returning a QOIDevice.

Change-Id: I011b92fbcf21f0696604e66b7f9eb265c1a07aaa
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 06:49:31 +00:00
Morten Johan Sørvig
790cf25f9d wasm: add local file access private API
Access to the local file system is restricted by the
Web sandbox, and a separate API an implementation is
needed to facilitate this for Qt applications.

This adds a private asynchronous callback-based C++
API for opening a file dialog and reading file content.

The implementation uses a file input html element to
show a file dialog, and then the uses the native File
and FileReader APIs to read the selected file(s).

Change-Id: I4e28baa032d7c3cd63241465f0ae55efd219a05b
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 06:49:21 +00:00
Morten Johan Sørvig
c58df2d12e wasm: add qstdweb private API
qstdweb provides a C++ API covering parts of the DOM API
useful for implementing Qt. This currently includes
ArrayBuffer, Blob, File, FileReader, and Uint8Array.

The implementation uses emscripten::val, which currently
proxies via JavaScript, but should at some point be
able to acccess the DOM directly, once WebAssembly
gains such access.

This API should be easier to use than the string-and-casting
emscripten::val API. It is currently private, and can
be changed and extended as needed.

Change-Id: I95a2ad735e511c8da61f3cc21357fbffe3b05d8e
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-02-07 06:49:10 +00:00
Christian Ehrlicher
7024090e1d QToolButton: fix handling multi-line texts
The patch to elide the QToolButton text when there is not enough space
introduced a regression with multi-line text.
Fix it by using the newly introduced common function to elide multi-line
text.

Fixes: QTBUG-72226
Change-Id: I066ebbd2f360add93406cc29bb4bbbebf599ba42
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-07 05:32:37 +00:00
Christian Ehrlicher
a7ba79553c QCommonStyle: factor out elided text calculation
Factor out the calculation of the elided text from
QCommonStylePrivate::viewItemDrawText() so it can be used by other
painting functions.

Change-Id: I28e6bfd2fe4d7c552848446fa9913df78589d15b
Reviewed-by: Christian Andersen <csandersen3@gmail.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-07 05:32:30 +00:00
Friedemann Kleint
5c98d15a45 Fix some deprecation warnings in examples
googlesuggest.cpp:163:36: warning: ‘void QTreeWidgetItem::setTextColor(int, const QColor&)’ is deprecated: Use QTreeWidgetItem::setForeground() instead [-Wdeprecated-declarations]
xbeltree.cpp:187:34: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
imageitem.cpp:114:21: warning: ‘void QGraphicsItem::setMatrix(const QMatrix&, bool)’ is deprecated: Use setTransform() instead [-Wdeprecated-declarations]
xbelreader.cpp:143:48: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
xbelgenerator.cpp:103:55: warning: ‘bool QTreeWidget::isItemExpanded(const QTreeWidgetItem*) const’ is deprecated: Use QTreeWidgetItem::isExpanded() instead [-Wdeprecated-declarations]
xbelwriter.cpp:90:55: warning: ‘bool QTreeWidget::isItemExpanded(const QTreeWidgetItem*) const’ is deprecated: Use QTreeWidgetItem::isExpanded() instead [-Wdeprecated-declarations]
xbelhandler.cpp:97:50: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
node.cpp:180:60: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
node.cpp:181:64: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
chip.cpp:82:81: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
chip.cpp:84:40: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
chip.cpp:108:93: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
roundrectitem.cpp:65:42: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
roundrectitem.cpp:97:51: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
roundrectitem.cpp:105:34: warning: ‘void QPainter::drawRoundRect(const QRectF&, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
splashitem.cpp:82:57: warning: ‘void QPainter::drawRoundRect(int, int, int, int, int, int)’ is deprecated: Use drawRoundedRect(..., Qt::RelativeSize) instead [-Wdeprecated-declarations]
robot.cpp:116:53: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
robot.cpp:176:49: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
robot.cpp:200:49: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
mandelbrotwidget.cpp:120:41: warning: ‘const QMatrix& QPainter::matrix() const’ is deprecated: Use transform() instead [-Wdeprecated-declarations]
composition.cpp:344:47: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
composition.cpp:346:46: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
colorswatch.cpp:89:34: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
mainwindow.cpp:81:62: warning: ‘void QTreeWidget::setItemSelected(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setSelected() instead [-Wdeprecated-declarations]
puzzlewidget.cpp:172:35: warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations]
spreadsheet.cpp:191:37: warning: ‘QColor QTableWidgetItem::backgroundColor() const’ is deprecated: Use QTableWidgetItem::background() instead [-Wdeprecated-declarations]
spreadsheet.cpp:198:32: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
spreadsheet.cpp:203:24: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
spreadsheet.cpp:238:47: warning: ‘QColor QTableWidgetItem::backgroundColor() const’ is deprecated: Use QTableWidgetItem::background() instead [-Wdeprecated-declarations]
spreadsheet.cpp:249:38: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:494:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:509:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:513:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:527:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:531:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:545:56: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:549:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:563:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:567:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:581:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:585:58: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
spreadsheet.cpp:599:55: warning: ‘void QTableWidgetItem::setBackgroundColor(const QColor&)’ is deprecated: Use QTableWidgetItem::setBackground() instead [-Wdeprecated-declarations]
starrating.cpp:91:46: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
document.cpp:341:36: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
document.cpp:342:39: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
document.cpp:343:36: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
norwegianwoodstyle.cpp:88:39: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
norwegianwoodstyle.cpp:89:39: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
norwegianwoodstyle.cpp:188:52: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
norwegianwoodstyle.cpp:264:56: warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
plugindialog.cpp:128:49: warning: ‘void QTreeWidget::setItemExpanded(const QTreeWidgetItem*, bool)’ is deprecated: Use QTreeWidgetItem::setExpanded() instead [-Wdeprecated-declarations]
tetrixboard.cpp:361:74: warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
tetrixboard.cpp:408:32: warning: ‘QColor QColor::light(int) const’ is deprecated: Use QColor::lighter() instead [-Wdeprecated-declarations]
tetrixboard.cpp:412:31: warning: ‘QColor QColor::dark(int) const’ is deprecated: Use QColor::darker() instead [-Wdeprecated-declarations]
mandelbrotwidget.cpp:120:41: warning: ‘const QMatrix& QPainter::matrix() const’ is deprecated: Use transform() instead [-Wdeprecated-declarations]

Change-Id: If0afabbc35ef25f127f211c11699011d4ae4ae65
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-06 22:12:23 +00:00
Friedemann Kleint
ca65efb0cc Add deprecation exclusion around deprecated calls in deprecated code
Fix:
io/qdir.cpp:1087:16: warning: ‘static void QResource::addSearchPath(const QString&)’ is deprecated: Use QDir::addSearchPath() instead [-Wdeprecated-declarations]
io/qprocess.cpp:1178:34: warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations]
image/qpixmap.cpp:997:48: warning: ‘static QPixmap QPixmap::grabWidget(QObject*, const QRect&)’ is deprecated: Use QWidget::grab() instead [-Wdeprecated-declarations]
text/qfont.cpp:2218:29: warning: ‘QString QFont::lastResortFamily() const’ is deprecated [-Wdeprecated-declarations]
itemviews/qitemdelegate.cpp:1008:41: warning: ‘static QPixmap* QPixmapCache::find(const QString&)’ is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations]

Change-Id: I51259edc175b1f55f61ded3af50ebfffd8c304a8
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-06 22:12:16 +00:00
Timur Pocheptsov
71a1c66ab9 Feature 'ocsp' - fix a broken win-64 build
Alas, we have to do the job ossl_typ.h failed to - undef macros
coming from wincrypt.h (?) and clashing with identifiers/naming
conventions not exactly very wisely chosen by OpenSSL.

Change-Id: I1725c4f769be64dbb391d040b2c1574b20b65151
Fixes: QTBUG-73322
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-02-06 22:12:10 +00:00
Allan Sandfeld Jensen
0d3b913da7 Switch epilogues of AVX2 conversions to single step
Not only is it fewer instructions but all the logic except for load and
store can be identical to the main loop.

Change-Id: I2caac0c7504d94e404bd8cfe5080aff07ba2d465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-06 22:12:03 +00:00
Friedemann Kleint
a6f25dedd8 Windows style, themes: Fix deprecation warnings
Fix:
qwindowstheme.cpp:287:77: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
qwindowstheme.cpp:336:37: warning: 'const QBrush& QPalette::foreground() const' is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations]
qwindowstheme.cpp:861:102: warning: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations]
qwindowsvistastyle.cpp:635:56: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]
qwindowsvistastyle.cpp:707:60: warning: 'static bool QPixmapCache::find(const QString&, QPixmap&)' is deprecated: Use bool find(const QString &, QPixmap *) instead [-Wdeprecated-declarations]
qwindowsxpstyle.cpp:743:58: warning: 'const QMatrix& QPainter::deviceMatrix() const' is deprecated: Use deviceTransform() instead [-Wdeprecated-declarations]
qwindowsinputcontext.cpp:448:49: warning: 'const QBrush& QPalette::background() const' is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations]

Change-Id: I00a52a27b066caeb135ad4124f71ef3e09beafbf
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-06 22:11:56 +00:00
Gatis Paeglis
27065bdc50 ibus: allow filterEvent() from QWindowSystemEventHandler::sendEvent()
The async mode, which is also default mode will recurs if
QIBusPlatformInputContext::filterEvent() is called from
QWindowSystemEventHandler::sendEvent() callback.

The sync mode works fine without this patch.
Modes can be toggled via IBUS_ENABLE_SYNC_MODE envvar.

Removed redundant #ifndef and renamed one variable to
something more meaningful.

Change-Id: I8773445cef10212464cff09e3a70487fb38ac3fd
Reviewed-by: Takao Fujiwara <takao.fujiwara1@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-06 22:11:49 +00:00
Gatis Paeglis
c0ebec51e3 xcb: respect big-request encoding in max request size
From big-request specification:

"This extension defines a mechanism for extending the length
field beyond 16 bits. If the normal 16-bit length field of the protocol
request is zero, then an additional 32-bit field containing the actual
length (in 4-byte units) is inserted into the request, immediately
following the 16-bit length field."

Meaning that the request requires 4 additional bytes. This patch provides
a convenience API for calculating maximum request data size.

Besides fixing QTBUG-73044, it was also discovered that calculations
for xcb_image_put (in QXcbBackingStoreImage::flushPixmap) were wrong.
The code assumed that xcb_get_maximum_request_length() returns bytes,
but what it actually returns is length which is measured in four-byte
units. This means that we were sending 4x less bytes than allowed by
the protocol. Furthermore, use the actual 'stride' (bytes per line) value
when calculating rows_per_put. The new stride value was introduced
by 760b2929a3, but was not updated in
rows_per_put calculations.

Fixes: QTBUG-73044
Done-with: JiDe Zhang <zccrs@live.com>
Done-with: Mikhail Svetkin <mikhail.svetkin@qt.io>
Change-Id: I06beb6082da3e8bc78225a87603914e796fe5878
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: JiDe Zhang <zccrs@live.com>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-06 22:11:44 +00:00
Christian Ehrlicher
edc455c69b QtWidgets: mark QDialog/QFileDialog functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
 - QDialog::setOrientation()/orientation()
 - QDialog::setExtension()/extension()/showExtension()
 - QFileDialog::setNameFilterDetailsVisible()/isNameFilterDetailsVisible()
 - QFileDialog::setResolveSymlinks()/resolveSymlinks()

Change-Id: Ibbd5b4192ea8ab483d6b2a8dbf9879f29f9ee86d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-06 22:11:38 +00:00
Christian Ehrlicher
d6d33f0b80 QtWidgets: mark obsolete functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
 - QLayout::margin()/setMargin()
 - QComboBox::autoCompletion()/setAutoCompletion()
 - QComboBox::autoCompletionCaseSensitivity()
 - QComboBox::setAutoCompletionCaseSensitivity()
 - QTextStream& operator<<(QTextStream&, const QSplitter&)
 - QTextStream& operator>>(QTextStream&, QSplitter&);

Change-Id: Ic16b36bf647413b5b3ea2d9105981b95370b3178
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-06 22:11:33 +00:00
Christian Ehrlicher
4715ca7bc5 Cleanup QtCore examples
Cleanup QtCore examples:
 - use new signal/slot syntax
 - use 0 instead nullptr
 - remove unneeded includes
 - use initializer lists
 - replace foreach with range-based-for loop

Change-Id: I5581f485fa0e9ccf3f4ce6f643908832bc6959bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-06 22:11:27 +00:00
Michal Klocek
7910dd0a54 Add llvm linker detection to configure
https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01240.html

This is currently only used for webengine, where link time really matters.

New configure options:
* force 'lld'  '-linker lld' or' --linker=lld'
* force 'gold' '-linker gold' or '--linker=gold'
* force 'bfd' '-linker bfd' or '--linker=bfd'

Note before by default gold was always forced (if supported) now default linker
is system default one.

[ChangeLog][Tools][configure & build system] Added --linker=[bfg,lld,gold] configure flag.

Change-Id: Idaa13510da70243c6176b96db846d629cd65c7af
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-02-06 22:11:22 +00:00
Andy Shaw
5133e22ae2 Add support for setting the peer verify name via the QNetwork* classes
This adds functions to QNetworkRequest to be able to set the
peerVerifyName. An overload of connectToHostEncrypted is also added to
have an extra argument to allow setting it directly in this manner too.

Fixes: QTBUG-73125
Change-Id: I371e90035b53a74c9eb3cef64f367e307dce073e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-02-06 22:11:17 +00:00
Karim Pinter
8a7c373f8e QNX QPA: Add support for Qt Virtual Keyboard
If the QT_IM_MODULE environment variable is set, then it loads the
IM module accordingly, otherwise it is using the PPS one, if it is
available.

Task-number: QTBUG-54576
Change-Id: Icb8b474805053d8297029096365783c2cabc2cbc
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
2019-02-06 22:11:11 +00:00
Liang Qi
4c165e6834 Disable Docker-based test servers on macOS temporarily
The coin agent starts to crash after the docker-compose call.

Need to have qt5 5.13 integrated first, then fix the real issue later.

Task-number: QTQAINFRA-2717
Task-number: QTQAINFRA-2750
Change-Id: I3dcd963b1c5cea0b2197f1589398d8a9ed18f46f
Reviewed-by: Aapo Keskimolo <aapo.keskimolo@qt.io>
2019-02-06 22:04:54 +00:00
Andreas Hartmetz
ddb5d39045 QMetaObject::Connection overview documentation improvements
Try to better describe what it is and what it does. Also mention
its strongest use case.

Change-Id: Ib5c3e8a3c9b96169c139c5d7e8995a6a49d7d5e1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-06 10:35:03 +00:00
Edward Welbourne
150c6fb74b Add testlib selftests for double and for non-finite float and double
Tidied up the existing float tests in the process.
(In particular, s/SUCCESS/PASS/ since that matches real test output.)
These verify that QCOMPARE() handles floats and doubles as intended.
Extended the existing qFuzzyCompare tests to probe the boundaries of
the ranges of values of both types, in the process.

Revised the toString<double> that qCompare() uses to give enough
precision to actually show some of the differences being tested there
(12 digits, to match what qFuzzyCompare tests, so as to show different
values rather than, e.g. 1e12 for both expected and actual) and to
give consistent results for infinities and NaN (MinGW had eccentric
versions for these, leading to different output from tests, which thus
failed); did the latter also for toString<float> and fixed stray zeros
in MinGW's exponents (which made a kludge in tst_selftest.cpp
redundant, so I removed that, too).

That's further complicated handling of floating-point types, so let's
just keep an eye on how expensive that's getting by adding a benchmark
test for QTest::toString().  Unfortunately, default settings only get
runs that take modest numbers of milliseconds (some as low as 40)
while increasing this with -minumumvalue 100 or more gets the process
killed - and I'm unable to find out who's doing the killing (it's not
QProcess::kill, ::kill or the QtTest WatchDog, as far as I can tell).
So results are rather noisy; the integral tests exhibit speed-ups by
factors up to 5, and slow-downs by factors up to 100, between runs
with and without this change, which does not affec the integral tests.
The relatively modest slow-downs and speed-ups in the floating point
tests thus seem likely to be happenstance rather than signal.

Change-Id: I4a6bbbab6a43bf14a4089e96238a7c8da2c3127e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-02-06 10:11:22 +00:00
Alexander Volkov
f6edb0ef72 Improve keyboard navigation in QListView when isWrapping is enabled
Search the previous item or the next item in a model instead
of searching them on visual layout. This way the cursor will
not stop at the beginning or at the end of a row or a column.

Fixes: QTBUG-14444
Change-Id: I0ef203a4dcd876e4c50559fb87e61585f07434d1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-06 09:50:58 +00:00
Qt Forward Merge Bot
670b843369 Merge "Merge remote-tracking branch 'origin/5.12.1' into 5.12" into refs/staging/5.12 2019-02-06 10:52:13 +00:00
Qt Forward Merge Bot
e4c29088c8 Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: I486f3c51df4b60fe60b75ba642636a835a75f731
2019-02-06 10:28:01 +01:00
Thiago Macieira
37352b23a9 x86: Disable AVX support on 64-bit MinGW
GCC for 64-bit Windows has a bug that it fails to properly re-align the
stack pointer for use with 256-bit memory addresses (AVX). Therefore,
there's about a 50/50 chance that any function using AVX will have an
improperly-aligned stack. In release mode, stack accesses should be
rare, but in debug mode they happen frequently. Either way, this is a
ticking time bomb, so we disable.

Clang is not affected.
32-bit MinGW is not affected.
64-bit in other OSes with GCC are not affected.

Fixes: QTBUG-73539
Change-Id: Id061f35c088044b69a15fffd1580967808f31671
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-06 08:11:29 +00:00
Boubacar DIENE
b319d14110 Fix "error: too many arguments to function media_get_entity_by_name()"
Since the official v4l-utils-1.12.0 release, media_get_entity_by_name() function expects
only two arguments instead of three as in older versions thus breaking build of eglfs_kms_vsp2
backend.

Cf. https://git.linuxtv.org/v4l-utils.git/tree/utils/media-ctl/mediactl.h#n253

Fixes it by creating an overloaded wrapper function that will choose the right
version based on the signature of the media_get_entity_by_name function pointer
argument.

Fixes: QTBUG-73427
Change-Id: Idab52558b6f2f23137456c21e33ece1ef0e9aa4e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-02-06 07:36:34 +00:00
Kari Oikarinen
eb60877fe9 QWizard: Correctly calculate watermark size hint
If we have have AA_EnableHighDpiScaling on and have loaded a @2x image, layout
calculations can't use the real pixels of the QPixmap directly.

Fixes: QTBUG-73401
Change-Id: I1891411a0e359e0148476f73b6cc3a128893a374
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-02-06 07:19:01 +00:00
Kari Oikarinen
54bcb9d42f Blacklist tst_QGraphicsItem::cursor on WinRT
It is the flaky test causing most failures in qtbase at the moment.

Task-number: QTBUG-73545
Change-Id: Id9c5db27ebd08a4cf3c119d2fada12fdf1a5d2a0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-02-06 07:17:22 +00:00
Joerg Bornemann
8e6231f4eb Fix install targets for generated private headers
Header files of modules that specify generated_privates are usually
not yet available at qmake-time. Thus, the installation rule must not
check for the file's existence.

Change-Id: Ifc7ff95422912d255744c9006382ff181176ae77
Fixes: QTBUG-71340
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-02-06 07:17:46 +00:00
Joerg Bornemann
05bcfb9011 Normalize some SIGNAL/SLOT signatures
...for a minor performance gain.

Change-Id: I4bef867055e069926fdc24fa98a6f94b6a0630e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-02-06 07:17:44 +00:00
Volker Hilsheimer
c66ddd7aba Include relevant example code in documentation of setUrlHandler
By only looking at the function prototype, it's tempting to assume that
the handler needs to be registered with the usual SLOT macro. That is
not the case.

The code snippet is already included in the class description, but it
doesn't hurt to repeat it here.

Change-Id: If24fdca41a4bd976ebd1156c9e1106469388265c
Fixes: QTBUG-50484
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-02-06 04:15:26 +00:00
Eirik Aavitsland
a2b8f891fa Doc: decrease confusion about HSV vs HSL in QColor
The non-qualified hue() and saturation() etc. refers to those values
in the HSV, not HSL, color model. Make this more explicit in the
documentation to avoid confusion.

Task-number: QTBUG-73129
Change-Id: Ief337672966ac72d0d0c3606d8d68acf01ffe7ee
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2019-02-05 22:47:46 +00:00
Eirik Aavitsland
01f090e9e4 Fix QColor::toCmyk() for rgb(0, 0, 0)
We translate all pure gray colors into cmyk having c,m,y=0 and only
the k value expressing the darkness. But a fix introduced to avoid
division by 0 caused rgb(0, 0, 0) to be an exception to this; it ended
up being translated as c,m,y,k=1 instead.

Fix by catching the potential div-by-0 situation earlier and directly
set the orthodox cmyk translation: c,m,y=0,k=1.

Fixes: QTBUG-73171
Change-Id: I3774eaf9d96e096ac5c47c55d28881bea2bd1309
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-05 22:47:33 +00:00
Eirik Aavitsland
66c3a71e91 Painter path stroking: fix capping of beziers ending in tight turns
For some overly tight beziers where the start or end point and the
next control point are closer than the pen width, the stroker's
shifting algorithm will produce a start/end tangent pointing in the
opposite direction from what is expected, for one of the sides. This
would break the square and round capping logic. Fix by detecting the
situation in the capping function and reversing the tangent when
necessary.

Change-Id: I48f4f017403d7b289b0483dd2b3a7ff1bbd0cf2a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-02-05 22:47:16 +00:00
Eirik Aavitsland
e96641d881 Fix xbm image format handler: properly reject invalid files
The read_xbm_header() function is used to check for valid file header,
containing valid width and height values. But in case of an invalid file,
the check could depend on uninitialized variables.

Change-Id: I9f933ed6e38d86109e5b5a8d55fe763ab928d749
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-02-05 22:47:07 +00:00
Allan Sandfeld Jensen
a6aacdd560 Fix convertARGBToARGB32PM_avx2 and convertARGBToRGBA64PM_avx2
The tails was off since f370410097

Fixes: QTBUG-73440
Change-Id: If86178c6cad3f87d9b5f0f89e90354d49cd386a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-05 17:04:25 +00:00
Christian Ehrlicher
93cebb3837 QtWidgets/Graphics-/ItemViews: mark obsolete functions as deprecated
Mark some long obsolete functions as deprecated so the can be removed
with Qt6:
 - QGraphicsItem::matrix()/setMatrix()/resetMatrix()/sceneMatrix()
 - QGraphicsItemAnimation::reset()
 - QGraphicsScene::isSortCacheEnabled()/setSortCacheEnabled()
 - QAbstractItemDelegate::elidedText()
 - QAbstractItemView::setHorizontalStepsPerItem()/horizontalStepsPerItem()
 - QAbstractItemView::setVerticalStepsPerItem()/verticalStepsPerItem()

Change-Id: I7244078552ebeac9dfbcf3291b3ae0c44cc2c1d9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-02-05 16:55:23 +00:00