Another compile fix when compiling qt with -stdc++ c++98 option. Replace
nullptr with Q_NULLPTR.
Change-Id: I7765905031fa91250dbbcc9768b9e8b109e7594d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move the Q_ALWAYS_INLINE and forcing of __builtin_memcpy to the existing
functions.
Change-Id: Icaa7fb2a490246bda156ffff143c137e520eea79
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This is an improvement of e4f71b0c. By using the QImageReader::read()
overload taking a QImage pointer, and ignoring the return value,
one could still end up with a corrupt QImage object.
Avoid the subsequent crashes by closing that hole.
Change-Id: I5dca10e4808ac3365e3ddba6689edecb7444948f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Small adjustment to a76d709. Instead of removing the selection
handles immediately when an object loses focus, we choose to
animate them out the same way we do when we lose selection.
We do this by setting the handle visibility to false, which will
trigger the fade-out animation. Then we wait a for the animation
to finish before we remove and delete them fully.
Change-Id: Iaa93969af086000d9e1cf8a39bd12c6a8b70c89e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
By changing the system proxies option default to being on, we
set it to be the more natural default setting. This is down
to the fact that people tend to assume that this is already
the default option.
[ChangeLog][Important Behavior Changes][QtNetwork] Proxies from
system settings will now be used by default. Configure with
-no-system-proxies to disable.
Change-Id: Iec5bbde9dff1311ce44418f6aa024bda05388cf6
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Peter Hartmann <peter-qt@hartmann.tk>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
- QCocoaWindow::setContentView calls -removeFromSuperView
and this is not valid for a view that is a content view for a NSWindow:
using it will release the view but not clear the window.contentView pointer.
Set contentView to nil instead.
Fixing this makes visible the second problem:
- QNSWindowHelper in its -handleWindowEvent: can access content view and assumes
it's QNSView - it is not always guaranteed and can result in invalid message
sent to a view, we can use m_qtView instead (it will be nil if it
has a type different from QNSView, the call will be noop then).
Task-number: QTBUG-53325
Change-Id: I0472eba8165a04b6a3f81b2171b3bb9827ff5681
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Coverity, CIDs 159312-159335, the same pattern:
if (ptr)
ptr->refs.deref();
Q_ASSERT(ptr->reds.load());
Coverity does not like (and rightfully so) potentially invalid (null)
pointer inside Q_ASSERT. Move Q_ASSERT into if-controlled block-statement.
Somehow these CIDs were skipped in the previous similar pass/fix.
Change-Id: I56f92d964ec0b59a7fdff066fa7231ddd71fd0d3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
On OpenBSD, <sys/select.h> isn't included in <sys/types.h>, so that
leads to compile errors on files that include qcore_unix_p.h:
qcore_unix_p.h:335:69: error: 'fd_set' has not been declared
Just move the whole select include section from qcore_unix.cpp, no
functional changes.
The patch is adapted from OpenBSD ports maintainer Vadim Zhukov
<persgray@gmail.com> patch for qt ports.
Change-Id: I35ba693440b1c1644bcfcdb69823e2b37870ad97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
To fix a compile warning under non-Linux systems, declare
framebufferDevice in q_refreshRateFromFb() as Q_UNUSED like in the other
functions.
Change-Id: I31a4e788f07d27d3cff7f6ea7fd82813a7acc7d9
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
In particular, make sure the word BLACKLIST appears in it so it can
actually be *found*. Mention the comment format, mention version
suffixes, mention negation; expand and clarify the description.
Break it up into paragraphs for ease of reading.
Corrected the example to use osx, not its old platform name. Gave it
a comment that I wish I'd found in the BLACKLIST file that obliged me
to come looking for this in the first place. Illustrated the use of
comments to document reasons for ignoring tests.
Change-Id: I78d49b4706c0f70b714f7a410f850fb42ebb77c0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Also check the version is non-empty.
Probably makes no difference, but it's obviously more correct.
Change-Id: I05eee5623ac432d2ea02f7aad874513beeb2ceeb
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
We were looking up distro and version, in order to conditionally add
them to keywords if missing, on every keyword line of each BLACKLIST
that we parsed. In particular, this meant the static holding the list
of keywords couldn't be const. Move the distro-handling to an
intemediary function that adds to the raw keywords and supplies
one-off initialization for the list of conditions to match.
Change-Id: Ia383ec060e24b7f72d2c8fd6ae65816318daafd0
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
A recent fix now makes
authenticationCacheAfterCancel(http+socksauth)
work again, so un-blacklist it.
Added a helpful comment while I was at it.
Change-Id: I2d7eae8d80c12957d22659a82e5072301735c41f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
If the return value is less than 0 which signifies an error then trying
to malloc that will cause an exception.
Change-Id: Ia0153d4cb7aac1dacb509280b45be149a093b7c4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
just like $$member(), but operates on a string value rather than a list
variable. it is the swiss army knife of cutting, providing equivalents
of left(), right(), mid() and reverse() all in one.
[ChangeLog][qmake] Added $$str_member() function.
Change-Id: I7c7c6c971db402fff41b428d32a4451f45400728
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
this is strlen(), but the name is matched to $$size(), just namespaced
to reflect that it operates on a string value rather than a list
variable.
[ChangeLog][qmake] Added $$str_size() function.
Change-Id: I56c8b863da244e66bd283257a66b197aa73b0e57
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
amazing how we managed to do without it for so long. ^^
the name is intentionally somewhat obscure to avoid clashes, and some
namespacing is good anyway.
[ChangeLog][qmake] Added $$num_add() function.
Change-Id: Ib7648b1f425ef096a87b51f158d0f1409e5c4daa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
while implementing stacks and queues was possible before with the help
of $$member(), these functions make it much more straight-forward.
[ChangeLog][qmake] Added $$take_first() and $$take_last() functions.
Change-Id: I4922a5331780e468a42c663c9ad3c6456a95a6bf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
It's there and it's more efficient anyway.
Change-Id: Ie9fd7afe060b4e4a8052fffd144fc40647430268
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
POSIX.1-2001 allows quoting a zone name so that it can contain other
characters besides letters, by enclosing it in angle brackets ('<' and
'>'). This hadn't been used until recently (tzdata2016b), when the
Asia/Barnaul rule started using a zone name "+07" (the name variable
contained the value "<+07>-7").
Thanks to Paul Eggert for reporting and investigating the root cause.
Task-number: QTBUG-53071
Change-Id: Id5480807d25e49e78b79ffff1449bc410776cb66
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
There is nothing guaranteeing there will be a paint request after
resizeViewportFramebuffer() is called. However we must not be left
with a framebuffer with uninitialized content. So trigger an update.
Include also a half-hearted autotest. QOpenGLWidget (or QGLWidget)
viewports have not been autotested at all. Try to verify that it
is functional at least, even if we cannot check the actual output.
Change-Id: I34d78fe32e94c39dad919216b5a4f4bb2aea3cc2
Task-number: QTBUG-52419
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This reverts commit 4579d966af.
This causes a miscompilation with ICC 16 on Windows (MSVC 2015 ABI): the
vector created by new[] with () in:
mutexes(new QAtomicPointer<QMutex>[size]()), // (): zero-initialize
does not actually zero-initialize (see disassembly in the bug
report). This is definitely a compiler bug.
Since we plan on removing QMutexPool in Qt 5.8 anyway, let's just revert
the patch.
Task-number: QTBUG-53360
Change-Id: I06bae9392f534e45b3f1ffff144e823b747e7962
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This fixes a long-standing issue for Qt packages, where the
paths detected at configure time do not necessarily match the
paths on the user's machine. Hence they have been stripped
manually from qconfig.pri so far, preventing moc from resolving
some includes.
The same logic in configure is left alone for the time being,
since the paths there are also used to filter paths returned
by pg_config and mysql_config. I expect that this will
eventually be removed too in a bigger refactoring going on
right now in dev.
Asking the compiler for implicit paths only works for non-msvc
builds - that is, gcc, clang and icc fortunately have a
compatible way to retrieve the paths. MSVC works
solely on environment variables, which will be taken into
account by a separate patch.
[ChangeLog][qmake] The implicit compiler directories that
moc needs for resolving include files are now determined
when qmake runs. So far QMAKE_DEFAULT_INCDIR was determined
at configure time, which might be wrong for relocated
installations.
Task-number: QTBUG-52687
Change-Id: If0706e8c56a5aca2b6e777e79e90342c498726f3
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
The test was half-ported from Qt 4 and #ifdefed out depending
on WINVER. When it became active, it failed since it queries the window
handle too early in the process.
Move the code sending the message into showEvent() to ensure a window
handle exists and parent the listview properly to prevent a leaking
toplevel.
Change-Id: I74aa9ddfd0e88dd31e9258400fc3e473b6e0d92e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Set the error mode flag SEM_NOOPENFILEERRORBOX when calling Win32 API
SHGetFileInfo() to prevent it from prompting to insert media
as does QStorageInfoPrivate::mountedVolumes().
Task-number: QTBUG-32457
Task-number: QTBUG-48823
Change-Id: I01a2f99b5a75b39dd729509ca319f634e3dcd695
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
A cast is not a conversion. If the value is not already a string type
we are just getting an empty string for all metatypes that can be
converted to string.
Change-Id: I4643cc9fd509c21568fdc2133403c3ed8cb38a10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
we have perfectly good overloads which work with ProString itself, or
at least with QStringRef.
Change-Id: I45f39b8c2f83216f20849dd58eb3b8d78726083d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this also saves some of the cheap but ugly toQString() calls.
Change-Id: Iebe644986501db3878306521c76e4ba2c2fb97b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
the only place where this actually saves a deep copy is the evaluation
of if(), but as a side effect the parser is now able to deal with not
null-terminated strings, which is kinda nice as well.
Change-Id: Ib6d08617aa79d2f9eaecd4906d4d548f34bf377d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
saves some more cheap but pointless conversions to QString.
this makes the introduction of the ProStringList::contains(QStringRef)
overload necessary.
Change-Id: Ic61993bd9a4b28fbba1b8e346345fd5f5636c6f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
this introduces an ambiguity, so some char* arguments need explicit
QString construction now.
Change-Id: Ic3919a1fa9419bbb3b57dd1aa7eb95643ee59e53
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
it ends up in QtGui via two different routes (freetype and the png
handler), and we really don't want to have two copies of it in there.
Change-Id: I40760bcb6c615b90ed9f402450bb657c77884613
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
We need to be careful about calling textDidChange on the input
delegate, since that will reset the internal IM state in UIKit
and stop any ongoing text composition or spell checking.
For that reason we set m_inSendEventToFocusObject to true whenever
we send an IM event to Qt, to not call the abovementioned method when
callbacks from UIKit is the reason for changing the text.
But until now we never applied the same protection for key events.
This lead to ligatures not working correctly (e.g when using Korean
IM), since UIKit composes ligatures by first selecting the characters
that can be truncated, then do a deleteBackwards, then insert the ligature.
And deleteBackwards leads us to send backspace key events, which
ends up in a textDidChange call, which confuses UIKit.
This patch will ensure we don't call textDidChange as a result of
sending key events.
Task-number: QTBUG-52486
Change-Id: Ida268edae517f55a5b5f975340a5d3821f7b8f52
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
In order to avoid loading and checking all fonts on the system when
the string contains a line separator, we blacklisted it in
98a23b974509bd1b6d9459e6c79677bdcbaa0108 in Qt 4. The same logic
applies for paragraph separators, line feeds and carriage returns.
Task-number: QTBUG-51934
Change-Id: I121dce17a8ac79b5b790e24c6596438e501e871a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Adds overloaded functions for some common operations used for
compositing, and use those together with specialized loading/storing.
QRgba64 is represented as a quint64, so most of the time it lives in
the integer registers. By overloading functions to return SIMD data
types, the temporary values are kept in SIMD registers (so no more
unnecessary transfers between the registers, which can cost a lot on
ARM). It also allows the compiler to do better TBAA and optimizations.
Another benefit is that the loop bodies are smaller, giving them a
higher chance to fit in the micro-op cache of modern CPUs.
Change-Id: I5f13cd0677176b1162425fe59d42868d0d20f6e2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Profiling QIconLoader::findIconHelper() shows that a significant portion of CPU time is being spent in
QDir::exists(), which creates a new QFileInfo object for the sole purpose of determining whether the passed-in
file path is relative or absolute, and then calls QFile::exists(). In this context, we can just as easily
generate the absolute path and call QFile::exists() directly, avoiding the creation of extra QDir and QFileInfo
objects.
Change-Id: Ib0b4568b6c16d423eb6c1b15158e44ff141e6175
Task-number: QTBUG-46767
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Just leave it to the attached debugger to do it.
Change-Id: I65f2676cccec2a074ea31cb8739e1b3fb626a5da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
If applicationDisplayName has not been set, the signal is emitted when
applicationNameChanged() is emitted.
[ChangeLog][QtGui][General] Add
QGuiApplication::applicationDisplayNameChanged() signal.
Task-number: QTBUG-53076
Change-Id: I18494ad90bd8dec3f79ef5175a3a85e776560fd0
Reviewed-by: David Faure <david.faure@kdab.com>
We only track left and right mouse buttons when dragging. But
some applications may do this with other mouse buttons.
In this case, instead of tracking which button was pressed and
which one was released, we just ask Cocoa for the current state.
Change-Id: I0df7799b7ae6d7816377f881bc0ede867737d245
Task-number: QTBUG-53374
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
While dealing with Coverity's CID 11424 ('missing initializer'), it was
recommended (by Marc, thanks) to get rid of Command's default ctor,
since it's apparently not needed at all (replacing QVector with std::vector also).
Change-Id: Ibe9d2789c67431a9810feb7db4fa1bce0b61921c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Qt XML parser doesn't like these comments and it breakes QtCreator's manifest editor
Task-number: QTCREATORBUG-16139
Change-Id: I6459926b32c39eb6d1ee8a9b5a5ade9b6f72924a
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
I'm not sure how one of my machines has this problem and the other
doesn't (same distribution and same compiler version). Must be operator
error. But this is required to compile QtGui when QtCore was compiled in
LTO mode.
qversiontagging.cpp used to be built with -fno-lto before commit
629ceec208. This commit restores that
functionality, but not the clang "-no-integrated-as" part.
Change-Id: Ie9fd7afe060b4e4a8052fffd144fb9c1a1166854
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
We can't depend on the application/library ignoring the signal for us,
so we do it. O_NOSIGPIPE exists on the BSDs and I'll add it to Linux. If
it isn't supported, then we need to ignore SIGPIPE globally.
Change-Id: I25d85d86649448d5b2b3fffd1450f6afeaea8b18
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>