Like for integers, this is activated only on QLocales other than C.
[ChangeLog][QtCore][QTextStream] QTextStream now uses group separators
when writing floating-point numbers when the locale is not the C locale.
The old behavior can be restored by setting QLocale::OmitGroupSeparator
on the locale.
Change-Id: Ie451b91017746c3a9b11b6211b2ddd09cd295cd2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Currently QOpenGLTextureCache::bindTexture always convert any uploaded
image to RGBA8888 before uploading. This is quite inefficient when
OpenGL natively supports uploading formats in the original format.
This patch adds support for uploading a few native QImage formats. This
also get the performance of QOpenGLTextureCache::bindTexture on par with
QGLContext::bindTexture.
The texture brush used by QOpenGLPaintEngine is also converted to QImage,
since bindTexture will convert it to QImage anyway, and going over QPixmap
may cause an unnecessary conversion.
[ChangeLog][QtGui][QOpenGLTextureCache] Support uploading common QImage
formats directly to OpenGL when supported.
Change-Id: I828a763126441a98e4547c32ef52dddf7c129a32
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Adds basic support for 10-bit per color channel formats to QImage
and the XCB plugin. This will make it possible to paint to and from
these formats, but only at 8-bit per color channel accuracy.
This also fixes Qt5 applications on X11 with native 30bit depth.
[ChangeLog][QtGui][QImage] Added support for 10-bit per color channel image formats.
Task-number: QTBUG-25998
Change-Id: I93ccd3c74bfbb0bd94b352476e5fe58a94119e1f
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
This is used by Orca for geometric navigation (aka flat review) to move
the focus around. It is also generally sensible to be able to
programatically move the focus around. This way of moving the focus
is redundant with the action interface's focus action.
Task-number: QTBUG-40048
Change-Id: I1b61ea843f6bfc3dc00007772e0e5102555ca752
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
It allows to create a QJsonArray instance in C++ by using
a similar expression to JSON. For example:
QJsonArray a = {1, 2, 4};
[ChangeLog][QtCore][QtJson] QJsonArray now supports
C++11 initializer lists.
Task-number: QTBUG-26606
Change-Id: Icc352e518d9649d24176c89e7113d200d5c50b0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Support CF_DIBV5 for these images so that transparency is preserved.
Task-number: QTBUG-11463
Change-Id: I51881ae8bfbd05b92abd309766f4da9a7ea26c2d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Factor out code to clear all mappings into
QFSFileEnginePrivate::unmapAll() and call that
from QTemporaryFile.
Task-number: QTBUG-39976
Change-Id: Ic1ceeba0ba4451866f1081fee430e5c458c0819d
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
So far, we had to listen to the QObject::destroyed signal from the QScreen
class to figure out whether a screen was removed. Often, this is already
too late, given that most of the QWindows have been moved by then and we
don't get to react before the windows are being set to the primary screen.
This patch introduces a new signal that will notify about a screen removal
before the screen is started to be destroyed, so that the application gets
to decide what to do with the screens before Qt decides to move things around.
[ChangeLog][QtGui][QGuiApplication] Added QGuiApplication::screenRemoved
signal to inform that a screen has been removed, before Qt reacts to it.
Change-Id: I99304179f4d345cae581a87baac6cff7b8773dea
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
There is no guarantee that the OES extension is present and the standard
functions are not required to be dynamically resolvable on ES.
By performing the ARB-style lookup for the suffixless function names we
can also support ES3 compatible contexts on desktop GL.
This also fixes the problem of picking up the APPLE extension functions
instead of ARB when both are available. vaoFuncsType was set to ARB correctly
but the helper has to take the preference of ARB into account too.
Task-number: QTBUG-38168
Change-Id: If7402320e8f96891017674f3c43bc57c4b5d29f3
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
The assumption that we can test "en_US" and expect
it to behave a certain way is flawed in that most
of the formatting settings are independently
configurable by the end user.
Make the test more robust while attempting to preserve
as much testing as possible:
Make the decimalPoint/groupSeparator tests check for
a range of possible values. Check that they are not
the same.
Remove the date formatting tests and the firstDayOfWeek()
== Sunday test.
Make the time zone test accept a non zero extended
time zone. ("GMT+2" in addition to "GMT+02".)
Change-Id: Ie1f89793eb785f526c5f6fafbb6726ef8c6cb016
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Fixed qwidget test cases for platforms that show windows full screen by
default and that don't support WindowMasks. Incorporated QNX/BlackBerry
peculiarities.
Change-Id: I349ecab5cef35c7d9751aa547465f685d620164a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
The combination of these unstable tests makes it very
hard to get changes through the CI system due to the
unrelated test failures.
Skip the following test functions:
tst_QIODevice::unget QTBUG-39983 (Mac)
tst_QThreadPool:expiryTimeoutRace QTBUG-3786 (Windows)
tst_QLocalSocket::processConnection QTBUG-39986 (Mac)
tst_QTcpServer::adressReusable QTBUG-39985 (Linux)
Change-Id: I96559bea0d437fd25966b6ccac1ece1490e06241
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This allows QQuickSystemPalette to listen to palette changes without
installing an expensive event filter on the application object.
Change-Id: I8b693e047d993c444e393d7a714a5709692c3560
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
The setting of (static) messageHandler to qDefaultMessageHandler if null
was happening in multiple threads simultaneously, so it needs synchronization.
Used an atomic pointer in case qInstallMessageHandler is called from a thread,
but more importantly, initialized the static vars right away.
Improve auto test to ensure that qInstallMessageHandler(0) still sets the
default message handler.
Change-Id: I70335af38c1d28a1cdba1df8a79c6006f227422e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Conflicts:
mkspecs/qnx-x86-qcc/qplatformdefs.h
src/corelib/global/qglobal.h
src/network/socket/qnativesocketengine_winrt.cpp
src/plugins/platforms/android/androidjniaccessibility.cpp
src/plugins/platforms/windows/qwindowswindow.cpp
Manually adjusted:
mkspecs/qnx-armle-v7-qcc/qplatformdefs.h
to include 9ce697f2d5
Thanks goes to Sergio for the qnx mkspecs adjustments.
Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
The sockaddr_in struct is defined in netinet/in.h header.
Change-Id: I67a3421094c96a5e948968a26723ec8c21f85c93
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The almostplugin has an unresolved symbol, and on Android
we compile with -no-undefined.
Change-Id: Ia631193890dfe8e7ac8e58087475164222d876fc
Reviewed-by: BogDan Vatra <bogdan@kde.org>
It enables you to get a valid QSharedPointer instance to 'this',
when all you have is 'this'.
Task-number: QTBUG-7287
Change-Id: I3ed1c9c4d6b110fe02302312cc3c4a75e9d95a0c
Reviewed-by: Richard J. Moore <rich@kde.org>
Use SetWindowPlacement() to set the normal position when applicable
as is done in Qt 4.
Task-number: QTBUG-39544
Change-Id: Ia158b968ea15361d9937619f07b56eb8a0312a13
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This macro is equivalent to arg.toUtf8().constData().
It is usable for "%s" arguments of qDebug(), qWarning(), qFatal(),
qCritical().
Change-Id: I2d9956e6651271e1e2183dce9c835511cf923bf3
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This allows us to quickly test if a compiler actually supports what it
claims to support.
Change-Id: Ia32212a11774aa7947ddffae30837c53665374f3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Improve consistency and use QTextDocument functions to find ranges
instead of coming up with our own scheme. This is important since
QCursor's char format depends on block positions.
Change-Id: I94eb137882dc6b5f7b01fa7693b4a536cc48d02a
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
It is needed to control a QStateMachine object from QML.
Change-Id: I19271d97718af2d688c477647d6341f70fdef3ea
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Qtbase contains four identical implementations of next power of two,
these should be shared and the implementation made available to other
qt modules, as it is also used many places outside of qtbase.
[ChangeLog][QtCore][QtMath] Introduced qNextPowerOfTwo methods.
Change-Id: Id23fbe5ad6bae647b30d5a4212c0330e48a50278
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add conversion methods similar to those in QString to QByteArray. This
is often more useful than the QString version since std::string like
QByteArray are byte arrays.
[ChangeLog][QtCore][QByteArray] Added convenience methods to convert
directly to and from std::string.
Change-Id: I92c29d4bb1d9e06a667dd9cdd936970e2d272006
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Instead of using std::thread, use the WinRT ThreadPool to manage
threads. This allows for setting the scheduling priority, and provides
a path to enable XAML integration (which requires Qt run on a background
thread).
QThread::terminate() is still unsupported, and only the winmain thread
can be adopted due to the behavior of the thread pool when creating
tasks from the GUI thread. The associated tests are now skipped, and
all other QThread tests pass.
Task-number: QTBUG-31397
Change-Id: Ib512a328412e1dffecdc836bc39de3ccd37afa13
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Forward canDropMimeData() and dropMimeData() to the source model.
[ChangeLog][QtCore][QAbstractProxyModel] QAbstractProxyModel now
forwards the drop-related API.
Task-number: QTBUG-39549
Change-Id: Ib81fcec862586e4ecfb99b9e0f4eb1a16eace762
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This allows QQuickApplication to listen to layout direction changes
without installing an expensive event filter on the application object.
Change-Id: I2d7d8906acecbc092657c4bd918bbdc9aad9744c
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix condition to allow return a valid pointer when head != 0.
Change-Id: I5215f7dfc44924016c2d9b67ab2d9935b5164d7a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
We were keeping a dangling pointer to a non-existent QIODevice around
which would lead to a crash.
Task-number: QTBUG-17400
Change-Id: Ie374cbb94bb45c9b0fbef46287b3317f60154123
Reviewed-by: Richard J. Moore <rich@kde.org>
The local files in availableSizes() were not resolved.
Introduce member variables for the file names, resolve them
in the constructor and add initTestCase() to verify.
Task-number: QTBUG-39287
Change-Id: If841e904700fe76b6c9265124ccba7764911fdc9
Reviewed-by: aavit <eirik.aavitsland@digia.com>
setEnabled() would race with isEnabled()/isDebugEnabled()/etc.
Change-Id: I2004cba81d5417a634b97f5c2f98d3a4ab71770d
Reviewed-by: David Faure <david.faure@kdab.com>
According to the spec rects get returned with iiii but we were directly
serializing QRect resulting in (iiii) as signature.
This would trip up Orca when trying to use flat review in text edits.
Task-number: QTBUG-39702
Change-Id: I8d6769688586e678d27cc4341de5176a91f057fc
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QImage::fill(uint) was incorrectly performing ARGB->RGBA conversion when
called on RGBA8888 formated images.
This patch moves the color conversion to QImage::fill(QColor) where it
belongs so that fill(uint) can behave consistent with documentation and
how it treats other formats.
The fill(uint) method had no automated tests, and this patch adds one.
[ChangeLog][QtGui][QImage] QImage::fill(uint) now fills the given pixel
value unconverted when used on RGBA8888 image, making it consistent with
the documentation and treatment of all other image formats.
Change-Id: I00a9d810c61d350dbdd7c4b9ad09e5ce11896b6d
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
If the widget exists in the style rules cache before it polishes for the
first time then it should be removed from styleSheetCache too so that the
latest set stylesheet is used for the polishing.
Task-number: QTBUG-39427
Change-Id: Ic1e7988afe530f16ea9996bae56543ed554d6be9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>