Commit Graph

38523 Commits

Author SHA1 Message Date
Ryan Chu
4b1b9ad7b0 Enable path conversion from Windows-style to Unix-style on Windows
COMPOSE_CONVERT_WINDOWS_PATHS is supported by Docker and available
for you to configure the docker-compose command-line behavior. It
enables path conversion from Windows-style to Unix-style in volume
definitions. Users of Docker Machine and Docker Toolbox on Windows
should always set this to true.

Change-Id: Ib59756ad68482fdd889ce39ab1ab0118b5fc9071
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-24 15:42:47 +00:00
Mårten Nordheim
fe1907435d tst_qsslsocket: Make an ALPN test available to other backends
Currently only available for the OpenSSL backend to use but doesn't
actually rely on anything OpenSSL specific.

Move it so it can be used by the Schannel backend in an upcoming patch

Change-Id: Ia29b153bf3f29cff0d62a41ec5dd7d4671a18095
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-24 15:24:23 +00:00
Mårten Nordheim
58c9c4b609 Ssl: Add support for IP-address in alternate subject name
While it's not common it still occurs, perhaps especially with 127.0.0.1

Can be tested by attempting to connect to https://1.1.1.1/ using Qt.

Change-Id: Idad56476597ab570b8347236ff700fa66ab5b1f4
Fixes: QTBUG-71828
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-24 15:24:14 +00:00
Johan Klokkhammer Helsing
589a01ff6b QMimeData: Prefer UTF-8 when multiple charsets are available
This was especially a problem on Wayland where both "text/plain" (us-ascii) and
"text/plain;charset=utf-8" are typically available. I.e. we would prefer ascii
over utf-8, losing special characters.

Fixes: QTBUG-54786
Change-Id: I985f66e16fcd5125e800c86c4d3949d210e939ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-01-23 20:56:35 +00:00
Andy Shaw
461ef575bc Always escape the table names when creating the SQL statement
Since some databases are case sensitive if part of the query is quoted,
then we should ensure that all instances of the table name are escaped
unless the test is delibrately testing the non-escaped case.

As a result, this commit also removes some expected failures pertaining
to PostgreSQL and also adds an entry to the list of tables being dropped
when a test is finished.

[ChangeLog][Sql][PostgreSQL] QSqlDatabase is now stricter about table
names when used with record() and primaryIndex(). If the tablename was
not quoted when it was created, then the table name passed to record()
and primaryIndex() needs to be in lower case so that PostgreSQL is
able to find it.

Fixes: QTBUG-65788
Change-Id: Id1f54cb66b761c39edf858501b730ede7eec1fd3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-23 20:07:09 +00:00
Christian Ehrlicher
7c69f6171d QFile/QFileInfo: mark readLink() as deprecated
QFile/QFileInfo::readLink() functions are obsolete but were not marked
as deprecated.
Explicit mark them as deprecated so they can be removed with Qt6.

Change-Id: I52424dc5441e1f5b01015713df990bbec5186caa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-23 18:49:15 +00:00
Christian Ehrlicher
5eab68bbee QProcess: mark obsolete functions as deprecated
QProcess::finished(int)/readChannelMode()/setReadChannelMode() are
obsolete but were not marked as deprecated.
Explicit mark them as deprecated so they can be removed with Qt6.

Change-Id: Iedbfd80a3c987f35caf93181e9277913a18961d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-01-23 18:49:12 +00:00
Christian Ehrlicher
7bebdb472a QDrag: mark QDrag::start() as deprecated
QDrag::start() is deprecated since Qt4. Therefore annotate it with
Q_DEPRECATED so it can be removed in Qt6.

Change-Id: I5b82c482fa579f357cc67e38b86e6fe587f18ded
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-01-23 18:49:08 +00:00
Christian Ehrlicher
34e4a8ef6d Cleanup Widgets examples - foreach
Cleanup the Widgets examples - replace foreach with range-based for loop
in the remaining directories

Change-Id: I321e6c0f414401a1ae4fb65762b97d894b725afa
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
2019-01-23 18:49:05 +00:00
Christian Ehrlicher
26f7edb09e Cleanup Widgets examples - foreach
Cleanup the Widgets examples - replace foreach with range-based for loop
in graphicsview subdirectory

Change-Id: I9093b3ae89d73d0b860d29929943881c90074bce
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-23 18:49:02 +00:00
Christian Ehrlicher
bce32c8ab8 Cleanup Widgets examples - foreach
Cleanup the Widgets examples - replace foreach with range-based for loop
in mainwindows and painting subdirectories

