Avoid dereferencing the q-pointer if the button has been
destructed meanwhile popup was open.
Task-number: QTBUG-26956
Change-Id: I68190e9fe84c669229ae0ce4d573ee7a02a8a141
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This patch cleans up the coding style and includes
Change-Id: I710d4a60795e9975d4f8ee79599018e05d85debe
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
The fixme comment is invalid since QAccessibleWidget actually checks for
isWindow and sets the active state.
This is messed up because in Qt 4 there was a work-around to set active
for windows in a different code path.
[ChangeLog][QtGui] Accessibility on Linux now reports the active state
correctly.
Change-Id: I9e2cf436b3ffa7ef28286ee49d6e582f179930c6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
They cause test failures from time to time.
Change-Id: I917bef340401d25bf54e133be9d9562b3b133c9f
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Use correct parameters for \enum commands, and add documentation
for QOpenGLTexture::Filter enumeration.
Task-number: QTBUG-35576
Change-Id: If7099da0b2b570c28e683126f0ba3a885d80f741
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Passing a constructor as second argument to foreach didn't work when
building with gcc.
For MSVC this already worked as a different foreach implementation is
used.
Change-Id: Id98444c699b4cebc14ea62076c5f7cba33ffb824
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Better late than never :)
Task-number: QTBUG-33749
Change-Id: I5035255e66a56754b609441f5b81ab119565a7cb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
'styles' are only defined in the qt build internals, when the
examples are compiled inside a configured Qt source. That's not
the case for the examples e.g. in the Qt SDK.
(windows is a default style on all platforms, anyway. So I
think the check is superfluous in the first place.)
Task-number: QTBUG-36655
Change-Id: I7114619efd479408dad99c8514f8e33ddcab7c7c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Remember the engine index for each sub-item and avoid moveGlyphData()
where possible (ie. when there are no glyph indexes to care about).
Also don't memmove data we didn't ever initialize.
Change-Id: Ib8e5fd937a10e4e3c8c0e18961a2e2c1a4167924
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The old code wasn't good enough to catch all the glyph (de)composition cases,
thus leading to an assertion in QTextLayout's addNextCluster() helper.
The new code catches all the corner cases and introduces somewhat
better performance to the HB-NG shaper backend.
Change-Id: I5b6c673395a4a039dc55b200abbf74b0ba5d0829
Reviewed-by: Ahmed Saidi <justroftest@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
The RGBA8888 formats was incorrectly using the qt_gradient_quint32
which is argb specific. This caused vertical gradients but only
vertical gradients to be drawn incorrectly.
This changes the RGBA8888 formats formats to use the generic gradient
method and renames qt_gradient_quint32 to qt_gradient_argb32 to
indicate its limitation.
Change-Id: Ia1cd48ca7f4f78b64f31d6263e81cd8ac3b0954e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
RGBx8888 to ARGB32_PM is incorrectly using the RGBA8888 to ARGB32_PM
which asserts the input format is RGBA8888. Since the routine also
performs an unnecessy premul, we should be using a the generic rgba2argb
routine.
Change-Id: I7b67328f804f5f2a9664a35c04836679e8c8b8e5
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
The XDG specification for file URIs requires us to use triple slashes in
file:/// for URLs with absolute paths. I don't like special-casing any
particular scheme, but we've done it for file for many years now.
Since we need to test this situation in a couple of places, it's easier
to just cache the result once, in setScheme (both functions).
Change-Id: I078b45b5b6c861f4caee082b4730fd6f67684ae4
Reviewed-by: David Faure <david.faure@kdab.com>
NVDA for example reads name and value, so that most of our
accessibles would lead to the same text being read twice in a row.
Instead use Name as that's best supported on all platforms.
[ChangedLog][QtWidgets] Fixed accessibility issues that would lead to
screen readers reading the same text twice.
Task-number: QTBUG-36678
Change-Id: I6c5c9cdcf5392c7135a65bd30f87a590c3c07fb4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
The basedir xdg spec says:
"All paths set in these environment variables must be absolute.
If an implementation encounters a relative path in any of these variables it
should consider the path invalid and ignore it."
Therefore we ignore relative paths including the empty string.
Change-Id: I8f779b78981018051b16de23b2514f2e62b7ab39
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_QDir::tempPath already checks that there is no trailing slash.
Except of course when the path is "/" or "C:/", but we can't do much
about that unlikely corner case.
Change-Id: If71d5de1aeebc6720348cecbf659b7fceb83fb0e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This is a no-op because QDir::cleanPath() already takes care of removing
the trailing slash.
Change-Id: Ic19d9a9dd7e377e04447c3ebc776b025f5f0c43a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
The slot object was deleted after the mutex was relocked, which caused
a deadlock in case the functor destructor locked the same mutex again.
Change-Id: I5b4fb22fdb4483f91c89915872bfd548c31b0eea
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
In KDE, without this patch, the Q_ASSERT in the following code fragment
fails:
QFileDialog dialog;
QStringList list = QStringList() << "c (*.cpp)" << "h (*.h)";
dialog.setNameFilters(list);
QString filter("h (*.h)");
dialog.selectNameFilter(filter);
dialog.show();
Q_ASSERT(dialog.selectedNameFilter() == filter);
The reason for the fail is that the selectNameFilter() does not properly
propagate the filter to the QPA plugin. So the first part of this patch
adds d->options->setInitiallySelectedNameFilter(filter); in the function
QFileDialog::selectNameFilter().
The second part of this patch makes sure that the initially set name
filter in the QFileDialogOptions "options" is not overwritten in the
helperPrepareShow() function. This is achieved by adding an if(),
following the if() for the initiallySelectedfiles() the line below.
With this patch, the Q_ASSERT() holds true in KDE Framework 5's
file dialog integration.
Change-Id: I15d8c88a0fa3cdc03e3330f3458bbad139a71212
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
For consistency with all other sources of paths, which do not return
a trailing slash, as tested by the unittest. This avoids double slashes
in paths, after apps append something to the path.
Change-Id: Iabcde11eee27df0b185780e2b655fbbb02ed63b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtGui] Windows Accessibility now handles the disabled state
of widgets correctly.
Task-number: QTBUG-36603
Change-Id: Ifebcf44320072089da66e81728de94e8f12a3354
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Parse first for 'mmsize' because the regex for 'size' also fits to 'mmsize'.
Task-number: QTBUG-29133
Change-Id: Idc4950270818e496d5d94a97a172b7c780f069b1
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
If DMPAPER_USER is set from the print dialog then it is expected that
the specific member variables to get the custom width and length are
used. The size returned by querying the DC_PAPERSIZE is some random
default and is not the one actually requested by the user.
Also ensure that when it is a custom paper size from the driver
itself that we store the right paper size.
Change-Id: I760b8429ca1b01f5e303f2111b8d7ca1795c8ab8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Unlike the newer QOpenGLFramebufferObject, QGLFramebufferObject still
contains some unfortunate tests for !IsRenderBuffer when creating
renderbuffers. Removing these tests avoids asserting in debug builds
on drivers that are not conformant to the GL spec in this respect.
This means that the qgl autotest is now passing on such drivers too.
The tests do not make much sense in the first place since Qt is not
a conformance test suite.
Change-Id: I21d6272cd5cef9dd71eab57e46771d3ce7dacbfb
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
It's not "preliminary" anymore, and it doesn't return a QPlatformWindow,
but a QWindow.
Change-Id: Iaa1938728e689d97011dce8cf0d88ff8cb4a83b9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
[ChangeLog][QtGui] Accessibility on Linux reported all objects as being
editable instead of just editable text items.
Change-Id: I8bca2799a2e5b175b3ca515fee5dd02eae23829e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Adding device mask verification for static device discovery.
DRM devices are no longer scanned if mask is set to input devices only
Change-Id: Ibd2e77280c2d93c707ba7bdb84c4ae3cb0932178
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Querying GL_MAX_SAMPLES is not supported in GLES2.
Avoiding the call also makes us play nice with Mesa in debug
mode since it gets rid of the warnings about the failing
glGetIntegerv call.
Change-Id: I05e501cc11af41a54fefc34ab919c5191e4f3f0a
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2d05d3bd28 was not correct.
On OS X, when user uses CJK input method, only types single punctuation,
it was converted to CJK ones, and not showed in composing text.
Task-number: QTBUG-35700
Change-Id: I2d1063d2f837d075929dc5ebb5722fdefc6ee0f6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Enable non power of two texture support for non compatible NPOT GPU.
If the context does not handle NPOTTexture feature, the image to bind is scaled to POT size. It works with OpenGL ES and Desktop version.
It is actually almost the same code as the one in QGLContextPrivate::bindTexture.
Change-Id: I6f0f511165c9e171a14f4ba6ba0b7a902e590cf6
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This fixes a serious regression from
7d72516b52.
[ChangeLog] QFileSelector: the identifier for OS X has been changed back
to 'osx' from 'mac', and 'mac' and 'darwin' have now been added as
selectors for Darwin OS (which is the base of both OS X and iOS).
Task-number: QTBUG-35073
Change-Id: I83183e34c5a697338cc1ddcac33a41bd379ded12
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
This bug causes that Cascades QML application cannot open more than
system ulimit defined number of different asset:///*.qml files.
The realFile is ordinary closed in the ~QNetworkReplyFileImpl(),
the QDeclarativeTypeLoader::::networkReplyFinished() calls
reply->deleteLater(). There are tricky situations when event-loop is
not entered and too many read already files are waiting for close.
This patch close() file when all the data is read. It can be done
this way since the QNetworkReplyFileImplnetworkreply is a sequential
device.
For more info, please, read comments on QTBUG-36032
Task-number: QTBUG-36032
Change-Id: I4002f21b4b0c7350af48b0dc6530d9606fd2794b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
KDE calculated colors weren't set correctly rendering all calculated colors
"Light", "Midlight", "Mid" and "Dark" as black.
Issues fixed:
* QFrame with frameStyle Box|Raised didn't look raised but
instead just black border.
* QMdiArea had black background
* QToolBox separators were just black
Change-Id: I5e06bafe280f73af12f23960ae68a8b35e8549ac
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Kimmo Leppälä <kimmo.leppala@digia.com>
When changing a filter so that a previously empty proxy model becomes
populated sorting was not applied correctly.
This was caused by using mapToSource for getting source_sort_column
from proxy_sort_column. For an empty proxy model this won't work because
no valid proxy index can be created in this case.
We now directly use the root index column mapping instead by doing
essentially the same as QSortFilterProxyModelPrivate::proxy_to_source
but without the sanity checks needed for external use.
The sorting feature of QSortFilterProxyModel has always assumed that
the number of columns is specified by columnCount(QModelIndex()) so
the behavior doesn't change.
[ChangeLog][QtCore][QSortFilterProxyModel] Fixed sorting when a
previously empty proxy model becomes populated because of a change in
the filter.
Task-number: QTBUG-30662
Change-Id: I21322122e127889dfadc02f838f0119ed322dcab
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>