Commit Graph

23259 Commits

Author SHA1 Message Date
Marc Mutz
f9063758cb Add qHash(QUrlQuery)
QUrlQueries can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QUrlQuery] Added qHash(QUrlQuery).

Change-Id: I626258a938359b49a0cae02012b6cba5ef1fe784
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-20 07:41:56 +00:00
Marc Mutz
5fdc64f566 Add qHash(QList)
QLists can be compared for equality, so qHash should be overloaded, too.

[ChangeLog][QtCore][QList] Added qHash(QList).

Change-Id: I9ad91811f12479764cc17d87192539612ceb0b4c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:44 +00:00
Marc Mutz
1b5f29e28a Remove <qhash.h> where it's not used
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.

Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:34 +00:00
Marc Mutz
103086e379 Replace <qhash.h> with <qhashfunctions.h> where applicable
To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5)
in public headers.

Change-Id: Ic3398f4f330e15a3b55065858add26b90fd70e6c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-20 07:41:27 +00:00
Marc Mutz
ab8366b592 QList: remove (const_)iterator copy ctors
The compiler-generated ones are just fine.

Change-Id: I528431040552326dad043b3b8d0db6af8146d3d2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-17 09:46:15 +00:00
Milian Wolff
7f82b9258e Ensure the UTF-8 string for a xcb_keycode_t has the correct length.
On my platform (Archlinux, libxcb 1.11-1) and a recent build of Qt dev
I noticed that writing anything to a QLineEdit was broken, as not only
the character for the pressed key was inserted, but also what looks
like whitespace. A simple debug program showed that a "\u0000" is
appended to every character in the QString text associated with a
QKeyEvent, which brought me to QXcbKeyboard::lookupString.

The QByteArray to QString conversion using QString::fromUtf8 includes
the \x00 byte at the end of the buffer.

By leveraging the size returned by the xcb API and passing that to
QString::fromUtf8 we can prevent this problem from arising.

Change-Id: Ic1d4390e4154e9ed729cd23286811d6eecdf54f6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-17 01:08:49 +00:00
Allan Sandfeld Jensen
a7303e45db Move composition out of qdrawhelper.c
Also changes the way the SSE2 composition modes are inserted into the table,
so it is handled like all the other tables and doesn't require duplicating most
of the table.

Change-Id: I8de383caece0367bc7466d7a1b145aa820c3bd6a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-16 11:23:20 +00:00
Alexander Volkov
6c3937c339 xcb: Remove unused qxlibconvenience.{h,cpp}
This is dead code since 05351b0cde.

Change-Id: I6ea37046f48bedf85730c5e5a6dc27e08de4de54
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2015-04-16 09:35:15 +00:00
Allan Sandfeld Jensen
95f694682e Implement radial and conical gradients for rgb64 rendering
Adds the last two missing source types to rgb64 rendering.
Conical and radial gradients. At the same time linear
gradients are moved to a template form to increase code
sharing.

Change-Id: I30fdd0837b0da03e3447683856ebbe4d7f48df6c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-15 19:34:04 +00:00
Allan Sandfeld Jensen
ac659cd203 Extend high color rendering to image rendering
A previous commit added 16-bit per color-channel precision to
solids and linear gradients. This patch extends that to include
texture data.

To support that pixellayouts now have a method to convert to
RGBA64.

Change-Id: I661ae91bd7038085787003608a0af4add057e478
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-14 09:37:47 +00:00
Alex Trotsenko
3610513450 QAbstractSocket: virtualize options setting
Some kinds of socket options can be applied only to newly created
descriptors. However, a current QAbstractSocket implementation proceeds
to actions immediately after the socket layer initialization. This
disallows a socket tuning in further inheritance.

Add a private virtual configureCreatedSocket() method that gives an
ability to set the socket options before binding or connecting.

Change-Id: I2d858a400cd46ae7fe5bf0b8900220f6121d0132
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-04-13 20:23:31 +00:00
Alex Trotsenko
1e01be433d QTcpServer: add debug messages to c'tors and d'tor
Change-Id: I257098967a18daf4f9ccd10641fe11c654cc3549
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-13 20:10:45 +00:00
Allan Sandfeld Jensen
5c7d2d1d67 Add support for more composition modes in rgb64 rendering
Change-Id: I3bacecbabdf2d7b2de1acd86ab9383e69924a390
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-13 19:14:52 +00:00
Allan Sandfeld Jensen
29380121ef Fix RGB30 painting tests
Some tests were failing because the color was not read correctly from
a QImage. To make it possibly to read more accurate colors a pixel
accessor returing QColor has been added.