Change-Id: I3c1556dffd22e29dd0a5ba960e699291c496278a
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-01-23 18:48:59 +00:00
Christian Ehrlicher
770b4afeed QtCore: mark obsolete functions as deprecated
Mark the following obsolete functions as deprecated so they can be
removed with Qt6:
 - QDataStream::unsetDevice()
 - QDir &QDir::operator=(const QString &path)
 - QDir::addResourceSearchPath()
 - QResource::addSearchPath()
 - QResource::searchPaths()
 - QSettings::setSystemIniPath()
 - QSettings::setUserIniPath()

Change-Id: I5edfb2b4ce1ad843fa5fcd5b4c475ab9352b05f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-23 18:48:56 +00:00
Thiago Macieira
612e4c5233 Use VPMASKMOV in the epilogue ARGB->ARGB{32,64} AVX2 epilogues
Instead of stepping down to 4 pixels, then 2 px, then 1, with
essentially the same code, let's use maskload and maskstore to only load
and store the effective portions (instructions new in AVX2). The
secondary loop gets run at most twice, since there can be at most 7
pixels left.

This fixes an off-by-4 bug in the previous implementation (lines 1041
and 1186 should have had 7 instead of 3).

Change-Id: I4d4dadb709f1482fa8ccfffd157862e77ac508f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-23 17:53:01 +00:00
Friedemann Kleint
07580a8d7b uic: Fix broken icon code generation
Change b86d0b6215 rearranged the
sequence of function calls when generating code adding QTabWidget
and QToolBox pages, not taking into account that the iconCall()
has a side effect (writing out icon definition) Revert that part
and add a comment.

Fixes: QTBUG-72980
Task-number: PYSIDE-797
Change-Id: Ie8fbaa36f21cd4408fb1f491195da5c260708e6c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-23 17:06:59 +00:00
Timur Pocheptsov
e649c4143e Add class QOcspResponse, providing a bit more details
about why a certificate was revoked (if it was) and the responder's
certificate, if we managed to verify a signature, as was previously
shortly discussed in the 'OCSP stapling' patch-set. Auto-test update
will be in a separate patch.

[ChangeLog][QtNetwork][Ssl] Added class QOcspResponse as a part of
 OCSP stapling support.

Change-Id: I4e17fb6fc4c3dae0b8ad04ff2897a4823736d16e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-23 17:02:40 +00:00
Tor Arne Vestbø
237c3972fd Allow more fine grained control over QFlags debug output
Useful in contexts such as other QDebug operators, where the class
is already known, and the full scope of the flags is not needed.

Change-Id: I546381b1722c9c846e2412e56763563b8f625212
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-23 16:12:52 +00:00
Tor Arne Vestbø
25fc90e48b Allow more fine grained control over QMetaEnum debug output
Useful in contexts such as other QDebug operators, where the class
is already known, and the full scope of the enum is not needed.

Change-Id: Ibd04b1fd4f0f914c7224a007fc248d4ebabcde3e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-23 16:12:50 +00:00
Tor Arne Vestbø
a1ad9b590b Add convenience enum for QDebug's verbosity levels
Change-Id: I9b7ad39c64d4b5787ce59db91b9ddadb82646e31
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-23 16:12:44 +00:00
Tor Arne Vestbø
0d65c71a19 Add QDebug convenience for changing the verbosity level
qDebug().nospace().verbosity(3) << myObj;

Change-Id: Idea3094294d1afbff302e472e47a55a01d3b7735
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-23 16:12:38 +00:00
Ryan Chu
4e55d8b50b Remove useless fall-back network interface of Dante-server
Setting the fall-back network interface of danted's environment to eth0
by docker-compose file is redundant because the value of danted's
configuration (danted.conf) has been set to eth0 by default.

Change-Id: If2dea8daaf851577a573e201e9c50684916e5206
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-23 15:29:05 +00:00
Ryan Chu
ae2a0344a3 Fix QNetworkReply ServiceUnavailableError in macOS
For macOS and Windows, the test-server containers are deployed in the
VirtualBox (Boot2Docker). Because Boot2Docker is a lightweight Linux
distribution made specifically to run Docker containers, it doesn't
install avahi-daemon and support mDNS discovery.

To resolve this problem, Docker compose file supports "extra_hosts" to
add hostname mappings inside containers.

