We're setting the default texture unit anyway, and glActiveTexture would
require resolving through QOpenGLFunctions.
Task-number: QTBUG-24555
Change-Id: Id8d660baaa1532e7b8e623673f501703c76fac65
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
As it was confusing to use the term local file when referring
to a file that was accessible using native APIs and not just
a file that was on a hard disk somewhere already the function
name has been changed.
By renaming it to createNativeFile we keep it consistant with QFileInfo
which has an isNativeFile() function too.
Test also added.
Task-number: QTBUG-3169
Change-Id: I410e7ed28133d68fd312c6c0faf3f7191460d7ce
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QWindow::setWindowFilePath sets the file path of the document
that is currently represented by the window.
The window system might display it in the window's title bar
along with an icon matching the file type.
Task-number: QTBUG-27299
Change-Id: I8f620d1262fc0b4cd16884198b16853b73ce3b1f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This cancels only the I/O operation of the reader and not all
operations on the handle.
Change-Id: Ie442199534cf45e58bb2e053da9fecee961a460e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
tst_QWinOverlappedIoNotifier::multipleOperations starts asynchronous
read and write operations on the same named pipe handle.
The received notifications must contain the right byte count and
OVERLAPPED pointer corresponding to the I/O operation.
Change-Id: I6f3fa5cf3ca6d62fcb9bc7073d28611fcfa7d98a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
When doing multiple I/O operations on the same handle, we get notified
for every operations. These must be distinguished by comparing the
pointer to the OVERLAPPED struct.
We now pass the OVERLAPPED pointer via the notified signal and let the
receiver decide if it wants to handle this notification.
Change-Id: I4efe70f39c6ae5282b949f2f4b21f6e7dd3df785
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The programs in the example isn't used in the test.
Examples should be in the right directory and be of a certain
quality.
Change-Id: Id77bd1295efb3387fa54c379eb9c882cdc5b88bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Turns out some QtQuick elements have the "inputMethodHints" property
as well, so don't only accept input hints for widgets.
Change-Id: I81a14be20cdca7d993dc88e8e252ecdfde8eb4ea
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
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>