It can be used to determine whether expand() should really expand.
Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Useful for running auto-tests without popping up a bunch of windows in
the windowing system. Thus they can be run in the background and even in
parallel without focus issues.
Change-Id: I8b14c6de258b41225480a0af5a2a9553663bc2b7
Reviewed-by: Jason McDonald <macadder1@gmail.com>
It may interfere with other file system tests.
Task-number: QTBUG-29014
Change-Id: I32dd7428993b0da1a2f70ec3e581050012a4ff32
Reviewed-by: Simo Fält <simo.falt@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
The macro was made empty in ba3dc5f3b5
and is no longer necessary or used.
Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html
Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Was added in commit 9bbebb9144
Change-Id: I437dcb622197acd7afffb62711284a6168687063
Reviewed-by: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Make them use the monotonic clock if that's available. On Mac, the
monotonic clock is not available -- Qt fakes monotonic support by using
the Mach timebase -- so we need to use gettimeofday.
Change-Id: Iaea0b0c0de1b4802780e2476dc3643b703db392c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add function to move back data to the stack.
Change-Id: Ic78a368459bce68629e29602e4eeae2e1afe398b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I66c4e274c8b686d8a69476ad10751008f256e5a2
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Use the test's temporary directory instead of
QDir::temp() and the documents folder
instead of QDir::home(). Split out unrelated test
from data-driven sort test.
Task-number: QTBUG-29014
Change-Id: I229f0b1c0f1e43b56d19ebd43fd7cc64a85b1222
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Make it possible to show a modal dialog by just calling show().
Start an idle timer, which will start the dialog thread.
This timer is stopped in exec().
Change-Id: I8f7352bf577b09a19be7df4484e0077bb1aa46ab
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This avoids an extra division by 1000 when getting the current time.
This can't overflow, under normal circumstances, even on 32-bit: when
adding two values less than 1 billion, the result is less than 2
billion, which is less than 2^31.
Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A itemview item with its flags set to Qt::NoItemFlags is considered
disabled, and therefore should not cause the activated signal
to be emitted.
Task-number: QTBUG-20490
Change-Id: If824505c46f4fcadb9265ad6d1e9337f0cee32cf
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The QT_{BEGIN,END}_HEADER macros have never worked and
might be potentially removed.
Also removing the list of blacklisted files from sync.profile
Change-Id: I601969cf8eddf3908c3ad46f63af9434670d4046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The d->buffer array was 2x the required size and every other void*
actually stored a DBINT (int) indicating the binding status of the
null. The qIsNull function checked that value, but got the warning
printed.
Instead, let's just do the right thing and have a struct for each
column. Solves the problem more neatly.
Change-Id: I2daaf05c876da7e0e13fb983c58916d946518846
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
The writer delegate used by QJsonDocument to produce a Json QByteArray
supports generating a human readable Json (with spaces and carriage
returns that reflect the Json structure) and a less human readable (no
spaces nor carriage returns) but more compact Json.
The method toJson() was extended with a format argument to support
the compact Json generation.
Task-number: QTBUG-28815
Change-Id: I8d13849ab9ab6ed7c645011260251dc14a8629d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Debao Zhang <hello@debao.me>
A QWidget that can embed a QWindow. This can be used
to embed a QWindow/QOpenGLContext based window or a
full QQuickView.
Change-Id: I8415b5ae38562fc00b46150fa70b56fd9b19a80c
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Add more testing.
This uncovers that currently the QDesktopScreenWidget
shows up as child of the app. Fixed by not creating
QAccessibleInterfaces for QDesktopScreenWidget.
Also don't crash in indexOfChild when called with 0.
Change-Id: I9fb1e47e8f1f33189e6125f56f274a7b94ecd0dd
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
If the window or widget is a popup, ignore the hint. The
intention of the flag should be to show main windows etc in
fullscreen, and not all kinds of popups and tooltips. The user can always
call showFullscreen explicit when necessary.
Change-Id: Ie150b6c6d7ca6c9344a9097544a7edbc4bd10df2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Improving performance when making texture from QImage, this commit
makes it possible to skip qgl_byteSwapImage. If gl_FragColor of fragment
shader is properly configured, qgl_byteSwapImage is not required.
Ex) gl_FragColor = texture2D(texture, textureCoord).bgra;
Change-Id: If1f2d7dc1fc1c4e583cc3f38dec95a9d29417cd2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Change-Id: I96b6e96539a84a5919992afbaee757fa080b7ae0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The CoreText font-engine is not able to produce glyphs with a negative
scale (flipped). We need to report this fact back to the raster paint
engine, so that it can fall back to painter-path based text drawing.
For the GL engine this is not an issue, as the engine is able to handle
the flipping itself, while still using a non-flipped glyph-cache.
Task-number: QTBUG-29284
Change-Id: I3c24cee091786faae8a5c5dd756d208163330bfc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
We can still assume it when pulling out the scale of the glyph cache,
since we limit it to scaling, but when computing the scale from the
current matrix we have to decompose it.
We always use a positive scale in the glyph-cache, and let the drawing
code take care of any flipping of the coordinates.
Change-Id: Ie3c4f2d91008a9be8f89bef29c15d80b23fb8a82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Modal dialogs can now tested by just showing or running exec().
Remove connection of accept() from applySettings().
Change-Id: I5e3c0e6405ce5682f39d10a9c06b9d61be10ed3f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This happened in cases when QDrag choose not to use a
pixmap to represent data in a drag and drop operation.
The chain that leads to QPainter errors begins in
QBasicDrag::startDrag() where we call setPixmap() with
Null pixmap, which later calls updateGeometry() which
leads to calling render() before the backing store
has been resized.
Task-number: QTBUG-29283
Change-Id: I2145159d3f23dbde2cba2ca9aa1788e222aba02a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When a filename was specified as part of the start up directory then it
should ensure this is put in the filename lineedit in the native
filedialog.
Change-Id: I2b190933d46553908b5bcf17506cb2a95fb1f982
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Though no one is supposed to include them directly, it's a good idea
to ensure that they are tested too. They're only included from the
master header when QT_GUI_LIB and QT_WIDGETS_LIB are #defined.
Change-Id: Ie84bb6fd4c18b5b51ab35463f9082feaa0693c97
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
A glitch in QGraphicsItem's logic made it update the focusScopeItem
pointer, but fail to notify the change to QDeclarativeItem through the
d_ptr->focusScopeItemChange() virtual function, hindering
QDeclarativeItem from emitting focusChanged() correctly for focus
scopes that do not have focus.
Two lines were moved, and a comment updated to reflect the reason
why the "return" is needed at this point. It's clear that the
calls to focusScopeItemChange() are unrelated to the return.
Task-number: QTBUG-29260
Change-Id: I12ba9161b16d34c3689401a92c86d2047989f7bd
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Alan Alpert <aalpert@rim.com>
make sure we keep track of when we can load root certs and when we
cannot (we cannot when the developer set the certs explicitly). This is
implemented the same way for QSslSocket already, and needs to be
duplicated because we have 2 methods for setting CA certificates: one in
QSslSocket and one in QSslConfiguration.
In addition, adapt the auto test which checks whether setting a default
QSslConfiguration works: There is no way to set on demand loading
through the API, so it should be enabled by default.
Task-number: QTBUG-29103
Change-Id: I5146128aaa385dfcc0ad1e0ef81a92d9350ec5f2
Reviewed-by: Richard J. Moore <rich@kde.org>
Introduces the methods QImageReader::supportedMimeTypes and
QImageWriter::supportedMimeTypes which corresponds to the similar
supportedImageFormats methods, except they return lists of MIME types.
Task-number: QTBUG-28177
Change-Id: Ibb0e264a12eaf972a8bfd6bd891dcd9f89efd085
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This allows easy unsetting of the variable in a shell like:
QT_FATAL_WARNINGS= progname
Change-Id: Ie9cfb6ebfd4931de1c90af68bfeeae1e9f3d4b9d
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
The current code matches *g++*, which matches "clang++" and detects
Clang as GCC. That's highly incorrect.
Change-Id: Ifd85bbd35aa130be3094fc75d471614d06ca23bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Required to prevent crashes and incorrect behavior in
https://codereview.qt-project.org/#change,44201
Change-Id: If6025429caabafd150cdd44fec152ff584232220
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
We don't need to stat(2) the file to check if it exists before
creating it. We're about to open(2) with O_CREAT|O_EXCL, which will
not recreate it if it existed.
Change-Id: I2d2176054e7776a32a4520832ee104b9c4ccf748
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
This allows shared texture uploads in a background thread.
Change-Id: Ib390243bc9dfabd6c579dff9b74e7f44211739d3
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>