Commit Graph

28631 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2f68d08be0 move xcb 1.5 compile check from qpa/xcb-syslibs to qpa/xcb
the test should be executed in every case. configure's use of pkg-config
implies that intention.

Change-Id: I722c88da5c2a0f2cc1f926d796093b78cd79bea8
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2016-06-03 10:27:01 +00:00
Laszlo Agocs
0a8d3f914c evdev: Stop reading on ENODEV
Touch does this correctly for some time already. Keyboard and mouse do not, leading
to flooding the console with the Could not read from ... warning for ever when using
the 'static' device discovery (no libudev) and unplugging a mouse or keyboard.

Change-Id: I6bef44fbed4bc21cc2736b28d1166bf2b7d90edc
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-06-03 10:18:28 +00:00
Volker Krause
3726aed788 Add Q_FLAG for QDBusServiceWatcher::WatchMode.
This is needed for generic property access to work correctly.

Change-Id: I76613ace730985001fc5fe1bb1b3fa5c6a8bdf70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-03 09:57:55 +00:00
Leena Miettinen
06f7f3fd36 Doc: Describe QMAKE_EXTENSION_STATICLIB in qmake Manual
Task-number: QTBUG-44176
Change-Id: I6f7ad50793b05585ba661cbe187d7619a36cafe5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-03 09:52:21 +00:00
BogDan Vatra
492cfe7002 Android: remove unused plugins
These plugins can't be used on Android, but they are built, installed
and also bundled into every .apk file.

Change-Id: I3326c913282af5bd43e1c732de9ae2f255711414
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
2016-06-03 09:47:09 +00:00
Giulio Camuffo
ec4eb4db61 Install some eglfsdeviceintegration headers, as a private module
This allows external integrations to be developed against it.
Also uniforms all class names as QEglFSFoo.

Change-Id: I72ff37c0fcdf1ccd37110b4c36874d6c99b2e743
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-03 09:19:05 +00:00
Friedemann Kleint
6a75daa99f QMessageBox::aboutQt(): Remove LGPL 2.1.
Licenses have changed in 5.7.

Change-Id: Ib3801ef878f292e68b22ee89e036bb30cc79d186
Task-number: QTBUG-53791
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-06-03 09:07:39 +00:00
Anton Kudryavtsev
86b612d037 QXmlStreamWriter: don't call virtual QTextCodec::name() twice
Just cache and reuse result.

Change-Id: I2ada2eced7c272c041013d35b59eeb176ed04659
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-03 08:38:26 +00:00
Thiago Macieira
3ec57107ce Windows: stop using _beginthreadex on regular builds
This commit also reverts fecaa6aae8.

The Microsoft documentation says _beginthreadex and _endthreadex are
used to initialize the C/C++ runtime and are necessary when linking to
libcmt(d).lib (that is, when using the -MT or -MTd options). For regular
builds linking against the .dll runtime, there should be no impact.
Inspection of the CRT source code which gets installed with Visual
Studio or Windows SDK proves that.

It's preferable to use CreateThread directly as _endthreadex will try to
call FreeLibraryAndExitThread, which can cause a deadlock if we try to
wait for the thread to exit from a global destructor.

For -MT builds, since there can be no DLLs, it's not a problem to
continue to use _beginthreadex and follow Microsoft's recommendation.

Task-number: QTBUG-53031
Change-Id: Id5480807d25e49e78b79ffff144af62c3c59dfe0
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-02 22:16:47 +00:00
Jake Petroules
49e49bdbe1 Remove reliance on QSysInfo::[Mac|Windows]Version in QSysInfo itself.
Those enumerations and their associates are being deprecated,
and so the backing of their replacements cannot rely on it.

Change-Id: Id544aa757313065f435b5e66cd0475975cd5b825
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-02 22:16:27 +00:00
Thiago Macieira
3b3ca5dead tst_QObject: Test if the new connect style works with virtual bases
Change-Id: I87e17314d8b24ae983b1fffd1453abe1e395bbd1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-06-02 20:52:56 +00:00
Thiago Macieira
7b8a553a13 Remove the code for QObject::connect for non-C++11 compilers
It's required now in Qt 5.7 (at least the required features of rvalue
references and variadic templates)

Change-Id: I87e17314d8b24ae983b1fffd145364c52f9bb6c3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-06-02 20:52:53 +00:00
Anton Kudryavtsev
84bd6a83a0 QTextDocument: use QString::replace() for replacing
... instead of homebrew algorithm.
Saves some memory allocations and some text size.

Change-Id: I3abb49d3b247dbb132688ea99e6eae731e31615c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-02 17:20:44 +00:00
Anton Kudryavtsev
f046205526 QTextDocument: use QL1S::size() to get size of internal string
... instead of call of qstrlen(), because of ctor of QL1S
already do this work for us. The old code is Qt4 legacy.