BFAIL items:
tst_QNetworkReply::headFromHttp(...+proxy...) (ten cases)
tst_QNetworkReply::ioGetWithManyProxies(http-on-http)
tst_QNetworkReply::ioGetWithManyProxies(http-on-http2)
tst_QNetworkReply::ioGetWithManyProxies(http-on-multiple-http)
tst_QNetworkReply::ioGetWithManyProxies(http-on-http+socks)
tst_QNetworkReply::ioGetWithManyProxies(http-on-ftp+http+socks)
tst_QNetworkReply::ioPostToHttpFromSocket(...+proxy) (twelve cases)
tst_QNetworkReply::ioPostToHttpFromSocket(...+proxyauth) (ten cases)

Change-Id: Iec55966a9b5f191b7446985a15b49a8b09dcf407
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-23 15:28:59 +00:00
Ryan Chu
bcaf67258f Use environment variables to replace the hard-code value of domain name
Docker compose file supports variable substitution. When running
docker-compose up, Compose looks for the environment variables from
shell and substitutes the values at runtime.

Change-Id: I5255ead82276fac7db24ee74af453f83ca20bbe6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-23 15:28:51 +00:00
Ryan Chu
beab266977 Docker-based test servers for network-related Qt autotests on Windows
There is no docker bridge on Windows. Docker document recommends using
port mapping to connect to a container. The problem is that it causes a
port conflict if the user is running a service that binds the same port
on the host. This change applies the same solution of macOS to deploy
the docker environment into VirtualBox and use the host network option.

Task-number: QTQAINFRA-2294
Change-Id: Iedcb8daa39373f02adb59f02eae2775f02870c54
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-23 15:28:45 +00:00
Ryan Chu
4552eddabf Extend the default retry times of QtNetworkSettings::verifyConnection
Apparently, it is not enough to just retry 10 times (10 seconds) in the
CI network. It happens from time to time that a test fails due to server
port is unreachable. Especially, the docker containers are running in a
virtual machine on Windows and macOS platforms. In such cases, it needs
more time to warm up the service depending on the system loading.

Change-Id: Ia0234bff2a82988b62f451e20b50671708784008
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-23 15:28:33 +00:00
Eskil Abrahamsen Blomfeldt
e0dc6dce22 Android: Set minimum supported version to android-21
With the current distribution, this is 90% of active devices, and
it was released in 2014. Qt 5.12 is LTS and will continue to support
older Android versions for a long time to come.

This is to reduce the testing needed on outdated platforms and
allow ourselves to use some newer APIs unconditionally in Qt.
Android 21 was chosen because it is the minimum version that supports
64 bit builds.

[ChangeLog][Android] Increased the minimum supported Android version
to Android 5.0 (API level 21).

Fixes: QTBUG-70508
Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-23 15:21:56 +00:00
Christian Ehrlicher
aa32510430 Cleanup Widgets examples - nullptr
Cleanup the widgets examples - replace 0 with nullptr

Change-Id: Id4bf119b9a41f6d10117f3a613a6e604128fa196
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-01-23 15:13:45 +00:00
Christian Ehrlicher
c590aa678d Cleanup SimpleTreeModel example
Cleanup the SimpleTreeModel example:
 - include own headers first
 - use nullptr
 - add sanity checks

Change-Id: If57d608e3919368b2022ff86aede8de9c2ba7369
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2019-01-23 15:13:41 +00:00
Mårten Nordheim
7cc6f78dd4 Schannel support
Adds support for Schannel, an SSL backend for Windows, as an
alternative to OpenSSL.

[ChangeLog][QtNetwork][Ssl] Added support for Schannel on Desktop
Windows. To build Qt with Schannel support use '-schannel' during
configure.

Task-number: QTBUG-62637
Change-Id: Ic4fb8ed3657dab994f9f4a4ac5cbddc7001a0a46
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-01-22 15:19:48 +00:00
Albert Astals Cid
e0567d137d Add QStringList::indexOf/lastIndexOf for QStringView and QLatin1String
Change-Id: I42eac69c1f7ab88441d464b9d325139defe32b03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-22 15:07:29 +00:00
Mårten Nordheim
503ff495aa Update manual qsslsocket test to use HTTP/2 instead of spdy
Some of the spdy/3 tests don't pass anymore because those services
no longer support spdy/3. Solve this by updating it to HTTP/2 (h2).

Change-Id: Ib3ef6109b75f4298fed15c1c7922deca35459df9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-22 09:45:41 +00:00
Timur Pocheptsov
77b969cb84 OCSP - simplify feature test
Make it more like feature 'dtls' test.

