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>
QTemporaryFileEngine does not store the pattern, so it needs to get it
again from QTemporaryFilePrivate prior to reopening the file. It's
possible to lose the pattern when remove() is called on the object.
Task-number: QTBUG-46156
Change-Id: I66a35ce5f88941f29aa6ffff13dfc7f83d4fa3a2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: David Faure <david.faure@kdab.com>
I can't find the function for NetBSD and OpenBSD. There's a good chance
QtCore simply fails to compile.
Change-Id: Ib056b47dde3341ef9a52ffff13efaff642bd7bb9
Link: http://www.freebsd.org/cgi/man.cgi?query=kinfo_getproc
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[OS X] Mangle the event handle related calls on QNSApplication, so that
the events are passed through the correct QApplications when several
Qt5's with different namespaces do UI in the same process.
Change-Id: Ibb44246fbcf4a2bc3af5a93c48db0382a1380328
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Return true from isArgvModified() when __argv is null (as is the
case when using wmain()) indicating arguments are modified.
Task-number: QTBUG-47023
Task-number: QTBUG-30330
Change-Id: I44329ed3369cd4db79ba1b7c19303895f67b1616
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently when the remote server disconnects gracefully (for example upon
returning an HTTP request with Connection: close) the call to SSLRead
will return errSSLCloseGraceful which is incorrectly reported as
QAbstractSocket::SslInternalError.
This patch aligns the behavior with that of the OpenSSL backend and instead
reports QAbstractSocket::RemoteHostClosedError.
Change-Id: I8c6679280ac0c6fbd71d5f0d29b25f692eca5b24
Task-number: QTBUG-47154
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
GIMP asks for image data in PNG format when doing a "paste" which
was previously handled only in convertToMime(). Add handling
to convertFromMime() and register format.
Task-number: QTBUG-46848
Change-Id: Ib11de27d301c8632869c7276e421e48e4f34e1d0
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>