For consistency, this behavior has been kept across Qt versions... Just
get rid of it.
Also fixes native child widgets not being notified of the change of
window handle (winId) when being reparented.
Updated auto-test.
Change-Id: I3616dc0f1c32a519d78a4846297d6d4a6e926fbf
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reported by David Faure.
In KDE a DEPRECATED macro gets defined in a header file created by cmake.
The define is not guarded with #if Q_CC_GNU or similar because at cmake
time the compiler is determined. Therefore moc suddenly sees this gcc
specific token and stumbles over it.
This patch simply defines an empty __attribute__ macro that will expand
to nothing and thus become invisible to moc's "C++ parser" after the
pre-processing.
Change-Id: I4448b9ac3f72b6334e32b27484401fb0fca23a0c
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
stack-protector-strong gives performance benefits over
stack-protector-all and is still checking more than -stack-protector,
so seems to be a good middle way and we want to use it when it is
there.
The -shared option for the compiler (not the linker) prevents a
RIM internal version of qcc from forcing -fPIE, and should not harm
in general when set.
In addition, add a method "compilerSupportsFlag" for Windows as is
present in the Unix configure script.
Change-Id: Iba300e9cb82f34043e7b36f8e45287a1aed2a1a5
Original-patch-by: Greg Bentz
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Do not leak windows.
Change-Id: I3af29ce597742cbe6444208aa72443c0507819db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
These defines are new in GLX 1.4, earlier they were ARB extensions.
Task-number: QTBUG-27370
Change-Id: I83828067d106e93a3909de46a4051d492e277ba9
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
There are cases where a widget has a parent, but is also a toplevel window at
the same time, causing the system window to have no parent.
For instance, a QMenu usually has a QMenuBar as a parent, however QMenuBar
itself does not have its own platform window, as opposed to QMenu. Thus
QMenuBar::parent == QMainWindow (for example), but QMenuBar::platformWindow ==
0x0; QMenu::parent == QMenuBar, but QMenu::platformWindow != 0x0 (which is
QMenuBar's value).
Change-Id: Ib203fa1b85f5f20ef53366c80d6752d6384a202d
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
They are stored as such anyway, and this allows clients to not have to
convert between QModelIndex and back so much. This should be
fully source-compatible.
Change-Id: Ia606ea082442089a0aae1583380c3710ce61d3d1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Usually layoutChange is used for sorting elements. The parents parameter
to the signal already hints at a localization of what is being sorted, if
it's just one level in the tree. The new hints enum can be used to only
consider how the first column of a table gets sorted, because all other
columns will be sorted the same way.
Change-Id: I65dd2996894bbdb45a2f6288edbeaa49e4053256
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Replace a C-cast with a const_cast.
Casting doesn't care about nullptr, so don't check for one.
Change-Id: I18a3e8f21d73b73385e567c7ceaf64e36aaa2cf3
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Modularization of examples has resulted in putting
all documentation and code for an example in each
example subdirectory. In particular, each example
subdirectory now contains a doc/images subdirectoy,
where images are stored that are linked to from the
example .qdoc files, which are in the doc/src
subdirectory of the example directory.
Because there are so many example subdirectories,
it would be difficult to list all the doc/images
directories in the imagedirs variable of the
qdocconf file. Therefore, qdoc now searches all
the directories listed in the exampledirs variable
to find all the doc/images subdirectories there,
and it adds these to the imagedirs variable for
use in finding images called out in \image and
\inlineimage commands.
Task Nr: QTBUG-27248
Change-Id: I070ba1a558ab32e1db06429a71c083b55f9dd0ea
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Functions like QByteArray::at() assert the given index:
Q_ASSERT(i >= 0 && i < size();
These functions typically get inlined. Now if the index is
e.g. size() - 2, then gcc will emit an ugly warning in
client code ("assuming signed overflow does not occur when assuming
that (X - c) > X is always false").
This can be easily prevented by casting both sides of the second
comparison in the assertion to their unsigned type. The explicit
comparison to zero is then no longer necessary, since that condition
is tested implicitly by the other comparison due to unsigned arithmetic.
Change-Id: Ic7244e1fa5da00a47d1fe0ed56fb81c23d444dfe
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
removeFromParent() must not be called from raise()/lower(), because it wrongly
sets m_currentParent to 0, causing the parent/child link to be broken after a
call either of these methods.
Change-Id: I58f847dc4a46f2cf120cb3acf230bac46bcf24f5
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Replace storage and operator int() return types with unsigned int
if the enum is unsigned.
This fixes a number of exisiting warnings, in particular with
Qt::MouseButton under GCC.
Change-Id: Ia12d36212329aec3e9d62a5fbd38809a6c2b36d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This class belongs to QThreadPool/QRunnable more than to QtConcurrent, so
move to QtCore, where QThreadPool awaits it.
Change-Id: Ibf20288a986593bf779453427c2dae8db1e1423a
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
qtconcurrentcompilertest.h defines the HasResultType<> template, which
qfuture.h doesn't use.
Include qtconcurrentcompilertest.h in the headers which actually use
HasResultType<> instead.
Change-Id: Ic5939ccf4c9058b2b624432c7ea48a5aca2236b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
No compatibility header needed. While this wasn't marked as private API,
it wasn't documented, either.
This is a prerequisite for moving QFuture to QtCore.
Change-Id: I8e986e6e2a22fbe5cf08d0600ec39ae9ae993e20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Leave the old name as a deprecated typedef; adapt users.
This is a prerequisite for moving QFuture back to QtCore.
Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The wrong variable was used when reading the module settings
Change-Id: If35dc9694240a68393b24d7dba72520108cb9ac3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The module rpath should be the raw QT_INSTALL_LIBS, without the sysroot
Change-Id: I4140929b38a589134872593e4ce35eaf7d1cd5b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
m_childWindows must be 0 (and not > 0), since at this point it should have no
children.
Change-Id: I149e34849cab2d56f8617cc04fc6bf95c0476e4c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
We must not create pipe readers for the forwarded channels as we don't
want to read from stdout/stderr into the internal QProcess buffer.
Also, we must not pass CREATE_NO_WINDOW to CreateProcess because this
will render our stdout/stderr handles useless.
Change-Id: Ie6485e86c103d1e9225cf39c04aa54093c1efe0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Also use mini-sized checkbox and label when checkable. This looks better when
there are several group boxes on the same dialog.
Change-Id: I69bb0240f2a6725afb9819d20696ca404be0bca7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
This fixes a problem when the preprocessing scripts were called from a
path with spaces in it.
Task-number: QTBUG-15317
Change-Id: I92ea85e12e2f9abfc262a8dcaa4f414e471e468c
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Change-Id: I2d30d6079d3982e5ca2b8d9346d0d511279792ad
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This makes it clear that the m_childWindows size must be 0 at this point,
indicating otherwise an inconsistency in the logic of the child windows
management.
Change-Id: I04e418bc6e1d23681bd96f4d619cde9645dc6a22
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
ICC apparently optimises 0 * anything directly to zero, even when it
should be doing a multiplication to conform to IEEE requirements. GCC in
fast-math mode does the same, but that also makes the rest of the
function unreliable, so we try to turn off fast-math mode if we can.
Task-number: QTBUG-22340
Change-Id: I0e3c5f4927b0a6bcb3189bb156c18843fc4b29b9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
It was introduced in the early days of the docs'
modularization and appears not to be used anywhere
anymore.
Change-Id: I5b0c60d92828624af2129153fce96ad01aec861c
Reviewed-by: Martin Smith <martin.smith@digia.com>
MinGW-64 defines _CrtSetReportMode, but only as a noop, resulting
in a warning "statement has no effect [-Wunused-value]"
Change-Id: I6e509246134dd5929b23b07abdb6d705db603793
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Since e0839abbb4 they are created
in the build dir, not the source dir. Further, they are generated
in the include/ dir in the build dir, which is also already ignored
for in-source builds.
Change-Id: I0e709abf4b2b40351eb2728a36e9e238e3fc98bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
In cocoa the timers are associated with main run loop but
the way font and color dialog tests are executed the modal
dialog run loop is only run in cocoa. This causes timers to
not to fire and test cases to hang.
Unfortunately this does not completely fix the test failure
because the QTest::keyClick is not working with cocoa
native dialog helpers and therefore the tests are marked
with QEXPECT_FAIL.
Task-number: QTBUG-24320
Task-number: QTBUG-24321
Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Screen readers do random things with the dbus interface,
we should be careful when handling what they send.
Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Task-number: QTBUG-27336
Don't check 'widget != m_widget' in
QWidgetWindow::handleDragEnterMoveEvent() since the current window's
parent widget may be the actual drop target. I replace it with a check
'!widget->isWindow()' to prevent we pass through a top level window.
I also change 'widget->mapFrom(m_widget, event->pos())' to
'widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()))' since m_widget
may not be widget's parent.
Change-Id: Ia4f10f85ccdf1e27223ddc51afabd98b5d16f2fb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This is exactly the type of pointer arithmetics that GCC likes to
miscompile.
Just use offset >= size() (=subtract begin() from both sides).
Change-Id: Ifb13652d7b96bf4c06727d9c965516e95d16ab5c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>