Change-Id: I29f5e9337d99440015431a8cfb001f5fb28e1c5f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-22 09:43:27 +00:00
Qt Forward Merge Bot
f94ca82e0f Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf

Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
2019-01-21 13:03:09 +01:00
Christian Ehrlicher
b1092a7d42 tst_QPrinter: stabilize qprinter test
The CreationDate entry in the two PDF files can potentially
be different depending on when the test is run.
97b4c5a574 already accounts for it but
the current tag for creation date is '/CreationDate'. Therefore check
if the line contains 'CreationDate' instead.

Change-Id: I1fc069cf935bba07084ac4a0743ff05312374d10
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-20 13:39:54 +00:00
Christian Ehrlicher
9d2923c1b0 tst_QString: fix localeAwareCompare() when using ICU
tst_QString::localeAwareCompare() is failing since
ab448f731e because the 'C' locale no
longer initializes ICU and falls back to simple QString comparison.
Fix it by explicitly setting the locale for the testdata to en_US so the
QCollator is properly initialized.

Task-number: QTBUG-73116
Change-Id: I9d4d55e666c5c52f93298dedb7e22da01a25318d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-01-20 13:39:45 +00:00
Vyacheslav Koscheev
83aa70f0ca Android: fix NPE on m_editPopupMenu
Change-Id: Id6d4aea91d621194cf85f604b1b9acdc916bede1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-01-17 03:19:17 +00:00
Christian Ehrlicher
ccfd6872ba QSqlRelationalDelegate: compile with QT_NO_CAST_FROM_BYTEARRAY
QSqlRelationalDelegate::setEditorData() does not compile when
QT_NO_CAST_FROM_BYTEARRAY is defined. Since it's a public header this
will break user code.
Fix it by calling QByteArray::data() instead of relying on the
implicit cast.

Fixes: QTBUG-72764
Change-Id: I9c111dd25f48c9c9780d9f9a5b6b75eed0c8d6ed
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-16 19:16:42 +00:00
Edward Welbourne
a53500f5bf Eliminate some stray misleading paths from expected output files
The output files for the tuplediagnostics selftest of testlib had a
stray non-canoical path fragment in them; so replaced with its
canonical form.

Change-Id: Ib421380036c3fb1b91447eb8c87be4ad0dfe5c96
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 18:47:41 +00:00
Ryan Chu
fe29a6a6eb Fix the timing issue of vsftpd during boot (probably invalid config)
This appears to be a timing issue of vsftpd's initial script
(/etc/init.d/vsftpd). When starting the vsftpd service, the script uses
a while loop to make sure that the vsftpd process has been created with
the expected PID. The problem is that it should sleep if it can't grep
the same PID via ps command.

while [ ${n} -le 5 ]
do
    _PID="$(if [ -e ...vsftpd.pid ]; then cat ...vsftpd.pid; fi)"
    if ! ps -C vsftpd | grep -qs "${_PID}"
        then
            break
    fi
    sleep 1
    n=$(( $n + 1 ))
done

if ! ps -C vsftpd | grep -qs "${_PID}"
then
    log_warning_msg "vsftpd failed - probably invalid config."
    exit 1
fi

However, synchronization based on time is not working in general. This
change will rewrite the while loop to an infinite loop and remove the
exclamation symbol (!) from the if condition.

Upgrading the version of vsftpd is not helpful here because
vsftpd_3.0.3-11 (Ubuntu 18.10) didn't resolve it yet.

Change-Id: I07382709c33bd9bab61fcea76ab7deca5f630084
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-16 18:24:01 +00:00
André Klitzing
5d8b01468e Update bundled libpng to version 1.6.36
The remaining diff to clean 1.6.36 is archived in the qtpatches.diff file.

[ChangeLog][Third-Party Code] libpng was updated to version 1.6.36

Change-Id: Ia9d20c5abca115d509ed0aaf9eebfc85a88bef1d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-01-16 15:15:25 +00:00
Mårten Nordheim
61af5abb33 clang-cl: use GCC -m CPU feature flag option
To enable non-default options

Change-Id: I2d2f5dc8368a8235fd91e7f9986df4402612a823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-01-16 14:23:50 +00:00
Mårten Nordheim
8e500e15fa tst_qsyntaxhighlighter: fix no-op QTRY_VERIFY check
The bool is assigned on the previous line: QTRY_VERIFY will not do
anything because the statement is already true.

