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>
Consistently use setErrorAndEmit to emit errorOccurred and the
deprecated error signal.
Change-Id: I8bc7634a72d4d13f74bbf76547de08271dfcbb59
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
In German layout, "Ctrl+]" is "Ctrl+AltGr+9".
Task-number: QTBUG-51848
Change-Id: I8c05c13a4d46c0818ce4f56ce476c5310a677af2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Avoid unnecessary allocations.
Create QString from QStringRef only where necessary.
Change-Id: I8f2a7dce51430162c84328e23ab3cc071227d6ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The previous definition of signals does not need to be "public". It may
have been something else.
Change-Id: Id69569111e7d4e619e22ffff144b4855e6acdbef
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
it's used outside qtbase (by qtimageformats), so this is needed for
modular builds to work.
Change-Id: I3dffa76178502894bd063af366bd9a74be3b316a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Whenever a regular QWidget contains a child render-to-texture widget
(like a QOpenGLWidget) that is opaque (attribute
Qt::WA_OpaquePaintEvent is set) and completely covers the parent
geometry, the child widget would not be shown.
This happens because QWidgetBackingStore::doSync contains a check to
see if an opaque child completely covers its parent, in which case it
does not draw the parent, and only draws the child.
This is an issue if the widget is actually a texture-based one, because
for it to be seen on screen, the parent widget has to be redrawn with a
proper blending mask, so that the rtt widget gets properly composed
into the place where the mask is.
The fix consists in keeping the parent widget being marked dirty, in case
it has an opaque texture-based child that completely covers it. This will
force a redraw of the parent widget with a proper blending mask.
Change-Id: If1feec04b86bff2c49158b8d72f175cec252dea1
Task-number: QTBUG-52123
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
The _q_queueBytesWritten signal may be already queued from the event loop
at the time when stop() is called. We do not want to emit signals once
stopped, so reset all respective state variables.
Change-Id: I343e1702955e0bbc1d11930d19e75dab6e129b4c
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Always reset the drop indicator position and rect when drag action will
be finished. This can prevent drawing the indicator in bad place when
the next drag will be performed.
Task-number: QTBUG-53541
Change-Id: I420207a0ede6f19f48472a8f0f723afe948de1c6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
NetBSD (pkgsrc) ports are building qt on Interix as well, where the
necessary defines are missing for in qsystemdetection.h.
Patch for adding them provided by NetBSD ports maintainer
Kamil Rytarowski <n54@gmx.com>
Change-Id: I769c47f623317efda3130a7061307e84d3350fac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Without this, the newly-added screen will still have the
scaleFactorProperty unset, which means QScreen::devicePixelRatio will
return 1.0. That differs from what happens if the screen had been
detected when the application started.
This is part of the fix for the bug report, but insufficient.
Task-number: QTBUG-53500
Change-Id: Id3aab65533904562a6cbfffd14502365d86bd36d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
...if a PMF connection had already happened. Since UniqueConnection
isn't implemented for non-PMFs (functors and lambdas aren't comparable,
even if static member functions or non-member functions are), we pass a
null pointer for comparison argument. The disconnect() code already
protected against a null pointer there, but not the connect code path
with Qt::UniqueConnection
Change-Id: I87e17314d8b24ae983b1fffd145324beced0494d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Dario Freddi <dario.freddi@ispirata.com>
It's inline, but the compiler did not inline it properly from Objective
C++ sources.
Undefined symbols for architecture x86_64:
"__Z18qt_getQtMetaObjectv", referenced from:
__ZN2Qt20qt_getEnumMetaObjectENS_15ScrollBarPolicyE in qlocale_mac.o
...
Change-Id: Ie9fd7afe060b4e4a8052fffd144fda60c50a9779
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
platformsupport/fontdatabases/fontdatabases.pri disables all font
databases except CoreText on OS X, so this is required for
linking. Otherwise, we get undefined reference linker errors:
Undefined symbols for architecture x86_64:
"vtable for QBasicFontDatabase", referenced from:
QMinimalIntegration::fontDatabase() const in
qminimalintegration.o
Change-Id: I31298e973803b4d6eedbf61607056114d1556584
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
When a process that locked a lockfile crashes on Windows, sometimes
a new instance of the process fails to lock.
Unfortunately, I can't find a way to reproduce the problem consistently,
but it happens from time to time with Qt Creator and Qbs.
There are several ways to detect a dead process on Windows. Some of
them can be found in stackoverflow[1].
The current implementation of stale lock detection is based on the
second answer (using WaitForSingleObject), but apparently it doesn't
work in 100% of the cases.
The most voted answer[2] (using GetProcessExitCode) proves to work also
on this case.
[1] http://stackoverflow.com/q/1591342/764870
[2] http://stackoverflow.com/a/1591379/764870
Task-number: QTBUG-53392
Change-Id: Ied7bf00985d0f12e833b887a0143f7bdeee3e772
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If the compiler supports C++11 alignof, let's use it. No point in
perpetuating the use of __alignof__ or __alignof.
There's a fallback implementation in qglobal.h that works even without
compiler extensions. We can't drop it just yet (alignas is not a
required C++11 feature), but at this point I doubt that fallback is used
anywhere anymore.
The tst_compiler test was wrong to use alignof(variable). That's not
permitted by the standard nor would it work with our fallback
implementation. MSVC 2015 enforces this, but ICC, GCC and Clang don't.
Change-Id: Ifea6e497f11a461db432ffff1448abfa86672c63
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
LIBGCC_PATH was used before we initialized it, somehow it magically worked ...
Change-Id: I0a9a748ffbfc641f60736b0cf85d23f499b64e66
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
FreeBSD uses gcc as the default compiler until FreeBSD 10 where it was
switched to clang for the whole system. Choose freebsd-clang
for any system release > 10, otherwise choose freebsd-g++ by default.
Change-Id: I2bf38aa027453c25ed2a29d587c2962ded5fcd4a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
FreeBSD's clang currently is not able to handle thread_local calls due
to linker errors on __cxa_thread_atexit. The patch disables the
define Q_COMPILER_THREAD_LOCAL for clang __FreeBSD__ only, no functional
change. Otherwise, linking the tst_compiler autotest will fail.
For details, see
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320
Change-Id: I2395c06499d4821213e2154769ccbeed3dcf1ffe
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Ensure we return a correct QLocale on iOS by overriding
QPlatformInputContext::locale().
A broader implementation involving subclassing QSystemLocale
will be done in dev.
Task-number: QTBUG-48772
Change-Id: I5250bdad320cbe66d63456926f6eab6fc2865424
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Also made a small comment fix
Task-number: QTBUG-53605
Change-Id: Ica9a06fe7a70f92f2a19a6df3ffdeaf1985e2eb6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
It was added in 2.6.22. If we pass it to 2.6.21, we'll get -ENOSYS,
which is bad for QMutex. This fix simply defines it to 0 if the header
doesn't define it.
But as a consequence: if Qt is built with newer kernel headers, it won't
run on older versions. It's not likely that someone is still using Qt
5.7 on a 2.6.21 kernel (v2.6.21.7 was released on 2007-08-04).
Change-Id: Icb178bb113bb437c9b67fffd1451dd7bb964f0c8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This allows us to pass pointers to storage that is not an array of
uchar, which it hardly ever is.
Change-Id: Ifea6e497f11a461db432ffff14490d2c2df21906
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
protocolServerSide test fails with 'ssl3-any' and 'tls1.0-any' combo
on RHEL 7.2 with OpenSSL v1.0.1e-fips, it would work as OPENSSL_NO_SSL2
code-path, but OPENSSL_NO_SSL2 is not defined, so socket is in state
connected while it's expected to be unconnected.
Task-number: QTBUG-53608
Change-Id: Ib321b95129a6ab5b0691b40cb4acc612125633b2
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
setEmptyDefaultConfiguration - this test (and this was stated explicitly
in comments!) must be the last test to run, otherwise, it can make subsequent
tests fail.
-exitLoop must be in 'protected slots' section not to be executed as a test,
since ... it's aux function, not a test.
Task-number: QTBUG-53608
Task-number: QTBUG-53603
Change-Id: I49d6d57ba927ecc4f20ae2d9325ad02fa46b0922
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Just being on ARMv8 does not mean CRC32 (and arm_acle.h) is available.
Task-number: QTBUG-53629
Change-Id: I104f643f2d59620e1f4d1ef814a1de71bb484e7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
DownloadLocation is not writable on some platforms (iOS) in Qt 5.6,
and qt-project.org HTTPS does not work anymore.
Change-Id: I78bfbee1472cd39cd05ec7f846d1195d4fbb1b2c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
This class is no longer needed now that SecureTransport is the default
SSL backend on iOS. It also uses NSURLConnection, which is deprecated
on iOS and tvOS and completely prohibited on watchOS (in favor of
NSURLSession).
[ChangeLog][Important Behavior Changes] The NSURLConnection backend of
QNetworkAccessManager has been removed, since SecureTransport is the
default SSL backend on iOS and is enabled by default. This means that
building with -no-openssl -no-securetransport will no longer provide SSL
capabilities on iOS.
Task-number: QTBUG-45031
Change-Id: I86b774fa369c7d76197bfc0504d5ad234bb47e5c
Reviewed-by: Richard J. Moore <rich@kde.org>
Since 5.7 we can write downloaded byte arrays directly to the
QIODevice's internal read buffer without any memcpy/alloc overhead.
This makes various other buffers redundant, so remove them.
Task-number: QTBUG-45926
Change-Id: I577af70f856c9b852b7569a0070ae2bcbb4faaae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
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>
- 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>
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>
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>