Implement swap interval support for EGL, GLX and WGL.
The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to
QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications'
setting of the swap interval.
Task-number: QTBUG-31939
Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Since users were not supposed to use this feature at all, just
live with the BC break, but document it. In order to prevent possible
problems in the future, introduce dummy overrides in QAbstractItemView
and QListView as well. Also, fix the visibility of the overrides
(it's protected, not public).
Task-number: QTBUG-34667
Change-Id: Ib4554ae5e1e7d3ce4ea8e8703e1fea9e2231edb0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This flag enables the URI mode for database names in the SQLite
backend. Without this flag, it's not possible to use URIs like
'file:somedb?mode=memory&cache=shared'
to create shared, in-memory databases.
Change-Id: I2938184dad1f27c7af454385ca305bd4f6ed1a5e
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
On modern ARM CPUs there is no speed difference between
float and double anymore, so let's rather use double for
qreal to avoid rounding and precision issues. Like this
we also get much better compatibility with our desktop
OSes.
This is not binary compatible on ARM, but the old behavior
can be restored by passing -qreal float to configure.
Change-Id: I2a4b61e19a3dfa6b0bd76734cecf2634c97207fc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
After 37ca2224ec it's an exposed
behavior change that the widgets and related paraphernalia don't exist.
Task-number: QTBUG-34100
Change-Id: Ie0ebcb8c5c5668b6c12c5447f25bfbfd893dec6c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
The new way deployment is done can be confusing to users of
Qt 5.1 and Necessitas, so we need to mention that it has changed
and point them to the documentation.
Change-Id: I8e9890699f57d6000370c384c52fcb093a917bef
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
I don't think I ever worked on a project of non-trivial
size that didn't at some point add a QSignalBlocker.
This commit adds code, tests and documentation. Later
commits will convert naked blockSignals() calls to use
QSignalBlocker.
The implementation is purely inline to avoid the heavy
overhead of cross-dll function calls for this miniscule
task. This should not be a problem because QSignalBlocker
only uses public API and a pattern that we anyway need
to keep working until Qt 6, at least, so even changing
the implementation later will be no problem as the old
implementation lurking in non-recompiled code will be
acceptable, too.
This implementation is an evolution from KDTools'
KDSignalBlocker, with the following changes:
- Implements unblock() and reblock()
- Uses the return value of blockSignals() instead of a
separate signalsBlocked() call.
Change-Id: I1933dfd72a0f5190324be377cfca3c54cf3d6828
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This patch adds a brief description of the return of session management
because the changelog entries weres missing in the commit messages
related to the various parts of the related works
Change-Id: I20e6a20a63f1a38c6b1a7c9f147737688cd7ddf4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This patch allows to set which logical index the tree is in.
Before the tree always displayed data from the logical index 0,
but it is actually more likely that the user wants to have data
from visual index 0 (which can be done by special value -1).
There is nothing special about logical index 0, and not being
able to change the tree-data is just annoying.
Change-Id: Ib070ce93343a0d2fbac3ad5a42cb4359401ac87c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Sometimes it is nice that hiding a widget does not affect the
layout. This patch makes that possible by allowing hidden
widgets to take up space.
Change-Id: Ifbc1cdee0e112950acc025919b98199ea9558db7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Section 4.2.2.4 of ISO 8601 allows for decimal fraction representations
of dates and times. Currently, when calling
QDateTime::toString(Qt::TextDate) or QDateTime::toString(Qt::ISODate),
the milliseconds will be omitted. However,
QDateTime::fromString(str, Qt::TextDate) and
QDateTime::fromString(str, Qt::ISODate) already support decimal
fraction representations, so this patch just adds this support to
QTime::toString, and hence QDateTime::toString().
Task-number: QTBUG-30250
Change-Id: If58e4b3d3105322c51d11a76b832e5e634d8991f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Currently Qt looks at 1000 rows when scaling a column.
That can be slow in some situations and too inaccurate in others.
With this patch we leave it up to the user to decide how precise
e.g resizeToContents should be.
Change-Id: I6ef60f9a3bb40fc331ce1a1544fdc77488d20ca3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
In Qt 5, I managed to break the guarantee that a deserialised local
datetime is the same time of day (potentially different UTC time),
regardless of which timezone it was serialised in. This happened after
I fixed QTBUG-4057 with If650e7960dca7b6ab44b8233410a6369c41df73a,
which serialised datetimes as UTC.
This patch reverts QDateTime serialisation to pre-Qt 5 behaviour to
restore the guarantee and consequently re-opens QTBUG-4057.
Change-Id: Iea877f7ed886f530b928067789b53534e89fe8cb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
in QDBUSXML2CPP_INTERFACE_HEADER_FLAGS and QDBUSXML2CPP_ADAPTOR_HEADER_FLAGS.
Change-Id: Ibbe812fbe4912acfd2c9721b5193727ae0c0ade3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This patch adds SizeAdjustPolicy to QAbstractScrollArea.
If it is set to AdjustToContents it will make use of the new
protected viewportSizeHint() (BC since it was reserved in Qt5).
This function returns a suggested size based on contents.
Change-Id: I5d8aa517e88b8b21c5712e62b4d574c3aad99d3b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
CONFIG += link_highest_lib_version
Task-number: QTBUG-15596
Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The rubberBandRect function is nice to have, but this patch
makes it easier to track the rubber band by emiting a signal
on change.
That makes it easier (and less clumsy/hacky) to show information
related to the rubber band.
Change-Id: If65eb85d743a1804be3fdb823a821423411e9745
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
In many situations it is handy to know the rubberband rect.
There are many situations where we want to show something
related to the rubberband.
Regardless how that is done the rubberband area is needed.
(Not having this is a flaw that can force people to do make
a customized rubberband just to get this information)
Change-Id: Ia854db4c0022b6a97b150af2b4bb78fd5e974991
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
this makes it possible to exclude modules from the build without moving
their sources out of the way. substitutes the much-requested -no-webkit.
not adding a symmetrical option, as it is relatively pointless:
to build only specific "leaf" modules, you only need to run
"make module-qt<module> ..." once you configured. and removing
particular "intermediate" modules is achieved with this very option.
Task-number: QTBUG-26697
Change-Id: I25cebdbd029885a2c653c4cde696f9bb78691768
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Inherits QSurface and allows to use OpenGL from an arbitrary thread.
Platform plugins can implement QPlatformOffscreenSurface, otherwise an
invisible QWindow is used by QOffscreenSurface.
This patch includes an implementation of QOffscreenSurface for XCB
and EglFS platform plugins using pbuffers.
Change-Id: I57b4fc1db417331f34826dcfa754b7698782fde4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
$$(FOO) would automatically split the contents of the environment
variable at whitespace (and interpret quoting inside it). the way to
prevent the splitting (but not the quote interpretation) would be using
"$$(FOO)".
this behavior is entirely unexpected and thus an incredibly effective
source of quoting problems - according to a grep over the whole qt
sources, there isn't a single case where things were done right. in qt
creator, well over half the cases are wrong.
also, the "feature" seems entirely pointless: nobody uses spaces as
separators in environment variables.
consequently, simply remove it, even in a patch release. i'm postulating
that nobody will complain.
Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This is possible with QWeakPointer, so allow it for migrating
code too.
In the process, replace the QPointerBase with a member variable for
simplicity. The functionality of the QPointerBase is replaced
by a TypeSelector template.
Change-Id: I3b4c77bdeda2b863cc33e84a3da8a25bae928c8c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
That resulted in error such as:
qobject_impl.h(82) : error C2078: too many initializers
This should have been tested by tst_QObject::connectManyArguments, but
the test did not work because the detection of defined QMetaType was broken
for const references. That will be fixed in a latter commit.
Task-number: QTBUG-29130
Change-Id: I78514c251358c0e8adf33af724d87ab114230cd3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It may be useful to know which named capturing groups are defined
in an regular expression, and for each of them, what's the
corresponding index. This commit adds the needed method
to QRegularExpression.
Note that extracting the information doesn't happen while holding
the mutex in the private -- pcre_fullinfo just reads information
from the compiled pattern, so that's thread-safe.
Task-number: QTBUG-29079
Change-Id: I50c00ee860f06427c2e6ea10417d5c0733cc8303
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
This reverts commit f15a73f254.
The note has been there for the 5.0.0 release, so it should now
be removed.
Change-Id: I8744f74834cc87002aa590de9c258f544bcf0c9b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Drop the read and write permissions for group and other users in the
system.
Change-Id: I8fc753f09126651af3fb82df3049050f0b14e876
Reviewed-by: Richard J. Moore <rich@kde.org>
QMessageAuthenticationCode is HMAC implementation based on
QCryptographicHash abilities. HMAC is often used in OAuth and similar
authentication protocols.
Change-Id: Ifc73947ad06c36a1b770315b7e89ba5c01c5e79e
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoid runtime dependencies to e.g. libpwinthread-1.dll, libstc++-6.dll.
This prevents Qt Creator from spitting out error dialogs on each startup
for registered MinGW versions that aren't in the default PATH.
Change-Id: Id55518db8c8e0521b6a41add1eaf38f75a892c8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Provide addition/subtraction for QMargins as well as
multiplication and division for int/qreal similar
to QPoint. Add unary minus.
Change-Id: If4eb831cfd610b34b5ca361619b1636031811d0a
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
- Addition of a QMargin to a QRect.
- Removal of a QMargin from a QRect.
- Remove implementation from Windows platform plugin.
Change-Id: Iae54bc13e94a7ece48853b1d3f3de2bfc154d2dd
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
This patch allows single selection to be cleared with the normal
control modifier. This affects e.g QTreeView and QListView.
Task-number: QTBUG-8836
Change-Id: I7fd50b987acc3552b36657409568192763257536
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
it's completely broken, and i have no time to fix it properly now.
configure runs no qmake -r by default any more, so it's fast enough.
Change-Id: Ib2b4c68f1fc2fe95accecbe93dd5a87c9b015692
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This increases consistency a lot: all windows and dialogs from a Qt
application will show the app display name in the caption, on Windows and X11.
This helps identifying which app a dialog belongs to, which is especially
useful when the dialog is very generic and shows up unexpectedly.
For compatibility reasons, the app name is added to the caption only
if setApplicationDisplayName() was called -- or if the caption would be
completely empty. The standard Qt4 case (setWindowTitle + no display name)
is unchanged.
Change-Id: Ib284c62c1f4c0bc923e5bc2d10247d95e9aa76c1
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
For two reasons: 1) those operators are gone and 2) the ones that remain
are atomic.
Task-number: QTBUG-28532
Task-number: QTBUG-24627
Change-Id: I1e9d1b076d923546c1ee3d45f312066590f97416
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
We do not want to ship them anymore.
Change-Id: I62ac985cdf3f6d13327d1fd88262cc60efc4a230
Reviewed-by: Hanne Linaae <hanne.linaae@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
They are completely unused in Qt, and are a potential source of
compilation errors in application code.
Change-Id: I6dfe2891f3b2365a30048f99c31e8e3a2425e62b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Since QtOpenGL/QGLContext is implemented in terms of
QtGui/QOpenGLContext which has stricter requirements about how it's
supposed to be used, we need to apply these requirements to QGLContext
as well.
This change adds QGLContext::moveToThread(QThread *) and documents it as
a necessity for making a context current on another thread.
Also introduces QGLPixelbuffer::context() to access the QGLContext of a
pixelbuffer, and made QGLWidget::context() return a non-const
QGLContext, since there's no good reason why it shouldn't, and it leads
to less const_cast clutter.
We could have introduced a backdoor in QOpenGLContext instead, making it
loosen its requirements, but that would have made it harder / impossible
to fully support threaded OpenGL in all the platforms.
Task-number: QTBUG-22560
Change-Id: Ibb6f65f342e7c963e80cc42ab5664c5f1cab30b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
QSessionManager was already in QtGui, but not usable since the only API
to get to it was still in QtWidgets. Session management isn't related
to widgets, it also applies to QML apps on the desktop.
The virtual commitData and saveState methods have been removed,
given the two signals which exist since 4.2, and an additional
isSessionSaving() method was added instead.
Change-Id: I8099e70df133303e74456706827da21f013fcc6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Some of them were incorrectly spelled (for a while)
Change-Id: I871968e3bbdd2172f4c4dfb6e74729c05e7e8e01
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
These Qt3 legacy application types do not match the application types
available in Qt5. Thus, the decision was to kill the confusing and
mostly useless type enum. Use for example qobject_cast instead to find
out the application type.
Task-number: QTBUG-28093
Change-Id: Ia8cf7c3ea98a3cea27f74760d62e519ea10bce9f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
We will in any case not be able to support this in Qt 5, so best to just
remove it to not give any false impressions.
Change-Id: Ib52e86007b9e6483bd973f13502b078792a9fa40
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Print Engine key PPK_SuppressSystemPrintStatus was added in Qt4.1
for Cocoa dialog to suppress the progress dialog. In Qt5 all cocoa
code has been removed and this key is now unused.
Change-Id: I3a91e9651e16f81611a9a736163f76acf9f20096
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Since the behavior of boundaryReasons() method has been changed a lot,
remove the StartWord/EndWord enum values to force the affected code be revised;
StartOfItem/EndOfItem must be used instead.
Change-Id: I3d1d97d2dbe9680d290646d8c3adb5558ca26bd7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
Qt::WA_MergeSoftkeys
Qt::WA_MergeSoftkeysRecursively
It also removes some "zombie" enums:
Qt::WindowSoftkeysVisibleHint = 0x40000000,
Qt::WindowSoftkeysRespondHint = 0x80000000,
(The only implementation that used these were removed when
qapplication_s60.cpp and qwidget_s60.cpp were removed.)
Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
There is no reason to emit this when there is no change.
Change-Id: I34f0ceec7c4b0959b77bc5be3ce2c2ad55864598
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Some widgets users could get the picture that nothing has
happened in that area. So lets at least write that something
has been improved.
Change-Id: Ic314ab06d28e687986a8ab472d8b58830cb0ad90
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
This change does not affect source code compatibility. Therefore
it is mentioned in the general section.
Change-Id: I81ea30d18b01de69322d9527d0c2775b37d1d196
Reviewed-by: David Faure <david.faure@kdab.com>
We have a new style Fusion that will replace these styles.
They will be moved to a separate
module rather than included in platforms that do not need them.
Change-Id: I51ebbcad5406e99130e5b12e62ba624d1489088c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Use the Qt4CompatiblePainting render hint when painting with QPainter to
treat default constructed QPens as cosmetic still.
The NonCosmeticDefaultPen render hint gets documented as obsolete, since
it was in any case not respected by the raster nor OpenGL paint engine.
Change-Id: I04d910e9700baf7f13a8aac07a3633014bb9283e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
The signal is removed from the API; all references to it are removed
from documentation; the unit test that checks for its emission is
modified to listen for QThread::finished() instead.
The QThreadPrivate::terminated flag is also removed, as it served no
purpose other than to trigger the emission of QThread::terminated()
As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html
the signal is not guaranteed to be emitted after every termination,
rendering it useless.
Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This is being changed because:
- The OpenGL paint engine in Qt only supports GL2
- QML2 only supports GL2
- QSurfaceFormat has a default value of 2
Applications that want to use GL1 on a QGLWidget will have to
explicitly request this format using QGLFormat::setVersion.
Task-number: QTBUG-27589
Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Qt 5 is the time to get rid of all the old inconsistencies in the raster
paint engine caused by trying to preserve the old X11 based
coordinate system where (0, 0) is in the center of the top-left pixel
instead of the upper left corner of said pixel. However, this was only
adhered for line drawing and path / rect filling, and not for image or
pixmap drawing and not at all when doing antialiased painting. By
defining the antialiased coordinate system as being the right one and
letting the aliased fill rules follow from that we finally end up with
some consistent behavior that doesn't lead to surprises and workarounds
in application code.
It is still possible for applications to get the old behavior by
setting the QPainter::Qt4CompatiblePainting render hint. This should
make porting easier for the few cases where an application relies on the
aliased fill rules we used to have in Qt 4.
Task-number: QTBUG-27500
Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Add BoundaryReason::BreakOpportunity flag that will be returned by the
boundaryReasons() when the boundary finder is at the break opportunity
position that might be not an item boundary.
This is the same as (StartWord || EndWord) in Grapheme and Sentence modes;
in Word and Line modes, BreakOpportunity flag might occur between the words
or in between of Line boundaries (e.g. in conjunction with SoftHyphen flag).
In other words, the text boundaries are always break opportunities, but not vice versa.
StartWord and EndWord flags has been deprecated by new StartOfItem and EndOfItem
flags which are not about the word boundaries only. In line breaking,
StartOfItem and EndOfItem are set for the mandatory breaks only.
Change-Id: I79bf297e2b988f5976f30cff0c8ca616385f6552
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>