Change-Id: I067290e19ffd100819b2b631af431c6013623a00
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 14:23:42 +00:00
Mårten Nordheim
f8f0f3eef1 QSyntaxHighlighter: cancel delayed highlight if done manually
It was an implicit effect before which stopped working after
dec7961709. Reintroduce it as some
projects used this side-effect as a way to abort the initial
highlighting.

Change-Id: I5340ee9882a242bc8b5f7f843f1cfe793a65d357
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-01-16 14:23:37 +00:00
Joerg Bornemann
fa2821b484 Add the command line option --no-strip to androiddeployqt
There are certain use cases for keeping debug information on the
device, for example collecting stack traces when the app crashes.

[ChangeLog][Android] Added the --no-strip command line option to
androiddeployqt.

Change-Id: I96574c2c57d85fb23d5fc65380e471fa892b6543
Fixes: QTBUG-57771
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-16 07:39:04 +00:00
Friedemann Kleint
b782004149 Fix multiple emission of QGuiApplication::lastWindowClosed() when native child widgets are used
Run the handling in QWindowPrivate::maybeQuitOnLastWindowClosed()
for top level windows only.

Fixes: QTBUG-73061
Change-Id: I74deb50b06a64e8ef0e438d2abf14888f778a46e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-01-16 07:16:43 +00:00
Timur Pocheptsov
8961493b40 QMacStyle - take into account that native controls are transparent now
We use NSButton to emulate tabs in QTabWidget. Starting from 10.14
in dark theme those button objects tend to be somewhat transparent,
thus widget's frame is visible through tab buttons. This is true for
native controls also - NSButton, NSSegmentedControl, NSTabView - they
all show the similar behavior. The only difference is NSTabView, which
is the closest control to our QTabWidget - tab buttons are transparent,
but they (AppKit) it would appear just do not draw the frame under
this area. Let's do the same, but using clipping.

Task-number: QTBUG-71741
Change-Id: I9f19014d0db5f36bacf76ee0068fae6eee793c0f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-16 06:20:02 +00:00
Ryan Chu
2c875efa99 Support debug_and_release option (which is the default under Windows)
When debug_and_release option is in use, qmake will generate one
mata-Makefile and two additional leaf Makefile (Makefile.Debug and
Makefile.Release). In such case, testserver.pri will be included in all
three passes. The problem is that the mata-Mafile is used to invoke leaf
Mafile recursively. The docker test server should only be integrated in
the leaf Makefile.

To resolve this problem, this change uses "!build_pass" condition to
determine whether this is a pass of meta-Makefile, and then skip it.

Change-Id: Ibc48d657680e089ebaa1bc356b87eb4cfd9f4580
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-15 23:40:13 +00:00
Thiago Macieira
f7a7a49f92 Fix the AVX2 ARGB->ARGB64 conversion code
Commit c8c5ff19de introduced the solution
as a simple scaling up of the code in qdrawhelper_sse4.cpp, but it's bad
due to the way that the 256-bit unpack instructions work: the unpack-low
instruction unpacks the lower half of each half of the 256-bit register.
So we fix it up by inserting a permute4x64 that swaps the middle two
quarters of the 256-bit register (permute8x32 requires a __m256i
parameter, instead of an immediate).

This introduces an instruction that costs 3 cycles in each loop, but
since the AVX2 code has double the throughput compared to SSE4 code, it
should still be faster.

This problem does not affect the ARGB->ARGB32 code because that repacks
at the end.

Change-Id: I4d4dadb709f1482fa8ccfffd1578620b45166a4f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-01-15 21:52:46 +00:00
Michael Brasser
a7fa2618e4 Update QOpenGLTexture::generateMipMaps for ES 3
Per the Khronos documentation, this operation is not permitted on ES 3.

Change-Id: Iff70ef83d48228277b883df588011432ba80f4bd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-01-15 19:39:41 +00:00
Oliver Wolff
eabef55b8b testlib: Add missing header files to .pro file
With all the headers missing, Creator's clang code model just gives up and
it's impossible to work on testlib in Creator.

Change-Id: I8814264db10992eeec6f45625580f6788d23b56b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-01-15 14:41:08 +00:00
Tor Arne Vestbø
1b47e7154a Fix default rpath dirs on Apple platforms
The @executable_path relative framework directory is one step below
the executable, as in:

   Foo.app/Contents/Frameworks

not:

  Foo.app/Contents/MacOS/Frameworks

The former is what Xcode defaults to for new projects.

Change-Id: Id08f3f1d80f1c84d76fb71676c5df4a3a6b3da36
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-01-15 14:26:29 +00:00