Enumeration QSysInfo::MacVersion uses a macro to define
enumeration values. QDoc gets confused about it and
prints a lot of warnings.
Adding the macro to ignored directives does not resolve
the documentation issue completely (enum values still
show up as '?'), but it gets rid of the warnings.
Task-number: QTBUG-43810
Change-Id: Ie4009646a78c62b5f1860d29855d3941e79d9388
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
User gets compiler warnings for plugins if "-Wold-style-cast" is enabled
Change-Id: I142ae2676ca7690c8e8e10c73a4007e85d8f448d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
X server may send RROutputChangeNotify event with null crtc and mode,
when it switches an output mode. Request RROutputInfo to distinguish
this case from the case when the output is explicitly disabled.
Change-Id: I4c2356ec71dbcc8013009ea8a6f46dd11f19d6bb
Task-number: QTBUG-44158
Task-number: QTBUG-46786
Task-number: QTBUG-46822
Reviewed-by: Daniel Vrátil <dvratil@redhat.com>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
On my system, this fixes the misbehavior of Qt applications when the (only) active screen is
switched, e.g. from an external screen to the laptop.
This behavior is caused by the screen() of widgets to be set to NULL when their screen goes away.
When a new screen comes online, the widgets *should* be told about it, but they are not. The only
place that "maybeSetScreen" is called is when an existing screen changes its geometry, but not
when a screen gets enabled without its geometry being affected in any way (e.g. because it was
just disabled via xrandr, but has been connected all along). This makes sure that "maybeSetScreen"
is also called when a screen gets enabled.
Task-number: QTBUG-47041
Change-Id: Ic72d6beaa544bf9a4efdbea0830b1bc0d6ce5362
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
LGPLv3 refers to it but does not include it in its body.
Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The "open source" version it's talking about is that of Darwin, not of
Qt.
Change-Id: Ib306f8f647014b399b87ffff13f27bc651d78707
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Dirk Hohndel <dirk@hohndel.org>
This fixes a crash when using the style for painting without a
corresponding widget.
Change-Id: I0742e4559ed7a78270dab3a1b0162c9617343053
Reviewed-by: André Klitzing <aklitzing@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Set QFileDevice::WriteUser on all files extracted from resources. These
are read-only, which is preserved by QFile::copy(). This caused the
deletion of the temporary directory to fail on Windows.
Change-Id: Id99de9160471c38bcec68025c89cfabbe209bdbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
This makes the docs match the code from qsystemdetection.h.
Change-Id: Iec75e24d13e21f1800777bac5fa98b47b47e6001
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Check for special return value INFINITE (unsigned -1) of
GetCaretBlinkTime() (indicating cursor should not flash)
and return 0 in that case.
Change-Id: Iead41a20a68b79d04b03f77a3caf063d4e1d577e
Task-number: QTBUG-47208
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Previously Qt didn't register an English name alias for application font
files under Windows. Suppose we add an application font file using
QFontDatabase::addApplicationFont(), the font family name returned by
QFontDatabase::applicationFontFamilies() then was the English name of the
font file, but the corresponding font family name returned by
QFontDatabase::families() was the localized version. This prevented us
from using the English font family to access the font since it was not
registered as alias.
Add an overload of populateFamily() which will register the English name
of the application font file as alias.
Task-number: QTBUG-47096
Change-Id: Idb89b7d8a419646c209426e826e7fd1ebee49662
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
There's no __HLE__ macro and there won't be, since the HLE prefix can be
run on older CPUs. There's no need for runtime detection.
Change-Id: Ib306f8f647014b399b87ffff13f1daba0e654b02
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We can't have too many braces: one pair is just enough because we're
actually calling the QBasicAtomicInt's constructor. That is, we're using
the uniform initialization procedure.
Required for Clang 3.7:
qmetatype.h:1772:46: error: braces around scalar initializer [-Werror,-Wbraced-scalar-init]
static QBasicAtomicInt metatype_id = Q_BASIC_ATOMIC_INITIALIZER(0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qatomic_cxx11.h:331:43: note: expanded from macro 'Q_BASIC_ATOMIC_INITIALIZER'
#define Q_BASIC_ATOMIC_INITIALIZER(a) { {a} }
^~~
Change-Id: Ib306f8f647014b399b87ffff13f1f2db1fabe393
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
_Nullable is a language extension in clang 3.7 (indicating whether or
not a pointer can be null).
http://clang.llvm.org/docs/AttributeReference.html#nullable
Using it as a class name breaks building with this compiler.
Change-Id: I0c838dac872ca2c00bf57c95df17d24edb48007b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Because the MS standard library headers won't have the necessary
constexpr markings, some types that should be literal (like std::atomic)
aren't and some functions that should be constexpr (like
std::numeric_limits:max()) aren't.
Change-Id: Ib306f8f647014b399b87ffff13f1c74093b11af1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
If you're running Qt under valgrind, it stands to reason that you know
what you're doing.
In particular, Valgrind does support AVX and AVX2 instructions, but some
versions seem to be missing the necessary CPUID bits.
Change-Id: I9a75ad8521ae4e5cbbe5ffff13d1940f6fa5c4f4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Otherwise, if I open tests/auto/dbus/dbus.pro in Qt Creator, it shows me
"test", "test2", "test3", "test4" and it's very hard to know which test
is which.
Change-Id: Iee8cbc07c4434ce9b560ffff13d0654696c025b7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
I'm getting an error with WSARecvFrom in nativeBytesAvailable() and I
don't know why. The number of bytes obtained is correct and the test
works for 2 bytes, so let's use that.
The Windows nativeBytesAvailable() function has a comment saying that
WSAIoctl sometimes indicates 1 byte available when there's a pending
error notification, so that function proceeds to do a WSARecvFrom to
peek the number of bytes. Somehow that function in this test is getting
a SOCKET_ERROR I can't explain.
Change-Id: Ic5b19e556e572a72a9df9a405b1fee3b7efb8b24
Reviewed-by: Richard J. Moore <rich@kde.org>
This mapping has to be done manually, like we do on Windows
for example.
libinput maps through xkbcommon, like xcb, so it is already correct.
Task-number: QTBUG-46845
Change-Id: I61f3f1160e2581aae2ef43cc260f191f6d344fec
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
On Windows, having read-only files in a directory can cause removal
to fail. When file deletion fails, check on the permissions, set
write permissions and retry.
Split apart code paths by OS in tst_QDir::removeRecursivelyFailure();
deletion of the read-only directory on UNIX should still fail.
Change-Id: I36e54be5229a7b552e90fd5f42722b868fa0b6ee
Reviewed-by: David Faure <david.faure@kdab.com>
The test showed failures on OS X:
FAIL! : tst_QListView::batchedMode() Compared values are not the same
Actual (ba.size()): 2
Expected (3) : 3
Loc: [tst_qlistview.cpp(848)]
Use QTRY_COMPARE() to count the number of visible indexes with
a helper function instead of using hard-coded timeouts. Item 3
appears with a little delay on OS X.
Change-Id: I2fb2ff5ebdf9dbe85bdc79401375ad6f47b7b12b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Right now the two functions being added are just wrappers, but this will
allow us in the future to support FreeBSD and Linux's system calls that
do the equivalent of forkfd, but have slightly different semantics in
the actual getting of the information from the file descriptor.
See-Also: https://lkml.org/lkml/2015/3/12/1044
See-Also: http://www.freebsd.org/cgi/man.cgi?query=pdfork
Change-Id: Ia0aac2f09e9245339951ffff13c94acb5f4ff204
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Commit 5bf67f5f41 did it for qobject.cpp,
but I missed qwidget.cpp (I hadn't realized the test existed there too).
Change-Id: Ib056b47dde3341ef9a52ffff13eeceafcfc64893
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The Intel compiler's compilervars.bat also puts the MSVC compiler in
PATH, so cl.exe was always being found first.
Change-Id: I72e524da10fb0e221c4530a3e5c1a4a347c3f878
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Otherwise the information is missing from configure's output summary:
EGLFS ................ no
EGLFS i.MX6....... .
EGLFS KMS .......... no
EGLFS Mali .........
EGLFS Raspberry Pi .
EGLFS X11 .......... no
Change-Id: Iee8cbc07c4434ce9b560ffff13cb331778c70261
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The test checks whether a child window receives
mouse events synthesizes from touch. Enlarge the child
window so that it fully covers the parent and move the
touch point a bit inside so that it is not affected
by window manager positioning issues.
Use QTRY_VERIFY.
FAIL! : tst_QApplication::touchEventPropagation() 'widget.seenMouseEvent' returned FALSE. ()
Loc: [/work/build/qt/qtbase/tests/auto/widgets/kernel/qapplication/tst_qapplication.cpp(2107)]
Change-Id: Ic08e68b1e547cc7148cd8994464fdc2a14ac507b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The test sends touch events to the root item at the top left
corner which fails if the views starts to scroll.
Make the view sufficiently large to prevent scrolling and align
at top left.
FAIL! : tst_QTouchEvent::touchBeginWithGraphicsWidget() Compared values are not the same
Actual (((root->touchBeginCounter))): 0
Expected (1) : 1
Loc: [/work/build/qt/qtbase/tests/auto/gui/kernel/qtouchevent/tst_qtouchevent.cpp(1471)]
Change-Id: I357322ccc809ddb5cb587febf3c75cbe497e59d8
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Commit ffcad3244f did that for the GCC-
compat mode, but I forgot the MSVC one.
Change-Id: Ib1d49f003062638b4e27e5ead4554e25f539c373
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Like on OS X and Linux, ICC uses the native compiler's standard library
headers, so the C++11 features that depend on headers need special
attention.
* <initializer_list> is missing with MSVC 2012. It is present on 2010
for some reason and it appears to work
* ICC disables Unicode string support prior to MSVC 2015, probably
because MSVC Standard Library headers have a typedef for char16_t
std::nullptr and std::move should have come with MSVC 2010, but I'm not
keeping compatibility with MSVC 2008. It's been deprecated since ICC
14.0 (Composer XE 2013 SP1, released in 2013) and support was removed in
15.0 (Composer XE 2015, released in 2014). ICC hasn't supported MSVC
2005 since ICC 13.0 (Composer XE 2013).
Task-number: QTBUG-47119
Change-Id: Ib306f8f647014b399b87ffff13f139174aeeafff
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
An object that throws in its constructor cannot be reentered. This
violates both C++11 and C++98. It's also a regression from MSVC 2013.
The unit test is renamed to indicate what it really does, as opposed to
a misleading name that was probably a "thinko" on my part.
Task-number: QTBUG-47224
Change-Id: Ib306f8f647014b399b87ffff13f132436d0578ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Define both qHash() and operator==() outside of the class, like
it is already done for operator!=(). Defining it inside the
class limits it to argument-dependent lookup, which in turn
means that the lookup rules for operator!= and operator==
were slightly different (e.g. if one would compare variables
of a type that is implicitly convertible to QSslEllipticCurve).
As a side-effect, this also fixes a qdoc warning.
Change-Id: I40ab2f8cd2b6b5f42481dd254229a88b678f3f15
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Any function using the non-dsa helpers and glTextureParameterf() would
crash as this code path failed to initialize the function pointers.
Task-number: QTBUG-47133
Change-Id: I8970c9693ec471a96b135ae5728ab6407ee06a6f
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This improves SecureTransport logging consistency:
- include error code in SSL error when a native backend call fails
- use qt.network.ssl category for debug / warning messages
- do not use duplicate qWarning when error is already reported via QSslError
Change-Id: I52d457b11f0cef2cc3579305e457663b61b92f3f
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
We use menus to implement the ComboBox popup in QtQuick Controls,
and therefore, all the items are actual menu items. If that's the
case, we can skip the new style background.
Task-number: QTBUG-47084
Change-Id: If46ebf8115b36f45b4b5e6068ddc0d61afe307b8
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
The ldrexd and strexd instructions require 64-bit alignment, but Clang
for iOS aligns those types on 32-bit boundaries inside structures. We
can't use Q_ALIGNOF because it returns the alignment for the type inside
a structure.
Task-number: QTBUG-46949
Change-Id: Ib056b47dde3341ef9a52ffff13ef17bede0846f2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Commit 5d366f7e was not correct. The time displayed would always be the
same (the start time of the application).
[ChangeLog][QtCore][Logging framework] Fixed a bug that would cause a
"%{time boot}" field in the logging framework's pattern to always
display the same value, instead of the time since boot.
Change-Id: I255870833a024a36adf6ffff13ecb1dca4a688ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Somehow the const int is no longer understood to be an immediate. GCC
4.8 still compiles this fine.
qstring.cpp:316:34: error: the fifth argument must be an 8-bit immediate
Change-Id: Ib056b47dde3341ef9a52ffff13ef24d541833abc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>