Change-Id: I449ce7ea481af0efeade258d2cd5652db1f1a8b1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-06-02 17:20:05 +00:00
Friedemann Kleint
740470457e Simplify constructor code of QTemporaryFile.
Pass the name as parameter to the constructor of QTemporaryFilePrivate
and use delegation in the convenience constructors.

Change-Id: I4087600b804fe22910b4985a59a02547f54a6acd
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-02 12:58:26 +00:00
Anton Kudryavtsev
6030e63037 QtGui: use QStringRef to optimize memory allocation
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.

Create QString from QStringRef only where necessary.

Change-Id: Id83c60cc7568b20ef008b51c582cfdf466a47e35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-02 12:57:42 +00:00
Milla Pohjanheimo
abe32df864 Blacklisting pendingCallWhenDisconnected on OpenSUSE 42.1
We need to get QtWayland in the CI asap, and that's why we need to
blacklist every test that fails in the CI without really looking what's
the problem behind it. Sorry for that!

Task-number: QTBUG-53786
Change-Id: I64102c35ad879df07a692a112163f318ffb2f658
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2016-06-02 10:12:50 +00:00
Anton Kudryavtsev
90988a2c67 QFontDatabase: append substitutes directly to the family list
Don't create tmp list.

Change-Id: I1aa80f1fb5589eb01ad2a41cf028b920a618a636
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-02 09:44:24 +00:00
Joerg Bornemann
5803a9ba57 Remove Windows CE vestiges
Remove every usage of the _WIN32_WCE macro outside of 3rd party
source code directories.

Change-Id: Ia7e859bd6dcaef10c66674612c8e440f9a2dee56
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-02 08:03:37 +00:00
Liang Qi
688f70634c Merge remote-tracking branch 'origin/5.6.1' into 5.6
This merge also blacklists a flaky tst_QGL::clipTest test on
OpenSUSE 13.1.

Conflicts:
	src/network/socket/qnativesocketengine_winrt.cpp
	tests/auto/opengl/qgl/BLACKLIST

Task-number: QTBUG-53133
Change-Id: I14b431aa5a189b7dd1d3e2dfff767d15df20fde3
2016-06-02 06:01:25 +02:00
Thiago Macieira
e81877218b Revert "QObject::connect: reduce generated code size for statics and functors"
This reverts commit 2e4191eadc. The change
is backwards compatible but not forwards, so it can't appear past the .0
release.

Change-Id: I390c5e80795a9b3b27f6edcab79f7892a79c3564
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-06-01 23:41:31 +00:00
Marc Mutz
bbb440bab2 QJsonValue: fix use-after-free in assignment operator
The assignment operator of a String QJsonValue that holds
the only remaining reference to the QString::Data block
was freeing the block before obtaining its own reference,
leading to a use-after-free in the case where *this was
passed as 'other' (self-assignment).

Fixed by reformulating the assignment operator in terms
of the copy ctor, using the copy-swap idiom, with the
twist that QJsonValue doesn't, yet, have a swap member
function, so we use three per-member qSwap()s.

Change-Id: I3c5ccc4d9f32c7593af3fc6a0edbf12b7feb1391
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-06-01 20:59:16 +00:00
Volker Krause
9fdeaf602e Add Q_ENUM for QNetworkAccessManager::NetworkAccessibility.
This is needed for generic property access to work correctly.

Change-Id: I88cd40238a8caf8df6c71b22e2fa0c4d5655a88a
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-01 14:22:24 +00:00
Alexandru Croitor
a1de7c40f4 Blacklist tst_QOpenGLWidget::stackWidgetOpaqueChildIsVisible test.
It fails randomly on Windows, possibly due to timing issues.

Change-Id: I0ef74f203455eb4ea8aeee4c8fc9bf1fbf6fb8ff
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-06-01 11:17:31 +00:00
Ralf Nolden
0720569b15 OpenBSD: add /etc/ssl as cert dir
Add the /etc/ssl default path to the list of certificate directories for OpenBSD.


Change-Id: I13dff6a219e2c848501ec9bf191160a48f919515
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-06-01 10:36:01 +00:00
Ralf Nolden
9dd58c6239 Compile fix: OpenBSD does not have <arpa/nameser_compat.h>
Fix compiling under OpenBSD by using Q_OS_OPENBSD define for missing
include file and adding required typedef. Obtained from OpenBSD ports
patches for qt-5.5.1 at
http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/x11/qt5/patches/

Change-Id: Ide223bffb6b116e8341d0eb39329af4d7a0be6a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-01 10:35:54 +00:00
Ralf Nolden
d96057328a Compile fix: add OpenBSD define for ffsll usage
On OpenBSD, ffsll needs to be defined to compile. This is the
same change as in commit 725a9c2702
for NetBSD.

