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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>