Some tests also had the wrong order of arguments, confusing dest and src
formats. This has been corrected, so they test what they claim to test.

A test for RGB30 linear gradients is also added.

Change-Id: Ic623ae1b8e0bf7383056b641c6e8230a1d7dd0dd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-13 13:01:45 +00:00
Martin Smith
1d91d155f2 qdoc: Changing InnerNode to Aggregate
An Aggregate node is a tree node that is not a leaf.

Change-Id: I4a3964865fb653a217ee75d0b21e563f7f990a1c
Task-number: QTBUG-45450
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-04-13 12:28:00 +00:00
Giuseppe D'Angelo
16c32710bc QPointer: add a static assertion to help the user when using a wrong template type
Sometimes people mistype QPointer<Foo *> when they actually must
use QPointer<Foo>, add a static assertion for an improved error message
(rather than the usual weird template mess).

Change-Id: Ic77e3e752ac1906b94f3432eaededf0f7a2737be
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-04-11 22:09:30 +00:00
Bjoern Breitmeyer
11bd02e4c2 Fix WEC2013 build of harfbuzz-ng
Errno is available on WEC2013 and the locale setting isn't
necessary either.

Change-Id: I648d03d842c17b04afdd2d89674119ce020769a4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-04-11 12:54:00 +00:00
Martin Smith
8a2645b8f0 qdoc: More data member name changes
In preparation for refactoring the Node class hierarchy,
the names of a few enum types and the functions that set
and get them are changed so that they will not be confused
with other uses of the word Type.

Change-Id: I0496b46e5d7adffccadcb464aedb2806728e781d
Task-number: QTBUG-45450
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-04-11 10:25:14 +00:00
Olivier Goffart
02a13a86fa Allow for rearranging tabified QDockWidgets
Allow to drag and drop tabs

[ChangeLog][QtWidgets][Important Behavior Changes] The tabs
for the tabified docks can be moved by the user.

Task-number: QTBUG-1049
Task-number: QTBUG-2295
Task-number: QTBUG-4532
Task-number: QTBUG-18883
Task-number: QTBUG-35148
Change-Id: I7ef9d4987db081654bd5d648e14370b3d381a720
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2015-04-11 09:26:56 +00:00
Allan Sandfeld Jensen
60e8519544 Solid and gradients in high color accuracy
This patch updates the internal color precisions of solids and
gradients to 16bit per color. This makes it possible to render
at higher precision on non-premultiplied ARGB32, the RGB30
formats and any other hi-color formats if more are added.

[ChangeLog][QtGui][Painting] Internal precision of solids and gradients
is now up to 16bit per color.

Change-Id: Ieae5468bd6de1f56adfa4cb9fa966faf2ed824fd
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-10 09:15:59 +00:00
Alex Trotsenko
853cba729b QRingBuffer: allow to peek bytes from any position
Add an ordinary peek() function which also allows retrieving data from
a specified position. We need this functionality in several places.

Change-Id: Ia4a1b6fe1d7f76cb8f6f1ea34b3e4b89e05a2a68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-10 05:37:11 +00:00
Kai Uwe Broulik
921b22e5ce qiostextresponder: Add support for ReturnKeyType
Change-Id: Ic9212468fb41d8042a345267ae69c95e0d9b4cf2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-04-09 08:25:33 +00:00
Kai Uwe Broulik
d47294bec7 Add ReturnKeyType enum to Qt namespace
This will allow to utilize the native return keys provided by most mobile
platforms, to indicate what kind of action pressing it will result in,
such as performing a search, a navigation, moving on to the next input
field or just closing the keyboard.

[ChangeLog][QtCore][Global] Added ReturnKeyType enum allowing for fine-grained
control of the platform's on screen keyboard return key

Change-Id: I6a691045ad6970e6893f23773b2449a7bafd98fc
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2015-04-09 08:25:20 +00:00
Liang Qi
65fdde30d0 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-04-09 06:35:26 +00:00
Liang Qi
4973786f0d Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I04f9f2749f68c0cb5a427b8d84e43b44bb143e4d
2015-04-08 21:24:26 +02:00
Marc Mutz
91b44afdcb Split qHash()-related code into separate header
The reduces the amount of code the compiler has to parse when all
the header does is implement its own qHash().

I left the implementation in qhash.cpp, as it doesn't influence
qHash*() users.

Change-Id: Id320d690a33769bae78b03ccc3b08f7124123459
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-04-08 16:52:15 +00:00
Jake Petroules
00540a8345 Remove special handling for (DY)LD_LIBRARY_PATH in QProcess.
This provides the ability to pass a *real* clear environment to a
QProcess, rather than (DY)LD_LIBRARY_PATH always being copied over
from the current environment behind-the-scenes. This is important
to users because passing a truly clear environment is now possible.

