~QWidgetPrivate() may end up calling QWidgetPrivate::
deleteTLSysExtra() which, in turn, calls QWindow::destroy().
This sends an event to the window itself. This reaches
QWidgetWindow::event() which will forward the event to
the widget. However, the widget has just been deleted
since the sequence was initiated by ~QObject().
Task-number: QTBUG-53103
Change-Id: Ib511714a76bbc1e734d6f2800a983eb1459bbf0b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Depending on the windowstate passed to QWinRTWindow constructor we might
act on the uiElement which has not been created yet. This happened
especially in release mode, probably due to timing.
Hence delay uiElement changes until we created it in the constructor and
can ensure it is valid.
Change-Id: I00daa9fcf8542a0535bbcb663a76d85c36e510e2
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
MSVC 2013 does not like QStringLiteral between brackets.
Change-Id: Ic42f80b7a3abbb48df3d0e222bd5c868045a0ded
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
a63ca3fa10 caused a build breakage
for WinRT as GetModuleHandleEx does not exist on that platform.
Change-Id: I143d9cad5f32d98a4d86292dfa73f94a4acdf305
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
We don't know why it works, but we've been told that it fixes
some builds and we have no reason to think it will break others.
Task-number: QTBUG-52998
Change-Id: Iacaa1fb3c49e4d7aafd4167e591ff3724489872e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
the "generated by qt creator" header is not supposed to be checked in.
Change-Id: I7626c0bd16f83d81b3facd216a04e7d505942256
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Since QCocoaMenu can live longer than its m_attachedItem pointer,
this pointer is becoming invalid after QCocoaMenuItem deleted
(and its 'm_native' was released).
Task-number: QTBUG-53251
Change-Id: I6d97b75b2c09e2443cd21415c5db94206d5d89ce
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
The test passes on OS X now.
Task-number: QTBUG-8941
Change-Id: I7b57dc30ede7c1ed0bcb8bacb458ea56f222d987
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Sheets are no longer transparent on newer OS X
versions.
Change-Id: Iaaed5aea9c9b130a5d991acd36717b76c3927cfb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
The Qt 5 unified toolbar implementation does not move
the toolbar to the “non-client” area. This test is
no longer relevant.
Change-Id: Ia32de2260f8ef400a0dc5acf3e5e3ff59083657a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
In some cases the mouse release event won't arrive, i.e. when window is
minimized on button press. Check for mouse buttons state on mouse move
event and properly unset the mousePressWindow to avoid blocking
enter/leave events in this case.
Amends: c511466d74
Change-Id: I543a75104f528df1bf644bace13f78a6af017455
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
The mouse release event which ends the drag and drop operation must be
forwarded to the window where the drag started, and not to the
QShapedPixmapWindow, which is not supposed to handle input events.
Task-number: QTBUG-52541
Change-Id: I24a7c7b331a06342ac28b420ff9467aa05fe00dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
... with known size and known char by corresponding ctor.
Don't use fill() for this case.
Change-Id: I475a0655132ecbb40b1eac919309597b2560e71b
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Always clearing to opaque black makes it impossible to create
semi-transparent overlays with linuxfb. Instead, behave like other
platforms' backingstores: if the target image has an alpha channel,
clear to transparent instead and set the correct composition mode.
Task-number: QTBUG-52475
Change-Id: I2db4588e0112e200a3aa5eed49f806c37d7ca8b5
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
Add a "CONFIG += qpa/basicunixfontdatase" to the -system-freetype block
so that the FreeType libraries are included in LIBS.
Task-number: QTBUG-35767
Change-Id: I81e18e72e068d5ac240cba79bab880e50a033860
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
from the perspective of freetype, this looks like a system zlib.
Change-Id: Idb961850b2a92d456cfa2b027bdc85ce5e4be771
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
our zlib header includes qglobal.h, so we need the qtcore include dirs,
and qtcore is also where the actual code is compiled into.
Change-Id: I09f530a1b4e6160438215a6d7223c0771ce94f05
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Change 3cdc02d actually "reverted" the behavior of listening for
cursorFlashTimeChanged. The reason is that we sat "blinkingEnabled"
directly to true in the constructor instead of calling
"setCursorBlinking", which was responsible for setting up the
connection.
And as it turns out, after 3cdc02d, nobody is actually calling
"setBlinkingCursorEnabled" anymore. From the widgets
point of view, it should always blink when visible
(unless QPA sets cursorFlashTime to zero). So we can remove the whole
function, and set up the connection in "setVisible" instead.
Change-Id: I577a5fbbbd9c56331ac7f8bb38567a684ca8c1df
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
glGetUniform*v functions are supposed to return just a single
array element, so returning the whole array is always incorrect.
Task-number: QTBUG-53072
Change-Id: I22f05d420082d4d9de06d975b3d0f5e64d3e0c41
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Removed Qt Quick Controls 1 examples from the highlited
list, and also removed the webkit1 and webkit2-related tags.
Change-Id: I674dc00544bc70c50460a64690d1062835885fc0
Reviewed-by: Sami Makkonen <sami.makkonen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
!isComplex is quite good heuristic, but we know for sure which types
should be included.
Change-Id: I609d021b8a668e6c1945ed2b11d69f5a82b5e2bf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
On some X11 window managers, 2 events are received when
hiding/reshowing and activating the window, which became
apparent after 91f536dd71.
Change-Id: I66fdc4f69d87ac898b18d5dfddc957617bb8f916
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
While we on Linux will do a compile test to check for a
system zlib, the test on a Windows host was less accurate, causing
us to compile in the zlib from 3rdparty/ here. This caused compilation
errors after updating the freetype font engine to support color fonts,
since the zlib in 3rdparty/ was included implicitly in the freetype
library, and since it depends on Qt headers, the compilation failed
in this context.
The hotfix is to force system zlib on QNX for Windows hosts, since
we know it is available in the NDK. Doing a proper build check is not
worth it right now, due to future plans for changing configure. We
will still break for an explicit -qt-zlib compilation, so the plan is
to fix this in an upcoming commit by separating libpng into
a library.
The hotfix just follows e6cb3b8c.
Task-number: QTBUG-53248
Change-Id: I07dd4356fae6397b3cc93fc1fa97bf35380e19df
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
The vast majority of users call toString() without the optional
defaultValue. So do it like the toArray() and toObject() methods
and split toString() into two overloads, so the common case no
longer needs to pass a temporaray QString.
Saves ~1.4 and ~1KiB in QtCore and QtGui text size, resp., on
optimized GCC 6.0 Linux AMD64 builds, even though we added a new
function to QtCore, too.
Change-Id: Ibe02397ca49ce11fdb58f5c5fc69e909bf94c1c6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
This is source- and binary-compatible, including the marking of the
existing function as noexcept.
[ChangeLog][QtCore][QMutex] Made the isRecursive() method be a const
function so that it can be called in const QMutex objects too.
Change-Id: Ifea6e497f11a461db432ffff1448bead97c08f92
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
They won't be listed in QStorageInfo::mountedVolumes, but we can now
obtain their info if you know their mountpoint. For example, on Linux:
$ ./qstorageinfo /dev /proc /sys
Filesystem (Type) Size Available BSize Label Mounted on
devtmpfs (devtmpfs) RW 4029772 4029764 4096 /dev
proc (proc) RW 0 0 4096 /proc
sysfs (sysfs) RW 0 0 4096 /sys
Change-Id: I3e15a26e0e424169ac2bffff1417ba2429d6d9f4
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This happens for me with LVM:
$ ls -l /dev/mapper/system-root /dev/system/root /dev/disk/by-label/*
lrwxrwxrwx 1 root root 10 Nov 17 22:45 /dev/disk/by-label/system -> ../../dm-1
lrwxrwxrwx 1 root root 7 Nov 17 22:45 /dev/mapper/system-root -> ../dm-1
lrwxrwxrwx 1 root root 7 Nov 17 22:45 /dev/system/root -> ../dm-1
The mounted device according to /etc/mtab (/proc/self/mounts) is
/dev/mapper/system-root.
Change-Id: I3e15a26e0e424169ac2bffff1417b96779d84246
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Allow tmpfs filesystems to be reported, as they're often usable by the
user, mounted in /tmp and in /run (the fs for $XDG_RUNTIME_DIR).
But disallow anything whose device is not a pathname. This catches most
of everything else that wasn't specifically tested for before, like
virtual fuse filesystems, like GVFS.
Change-Id: I3e15a26e0e424169ac2bffff1417b7cee0f8ec97
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The path "/usrfoo" starts with "/usr", so if you tried to get
QStorageInfo("/usrfoo") when "/usr" is a mount point, you'd get the
wrong filesystem.
[ChangeLog][QtCore][QStorageInfo] Fixed a bug that caused QStorageInfo
to report information for the wrong filesystem if there is a mounted
filesystem at a path that is a prefix of the requested path (e.g., it
would report "/usr" filesystem for "/usrfoo").
Task-number: QTBUG-49498
Change-Id: I3e15a26e0e424169ac2bffff1417b7a27cd0132d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
There's exactly one application that needs this functionality (kded/
kiod), but we should test it too.
Change-Id: Icaa7fb2a490246bda156ffff143d210c6f5f207f
Reviewed-by: David Faure <david.faure@kdab.com>
moc.cpp(385): error #187: use of "=" where "==" may have been intended
Change-Id: Ibb6ef27030762cbe4f7c7002581a0955f0f9086d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
We were using direct loading and operator=, which for everything except
std::atomic was very relaxed. But std::atomic<T *> defines the direct
access to actually be the least relaxed possible, under the idea that if
you didn't know any better to use a member function, you probably need
the most protection.
So use Ops::load and Ops::store.
Change-Id: Id5480807d25e49e78b79ffff144a06a2e6398576
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Because the moment we disconnect from the object's destroyed() signal,
it may get destroyed in another thread. If the same object appears more
than once in the object tree or in the signal hook table, we could be
accessing a dangling pointer.
Task-number: QTBUG-52988
Change-Id: Ifea6e497f11a461db432ffff14496f0f83889104
Reviewed-by: Weng Xuetian <wengxt@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If we're linking to libdbus-1, qdbus_symbols_p.h #includes dbus/dbus.h,
which may be old and not #define the Unix FD macros. tst_QDBusMarshall
had the definition for one of the macros but not the other, so add the
missing second one.
Change-Id: Id69569111e7d4e619e22ffff144c35edcd6f348b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
The old code sometimes made incorrect selections when rows or columns were
hidden or moved. It used logical top left and bottom right indexes to create a
selection rectangle. However on moved or hidden cells a wrong rectangle was
made. This fix calculates a simple rectangle without hidden cells and makes use
of the row/column select functionality provided by the selection model, to make
the right selection.
[ChangeLog][QtWidgets][QTableView] Fixed a selection bug when rows or columns were hidden (QTBUG-50171)
Task-number: QTBUG-50171
Change-Id: Id186012af26da7b2051ff5eb1c13e6b7494cca77
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
ICC 15.x and 16.0 (beta, at least) are missing the "constexpr" and
"noexcept" keywords in the definition of the std::atomic
constructors. The lack of constexpr makes std::atomic a non-literal
type, which in turn makes QBasicAtomicInteger's constructor (which is
constexpr) fail to compile.
Reported as Intel issue 6000117277.
Change-Id: I4a88bcca48bf0ce51557d809ef32a4545edcafee
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
QMetaEnum::key(n) returns the n-th key, which is not necessarily the one
of value n. For the key of value n, we want QMetaEnum::valueToKey(n).
Change-Id: Ic90fe6b1cbe84978a02fffff141bf4a06074917a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It always returns the same information for each thread it is called
in. But since it's different per thread, we don't think it's
const. pthread_self() on Linux is marked const, though we think it
really ought to be pure. On other OSes, the annotation isn't present,
but the we can assume function is so.
Change-Id: Ifea6e497f11a461db432ffff1448c2b37d94d5f3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
It's interesting that the HMODULE/HINSTANCE pointer points to something
in the actual module that got loaded, so we can use its value as
"address of something in the module" for GetModuleHandleEx. The "PIN"
flag tells the Windows DLL loader to never unload.
Change-Id: Ifea6e497f11a461db432ffff1449a2169eb6293e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Since I'm changing QDateTime's privates, it's easier to know what may be
depending on it or not.
Change-Id: Id5480807d25e49e78b79ffff144a53018d057e19
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
The article describes two ways, not three.
Change-Id: I2b8b3c92135dd87de8a81255cddd1faf7c5455c3
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Incidentally, this corrects two small errors in the values of the
Medium and Heavy font weights.
Change-Id: I17d4410890f1f3bd1ed72e94f5ca0d43c21484e1
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>