Commit Graph

16579 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
15f3191981 Fix drawing vertical gradients in RGBA8888 formats
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>
2014-02-10 23:02:47 +01:00
Allan Sandfeld Jensen
2a3f635953 Fix assert when converting RGBx8888 to ARGB32_PM
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>
2014-02-10 16:22:52 +01:00
Thiago Macieira
fbc554b42c Make QUrl::isLocalFile fast by storing a flag
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>
2014-02-10 16:20:49 +01:00
Frederik Gladhorn
7f0d6c4529 Remove useless if
Change-Id: Ide9f06b71159e86fdd2aa178cd3aa0ab2faf5d2c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-02-10 11:19:21 +01:00
Frederik Gladhorn
b96c075d22 Accessibility: Fix reporting the same name/value twice
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>
2014-02-10 11:01:15 +01:00
David Faure
c8eb6d99d4 Doc: fix typo in QDebugStateSaver docu
Change-Id: I12e0a725141a570903004c63369c991d383ac82c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-10 11:00:41 +01:00
David Faure
9ce3b0d953 qdoc: fix memory leaks, unchecked open(), hardcoded path - in debugging code
Change-Id: I3b065dd18f60214a858543d062dfb2f0f1dc1b36
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-02-10 11:00:41 +01:00
David Faure
5c9d671bfb QStandardPaths: fix empty path in XDG_DATA_DIRS being treated as '/'.
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>
2014-02-10 11:00:41 +01:00
David Faure
4965cf78c1 QDir::tempPath: clarify trailing-slash situation.
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>
2014-02-10 11:00:41 +01:00
David Faure
36af7fe678 QDir::tempPath: make fallback code more readable.
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>
2014-02-10 11:00:41 +01:00
Thomas McGuire
6f5db32abe Don't deadlock when deleting slot objects in QMetaObject::activate()
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>
2014-02-08 14:32:53 +01:00
Dominik Haumann
f34b7f42e5 QPA fix: allow setting the initially selected name filter (KDE)
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>
2014-02-08 10:56:06 +01:00
David Faure
85498fdede QStandardPaths: remove trailing slash when reading from user-dirs.dirs
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>
2014-02-08 10:53:55 +01:00
David Faure
3e8af132df QStandardPaths: ensure that paths use '/' on all platforms, as the comment said
Change-Id: Id70b5e92c07f63e71e7a1a8fb229f927d352ebdd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-08 10:50:25 +01:00
Frederik Gladhorn
b6b503fb68 Accessibility Win: handle disabled state
[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>
2014-02-07 16:43:23 +01:00
Peter Kümmel
99979159a4 Fix linuxfb argument 'mmsize' parsing
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>
2014-02-07 16:43:23 +01:00
Gabriel de Dietrich
3f5060a601 Compose: Fix assert for non-UTF8 locales in table generator
Task-number: QTBUG-35770
Change-Id: I8aaea66e8d70edf7ab401f2c6dfb849d309ff6af
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-02-07 16:43:23 +01:00
Niels Weber
6adf515e33 Small doc fix.
Change-Id: If700cce1b39342ca2b1027e2c10711ea45c3dd9c
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-07 13:24:26 +01:00
Andy Shaw
c8172953ed Fix printing with a custom paper specified.
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>
2014-02-06 17:27:37 +01:00
Nico Vertriest
845716d629 Doc: corrected description of QTableWidget::clear()
Task-number: QTBUG-36329
Change-Id: I3a78311bcb076b414ecf1ecf866e4ed60c391126
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-06 17:15:38 +01:00
Andy Shaw
c36aa88683 Fix the docs on when setDocument() deletes the previous document
Change-Id: I08d162a1c1e1765213205e63183ed75b2491374d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-06 17:11:17 +01:00
J-P Nurmi
65bd80ebfc QTabWidget: fix moving of the current tab
Task-number: QTBUG-36455
Change-Id: I38687283d60fe38a4b586b064d5ddd4ed3be06b6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@me.com>
2014-02-05 23:04:04 +01:00
Laszlo Agocs
2c1e77506c Do not check for !IsRenderBuffer
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>
2014-02-05 21:51:57 +01:00
David Faure
f0d135a6be Doc: fix documentation for QWidget::windowHandle.
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>
2014-02-05 18:41:26 +01:00
Frederik Gladhorn
113cfa9aa6 Accessibility Linux: Fix all widgets reporting being editable
[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>
2014-02-05 14:16:56 +01:00
Cedric Chedaleux
c6d3fe8873 Checking input mask before scanning evdev devices
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>
2014-02-05 13:46:46 +01:00
Laszlo Agocs
2d67bf07fe Do not query max samples on gles
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>
2014-02-05 13:46:41 +01:00
Frederik Gladhorn
760ad40700 Make QWindowContainer accessible
Change-Id: I93451b8842648db0815c96d64d319daecb45f0de
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-05 13:33:47 +01:00
Rafael Roquetto
bb9dd25843 QNX: fix wrong coding style
Change-Id: I84b166ee528b7d586f1901e6bfda999ef698c3fd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-02-05 13:07:00 +01:00
Andy Shaw
060b853a2f Actually print when the tester pushes the print button
Change-Id: I5c995938a74f720be5beb33160488ec1ec73c0ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-05 08:51:55 +01:00
Friedemann Kleint
09e53c8b6e Plugin minimalegl: Remove superfluous keys() function.
This is no longer needed in Qt 5.

Change-Id: I10a2b893fdc822a526abc19c3d1f0f2538de0d83
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-02-05 08:50:19 +01:00
Liang Qi
839997adfa Cocoa: fix single punctuation input via CJK input method
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>
2014-02-05 02:35:11 +01:00
Cedric Chedaleux
96b7ac569c NPOT texture support in QOpenGLTextureCache
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>
2014-02-04 21:34:58 +01:00
Jake Petroules
fdef360bad QFileSelector: correct the macros for Apple platforms.
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>
2014-02-04 19:36:58 +01:00
Frantisek Vacek
cc88e6e92c QDeclarativeTypeLoader doesn't close processed QNetworkReplies
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>
2014-02-04 16:17:01 +01:00
Kimmo Leppälä
cd820569dc Fix KDE calculated colors being all black
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>
2014-02-04 16:01:26 +01:00
Frederik Gladhorn
49f30168c0 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-02-04 10:37:11 +01:00
Sze Howe Koh
8bb5dba0cb Doc: Fix broken links
Change-Id: Ic275dfbf0b332fc34ea0fac1c31c4935ad961527
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-04 01:30:24 +01:00
Nils Jeisecke
6894bc0f3f Fix sorted QSortFilterProxyModel filter update
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>
2014-02-03 22:12:20 +01:00
Alex Montgomery
72259baa76 Fixed duplicate QMoveEvent generated for each QWidget::move call
Removed QMoveEvent generating code from QWidgetPrivate::setGeometry_sys
for widgets with native window handles. A move event is already
generated for them by QGuiApplicationPrivate::processGeometryChangeEvent.

Task-number: QTBUG-32590
Change-Id: I73313a012851516047ac017f1e15a21774d8ffe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-03 20:31:13 +01:00
Frederik Gladhorn
899604af55 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I625c46b86491fee66d39494d1466b2d616ea7380
2014-02-03 17:26:01 +01:00
Thiago Macieira
71eb4d4939 Fix compilation: testBit is only used if mtdev isn't
qevdevtouch.cpp:160:20: error: unused function 'testBit'

Change-Id: Idd9eee9b916c694bdfb963c00eeb0eaaf5618d40
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-03 17:12:48 +01:00
Andy Shaw
cfa8fcdda0 Ensure the text is not cut off when shown under a toolbutton icon
Change-Id: I82cfa549b9db9439ab03123ddf73e5f2d001738e
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2014-02-03 13:52:59 +01:00
Allan Sandfeld Jensen
f34e080063 Fix access after delete with Harfbuzz NG code path.
Remove reference to released font-engine so we don't risk returning it
later.

Change-Id: I741a741567a079818c7f414ac1f9c0b5a9677322
Task-number: QTBUG-36522
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-03 12:13:22 +01:00
Shawn Rutledge
64d95e3df2 OSX: FileDialogHelper uses options to remember the selected filter
Task-number: QTBUG-35958
Change-Id: I998cf93232e79f70837cfa8f63592b69ea0dc563
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-03 07:49:51 +01:00
El Mehdi Fekari
61e1bcb4dd QLogging: Avoid infinite loop in error case
If the user code installs a message handler that uses
any API that prints logs (handled by qt_message_print)
then this will lead to an infinite loop.

This patch adds a thread local storage to check
if the message handler is done before the thread
is calling it again.

Note: This check is performed only if the compiler
supports thread_local (__declspec(thread) for MSVC).

Change-Id: I43b0460b8f39b26a18de48a5652a5e55f0b336f8
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-02-02 19:01:26 +01:00
Giuseppe D'Angelo
e5fd241770 Fix QByteArray documentation w.r.t. QString-related methods
There's no loss of data when converting a Unicode string to UTF-8,
so don't state that in the docs.

Change-Id: If26914ec674a994d9c59136448e8e4292d0412e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-01 21:34:00 +01:00
Peter Kümmel
404a84e411 CMake: don't require GL when build with -no-opengl
Task-number: QTBUG-36509
Change-Id: I03451527ab91754d87ff2a43985952c7c7641826
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-01 15:44:02 +01:00
Thiago Macieira
7e5b3e57e3 Add the default argument for the new connection syntax
Task-number: QTBUG-36549
Change-Id: I3addacf4b0698df91960f7b8e9c2ed93e935f848
Reviewed-by: Branislav Katreniak <katreniak@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-02-01 06:37:49 +01:00
Mitch Curtis
1d5ee90969 Update some more screenshots in qtbase/examples/widgets.
The screenshots were taken on Windows 7 with the Aero theme.

Change-Id: I2517664e25389f4fb87408daec7b720dfb785bf0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-01-31 16:18:07 +01:00