[ChangeLog][Important Behavior Changes] (DY)LD_LIBRARY_PATH will
no longer "stick" in the process environment when starting a
QProcess. This means that if a QProcess is started with a clear
environment, it will not specially inherit (DY)LD_LIBRARY_PATH
from the parent process. This should not affect most applications,
but if the old behavior is desired, one can simply pass a clear
QProcessEnvironment with the (DY)LD_LIBRARY_PATH values added, to
the QProcess.

Change-Id: I51d1bc14905c5cc126fb02d91dddc2faade41a3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-08 15:13:27 +00:00
Friedemann Kleint
a21a24ee48 [QFontEngineFT::loadGlyph] Fix reversed condition.
Introduced by 237cb0d082
(Consolidate paths for fetchMetricsOnly cases).

Task-number: QTBUG-45444
Change-Id: Icd642c09490f1cfc5804313d60d467290ae599ba
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-04-08 12:10:12 +00:00
Martin Smith
0b17d23285 qdoc: Data member name changes
In preparation for refactoring the Node class hierarchy,
several data member names and some getter and setter names
in the Node hierarchy have been changed to make them more
readable.

Change-Id: Id76ce21c960e4033673f5cf0684aa70e701957b1
Task-number: QTBUG-45450
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-04-08 11:23:49 +00:00
Kai Koehne
a60571b370 QSaveFile: Fix permissions on creation
QSaveFile is intended to be a replacement for QFile, and should use the
same permissions for newly created files. QTemporaryFile however creates
new files with 0600 mask by default.

Fix this by making the mode_t argument QTemporaryFileEngine uses
configurable, and using 0666 for QSaveFile (like we do in QFile).

[ChangeLog][Important behavior changes] Files created by QSaveFile do
now have the same rights as files created by QFile. This also fixes a
regression in QSettings: In the Qt 5.4 series, new files created by
QSettings were only readable by the current user.

Task-number: QTBUG-44086
Change-Id: Ie1cc20e9f25c6e72e1bc9176490c419c27c5fc82
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-08 07:48:17 +00:00
Ursache Vladimir
e18111c1a3 Optimize QApplication startup time by caching the Compose file
Please find the explanation at the top of qtablegenerator.cpp.

Change-Id: Ib1a5ee49d382034520ed0871bb524b7931cf330a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-08 07:37:48 +00:00
Liang Qi
4cee9928f2 Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-04-08 06:52:22 +00:00
Laszlo Agocs
a715c6ceb8 Use the default fbo in Qt sense in blitFramebuffer
QOpenGLFramebufferObject::blitFramebuffer() passes 0 when no FBO is specified.
This goes against the rest of the framework where the default fbo is what
QOpenGLContext::defaultFramebufferObject() returns. This becomes significant
with QOpenGLWidget and on iOS.

Task-number: QTBUG-45328
Change-Id: Iaeb82cd3786ad395116679c9626bdcb10e93b4e3
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-04-08 05:58:27 +00:00
Martin Smith
0d4232f531 qdoc: No longer creates empty subdirectories
qdoc was creating the scripts and used-in-examples subdirectories
whether or not there were any scripts or images used in examples.
Now qdoc creates these subdirectories only if there is something
to put in them.

Change-Id: Ied0e1b38ee28973313c68754c821b34edfd5f505
Task-number: QTBUG-44655
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2015-04-07 19:36:38 +00:00
Alex Richardson
f041757d7a Allow overriding ar binary in configure script by setting AR env var
Unlike all the QMAKE_* command variables it requires the arguments "cqs"
to be part of the variable. This means we need to append the arguments
for compatibility with autoconf.

Change-Id: I961e89d506612873ba1f9cbecff97c448e83a5a2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-07 19:35:13 +00:00
Marc Mutz
7064bf2b9b QErrorMessage: sort statements in ctor
This has no influence on text size, but by executing similar functions
temporally close to each other, we should make better use of the i-cache.

It's also more readable.

Change-Id: Ia211e562d798d4f16f3fd17f87f1e2cad2e0359d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:52:11 +00:00
Marc Mutz
b6b17c2040 QErrorMessage: streamline conditionals in done()
...to avoid checking the same conditions a second time.

Saves 32B in text size on my machine, too.

Change-Id: I0368408b9f5feb02e811dc15ade79d9796031896
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:52:04 +00:00
Marc Mutz
bb7b20b446 QErrorMessage: avoid some code duplication
...by using the predicate from nextPending() in the two
showMessage() functions, too, which thus become identical,
when substituting type -> QString().