Change-Id: I3060caa10950a9419084a12de8c88a2f98b34d07
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-01 10:35:48 +00:00
Ralf Nolden
3432742caa Merge BSD implementations of QLockFilePrivate::processNameByPid()
Until now, several solutions for the implementations of
processNameByPid() on BSD systems existed:
- one for FreeBSD using libutil through kinfo_getproc()
  using sysctl() implicitly
- one for GNU/kFreeBSD using sysctl() explicitly added in commit
  a8f4fa217d

OpenBSD and NetBSD also had different approaches in their ports patches
using kvm() and sysctl(). The code unifies this for all BSDs using
sysctl().

Change-Id: Iced9ef01e5966d8688f464f51024a7ed562e26a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2016-06-01 10:35:39 +00:00
Eskil Abrahamsen Blomfeldt
8fb29ed259 Don't alter input string in QTextLayout with ShowLineAndParagraphSeparators
When ShowLineAndParagraphSeparators was set, we would replace the
separator character in the user's string in some cases, since we never
detached from the input string and just const_cast the pointer to the
shared buffer.

[ChangeLog][QtGui][Text] Fixed bug where a QTextLayout with
ShowLineAndParagraphSeparators would modify the layout's input
string.

Task-number: QTBUG-42033
Change-Id: I92f9100b750f16e52b38b718245c13e5c4a0ebb9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-06-01 10:04:02 +00:00
Anton Kudryavtsev
a24b90a21c Gui: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.

Change-Id: I88d08d499e1be72c1f6d983fecdcee513df18aa2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-06-01 09:35:29 +00:00
Milla Pohjanheimo
d11abc8bd7 Blacklisting a flaky tst_QGL::clipTest test on OpenSUSE 13.1
Based on discussion with Laszlo, we are blacklisting this test.

Task-number: QTBUG-53133
Change-Id: I08a5192ebcefd7b093c79872e0dfaddb794cab57
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-06-01 04:36:54 +00:00
Andy Nichols
58408ffa1b Add install target to mac widget examples
Change-Id: I524ba3fcc82a6ef015241d90f212059ae7772443
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-01 02:30:45 +00:00
Morten Johan Sørvig
0b401d74e6 Platformsupport: Don't include dbus on darwin.
This created a false dependency from the cocoa platform
plugin to QtDBus, which caused macdeployqt to deploy
it.

This change is for libplatformsupport only, and has
no effect on QtDBus usage in general.

Change-Id: I35f342574a6497ff88a785e93eef1acdea8b1452
Task-number: QTBUG-48015
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-01 02:30:27 +00:00
Jake Petroules
7cbafa8de7 Call a function in the MySQL configure test to make sure it links.
This fixes a problem where the configure test may produce a false
positive on iOS if a copy of libmysql for OS X is located, due to the
fact that linking to a dynamic library of a different architecture than
expected is not (yet) an error.

Change-Id: Id41765f49e31d9c9c3becc3436ff5a69b160b8e0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-01 02:30:03 +00:00
Jake Petroules
a160bd4fcc Fix bugs causing Thin font weights to be ignored or mishandled.
Task-number: QTBUG-53196
Change-Id: If12b3cab3d8de5e0e452fca844b0a484c29e9e86
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-06-01 02:29:51 +00:00
Thiago Macieira
2e4191eadc QObject::connect: reduce generated code size for statics and functors
Instead of placing the assignment of false in the impl() function, move
it to the inline QSlotObjectBase::compare() function. That means it's
assigned in one place (two, actually, inside qobject.cpp), instead of
for every static member, non-member or functor we connect or disconnect.

Change-Id: I87e17314d8b24ae983b1fffd1453623ad4c4dcb2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-05-31 19:40:03 +00:00
Lars Knoll
f08da97186 Get rid of dead code
QMAKE_SWITCHES (dead/broken since d1c10615e, 2012) and QMAKE_VARS
(dead since 389f8b039, 2006) were set, but never used in configure.
SUPPORTED was defined but never used since 018aff49cd (2003).

Removed dead command line arguments -depths (qws-related, dead since
f220f99a6d), -arch, -host-arch (both 921e5193), and -qconfig (710ec5ca).

Change-Id: I6bbed56c538cdd74b68432e7fd1e51177f79cc85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-31 19:15:32 +00:00
Lars Knoll
f35560ff12 Remove -audio-backend command line option
This option hasn't done anything for quite some time, let's
get rid of it.

Change-Id: Ic6f2830aaf69ba2d054ce21f0d144a61ddf5d06b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-31 19:15:19 +00:00
Lars Knoll
d54b77d554 Remove some dead code
Remove a code path for a hpux inside a MINGW section when doing the
opengl detection.