Also saves around 250B in text size.

Change-Id: Ibf5d081dbec3438b7b1be4e240879e26d0455d6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-04-07 18:51:57 +00:00
Marc Mutz
8780381532 QByteArray: begin()/end() are not \internal
Docs copied from corresponding QString functions.

Change-Id: Ia2b0f0521780246d82003a1fda539c132823b294
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-07 16:34:25 +00:00
Marc Mutz
dc6e964f63 docs: QString contains characters, not items
Change-Id: I479a731780dfce81e138d1aca950385437266763
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-04-07 16:34:06 +00:00
Thiago Macieira
22dbf6111d Remove unnecessary QDateTime::detach() function
Last commit changed QDateTime::d to be a QSharedDataPointer that
implicitly detaches on non-const operator->() calls. That means we no
longer need to explicitly call detach().

More than that, we should not do it, so we avoid checking the ref count
and try to detach on every use. To do that, in functions where the d
pointer was accessed more than once, I detach at the top and shadow the
"d" variable with a local plain pointer. We don't compile our sources
with -Wshadow, so this should not be a problem.

Change-Id: Ic5d393bfd36e48a193fcffff13b969c281c36d0c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 14:48:47 +00:00
Topi Reinio
2a6249c00a Doc: Qt Concurrent: Link to essential usage information
Functions under the QtConcurrent namespace used to be documented
as header files, using the \headerfile command. These documents
have been since converted to standard pages using the \page
command, and the reference documentation for these functions
now live in the namespace page only.

However, the former pages contain useful usage information and
code snippets, but they've not been linked to from anywhere.

This change links to these pages from the module landing page,
as well as from the function reference doc.

Change-Id: Ia750d72d12503cec96ee2c9e202dd561e548cb24
Task-number: QTBUG-28977
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2015-04-07 14:38:29 +00:00
Konstantin Ritt
491b746473 Fix build with -directwrite
There were several issues caught by GCC:
* deleting object of polymorphic class type which has non-virtual
  destructor might cause undefined behaviour
* comparison between signed and unsigned integer expressions
* 'GetUserDefaultLocaleName' was not declared in this scope
  (depends on WINVER >= 0x0600)

Change-Id: I39f2cc0d5e158f4d85377edd55e9f74a512c7303
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2015-04-07 13:10:38 +00:00
Konstantin Ritt
3a845e4b4f Use QT_WARNING_.. instead of #pragma GCC diagnostic ..
Change-Id: I0bb55a7f1074f3b8d6fb681b1d4dab5105ae7569
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-04-07 13:09:48 +00:00
Konstantin Ritt
237cb0d082 [QFontEngineFT::loadGlyph] Consolidate paths for fetchMetricsOnly cases
Use GlyphInfo as a temporary buffer for storing the glyph metrics
and go through the same code for fetchMetricsOnly and !fetchMetricsOnly.

Change-Id: If8bb85056e5f09588cc3956b43dc51a54d5aecfe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:09:27 +00:00
Konstantin Ritt
550fb85b65 [QFontEngineFT] Move code around to improve readability (no-op)
Move some variables initialization closer to the usage context.

Change-Id: I0f1de0ddc9f0fbe3ec4a56455ccc14f9e8d94e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:09:00 +00:00
Konstantin Ritt
037ad03182 [QFontEngineFT] Avoid double-negation of info.x
Make it consistent with fetchMetricsOnly path.

Change-Id: I6a2d2568d5579255582217515a4e598722547c60
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:08:02 +00:00
Konstantin Ritt
95d034a14f Introduce QQuaternion::fromDirection()
...which constructs a quaternion using specified forward and upward
directions, so that the resulting Z axis "faces" a given forward direction.

Change-Id: Ib77b8ab5c359a4880b0d946face87026acdc6f0b
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Michael Krasnyk <michael.krasnyk@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:07:48 +00:00
Konstantin Ritt
3fb6014ce7 [QFontEngineFT] Guarantee correct metrics for alphamap and its bounding box
...for both cached and non-cached modes, by disabling hinting
for transformed glyphs in loadGlyphFor().

Change-Id: I13766a653ebd72cbed0f5c38ca3536d042aed762
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:07:40 +00:00
Konstantin Ritt
134c6db858 [QFontEngineFT] Consolidate .*lpha.*MapForGlyph() behavior
...and decrease code duplication.

Change-Id: I5eb3c0694dde9030405a3bd3d410ff9784ed7717
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-04-07 13:06:55 +00:00