Change-Id: I20b8f7948cd663ec3d6c9dcb891f6fe9a2c9c358
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-05-31 19:15:12 +00:00
Olivier Goffart
375c5a0076 Properly forward-declare the Apple types with Q_QDOC
They are needed for the header to be parsed properly with clang based qdoc.

While we are at it, change the condition from Q_OS_MAC to Q_OS_DARWIN

Change-Id: I2a2f9c1159f47795d9811023d67c86fec1866846
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-05-31 17:20:56 +00:00
Erik Verbruggen
e70324f8dd Remove _bit_scan_{forward,reverse}
Use qCountTrailingZeroBits and qCountLeadingZeroBits from qalgorithms.h
instead. Also extended these versions for MSVC. The _bit_scan_* versions
stem from a time before the glorious days of qalgorithms.h. A big
advantage is that these functions can be used on all platforms.

Change-Id: I5a1b886371520310a7fe16e617635ea335046beb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-05-31 12:09:52 +00:00
Maurice Kalinowski
bb30da895e winrt: fix compilation without drag and drop support
Change-Id: Ifd0d2238e8dacffe34753d95e12cccfd13519c55
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-31 11:54:08 +00:00
Maurice Kalinowski
e8ff3c8cbc winrt: fix drag pixmap support
Previously dragging only displayed the type of operation provided by the
system. Now, in case a pixmap is specified, an image is shown.

Also incorporated some cleanups.

Task-number: QTBUG-50827
Change-Id: I471e2081eabfed014b08d189538d1d62cdb7248e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-31 11:54:03 +00:00
Maurice Kalinowski
94f319a2bb winrt: enable drag support
Allow applications to initiate drag operations.

Task-number: QTBUG-50827
Change-Id: I3c29b54756af1af24544f49803305f0c95d8b7f9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-31 11:53:59 +00:00
Maurice Kalinowski
0ff45fbf1b winrt: Enable drop support
Allow Qt applications to receive drops. Dragging is not supported yet
and will be handled in a separate commit.

Task-number: QTBUG-50827
Change-Id: I684e3d5685ce73f74805691f6ac7bbc45e2d19ec
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-05-31 11:53:46 +00:00
Friedemann Kleint
ed08e3be34 tst_QPlainTextEdit/tst_QTextEdit: Do not output unprintable characters.
The test selectWordsFromStringsContainingSeparators() duplicated
in boths tests caused tab and Nbsp characters to be output to the
log, which upsets editors.
Use an array of ushort instead of a wasteful QStringList and
output the hex codes for the unprintable characters.

Change-Id: I08724268f376b4c0da492b4109570e44f7d4a3fb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-05-31 11:46:36 +00:00
Lars Knoll
f7e29f07ff Generate correct output for doubleconversion support in qconfig.pri
Setting doubleconversion if Qt is configured with -no-doubleconversion
doesn't make sense. This also brings the output of configure and
configure.exe in line with each other.

Change-Id: I8424cc45b1b69fdb0d074e76868e83544cf5eb38
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-05-31 11:45:19 +00:00
Ralf Nolden
a9bef62ec2 Compile fix for OpenBSD using Q_OS_OPENBSD defines
OpenBSD does not have EPROTO and LLINDEX.. LLINDEX is only a macro
pointing at sdl_index so use the FreeBSD macro from <net/if_dl.h> as a
a workaround.

Change-Id: Ic3ccecc1b671bb28d14da83ba915ec3fcad2657d
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-05-31 11:39:42 +00:00
Edward Welbourne
28db26f691 qtestcase: Fix buffer over-run, '\0' appended beyond buffer end
Noticed by Coverity (CID 161673).  If the file being read contains
enough to fill the buffer, read() shall do that and return the nbytes
it was passed; as this was the size of the buffer, subsequently
writing a '\0' at this index in buffer is out of bounds.  Fortunately,
/proc/self/status is typically < 1k so fits well inside the 2k buffer.
All the same, we can safely pass sizeof(buffer) - 1 as nbytes and *be
sure* of not getting a buffer over-run.

Change-Id: Ib620a330fbc94f0579c953737f7c4417ca449968
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-05-31 11:37:01 +00:00
Friedemann Kleint
eb50193136 QDialog::adjustPosition(): Manually set target screen before moving.
QDialog::adjustPosition() can move the dialog across screens. A call to
QWindow::resize() later in the show sequence might then see the wrong scaling
factor if the screen changed notification is still stuck in an event queue.
Prevent that by setting the target screen early on.

Task-number: QTBUG-52735
Change-Id: I17bb3490b660f8f17c36524457cb87adbb7851e9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-05-31 11:27:31 +00:00