Commit Graph

5066 Commits

Author SHA1 Message Date
Jeremy Lainé
6a4cb8d62b ssl: Add common key parser for backends
This internal implementation of QSslKey can be used when OpenSSL is not
available. Encrypted keys are not supported, as the cryptography must
be supplied by a separate library.

With this commit, WinRT is migrated to the new implementation,
but qsslkey_winrt.cpp is left in place so that the missing crypto
implementation can be added later. This also means most of the expected
failures for that platform can be removed from the autotest.

Change-Id: I24a3ad1053bb72311613b28b3ae845aa1645a321
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-29 23:18:22 +02:00
Christoph Schleifenbaum
fc4993be1f QListView: Catch stack overflow on mutual scrollbar calculation.
Task-number: QTBUG-39902
Change-Id: Ie850371098070e8ce485d5cb122aa89c18d97359
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-29 07:26:29 +02:00
Dyami Caliri
9c3a58a913 Recreate child windows when changing screens
When setting a new screen, the code calls QWindow::destroy(), which
recursively destroys all child windows. It then calls create() on the
top-level window, leaving child windows destroyed. This causes crashes
if you have embedded native widgets.

Task-number: QTBUG-40817
Change-Id: Iaace2589f48bbfd5faaf5ff95357ff43b310504a
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 23:48:56 +02:00
Friedemann Kleint
0aa84a619e QLineEdit: Disable standard key 'cut' when there is no selection.
Task-number: QTBUG-40477
Change-Id: I0741a1a769c9e7e0d19e8aec231acc29461d44ea
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-28 16:19:36 +02:00
Robin Burchell
9b599c6cea tst_qstatusbar: Allow a little more leeway in timer checking.
Timer granularity means that sometimes this won't wait the full timeout before
vanishing the message. Add some extra tolerance so we don't unnecessarily fail
integrations.

Change-Id: I203ac16cda7bd1f0437dd3febc0509c17e86c25a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-28 13:59:37 +02:00
Jeremy Lainé
d4dc3159c7 Check certificate nullity instead of handle
This changes tests which use QSslCertificate::handle() to determine
if a certificate is null to use QSslCertificate::isNull() instead.

This is required for non-OpenSSL backends which do not actually
expose a private handle.

Change-Id: I9523ba0dd00d47ba337b543ad34840125db99bfb
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-28 13:33:46 +02:00
Friedemann Kleint
4354fef3d4 Windows: Prevent hidden transient children from being re-shown by Windows.
Bring back code from Qt 4 to handle WM_SHOWWINDOW / SW_PARENTOPENING
correctly.

Task-number: QTBUG-40696
Change-Id: If018bf90573f495dbe32d0c46f522ccde0691ebb
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-28 13:26:06 +02:00
Jędrzej Nowacki
918038ad57 Mark QByteArrayList as metatype built-in type.
As a side effects it also adds core templates types to the tests

Change-Id: I0e3338e0bffdf21982aa83d404c83288e54411f4
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-28 10:13:04 +02:00
Andrew Knight
ecbf6dfbf5 ssl: Share the host name matching utilities
This moves the socket backend's host name matching functions up to
QSslSocketPrivate so that they can be shared between backends. This
works, as there is no OpenSSL-specific code here.

Change-Id: I73c2081fdc2e60a44c90e90800d1e1877391a626
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-27 15:03:58 +02:00
Friedemann Kleint
92c7cb8155 Close popup widgets when wheel events are received
Task-number: QTBUG-40656
Change-Id: I134b07705744c23af9718dee486ab5e9ad4352cf
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-08-26 19:58:56 +02:00
Robin Burchell
6aa1b6e015 tst_qtreewidget: Skip test that crashes on Wayland.
Change-Id: I6cc2eb90df57eb5c33d3a93920ea719b5e2cfc0d
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-25 23:23:26 +02:00
Robin Burchell
f10eda7cb5 tst_qtreeview: Skip test that crashes on Wayland.
Change-Id: Iff2499dff1906a7c65fc5c007b96675f4bac2b42
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-25 23:23:20 +02:00
Shawn Rutledge
0ce707d1d5 QColorDialog manual test improvements
Show debug output for rejected and currentColorChanged signals,
because accepting is not the only scenario to be tested.

Task-number: QTBUG-40855
Change-Id: If741ab19392e7d4314e0eff82a939d202ae86b48
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-08-25 17:04:47 +02:00
Morten Johan Sørvig
30bb830fc1 OS X: Fix pan gestures.
The QPanGesture recognizer requires single-point touch events. The touch
implementation in Qt 4 would test Qt::WA_TouchPadAcceptSingleTouchEvents
and forward single touch events if set.

Making this work in Qt 5 is a little bit more involved since the platform
plugins don't know about widgets.

Change the Cocoa touch implementation to send single-point touch events
to QWidgetWindow windows only. Make QApplication forward single-point
touch events only if the target widget has the
Qt::WA_TouchPadAcceptSingleTouchEvents attribute set.

Task-number: QTBUG-35893
Change-Id: I68712a5e3efb4ece7a81ca42f49c412e525eeb3a
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-08-25 16:07:36 +02:00
Allan Sandfeld Jensen
7dce962200 Add operator-> to QJson iterators
The iterators for QJsonArray and QJsonObject are currently lacking an
operator-> definition. Unfortunately it is not possible to do in clean
way without redefining either the iterators or QJsonValueRef class.

This patch instead adds two fake pointer classes that are only used
to handle the operator-> return value.

Task-number: QTBUG-29573
Change-Id: Ief785a6afbbedc9e89cf3b6f3958c2c755997a66
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-25 16:03:42 +02:00
Jeremy Lainé
4040bc21ab Added QAsn1Element
This element can be used for backends that do not offer all the
information that is needed when implementing a ssl certificate backend.
WinRT and the SecureTransport lack functionality in this area for
example.

The sources and tests are added for ssl and openssl configurations in order
to be tested. The condition for adding these can be changed as soon
as they are used by an actual implementation

Change-Id: I2b836133105afdc178bf3b1ee7d732bea069effa
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-24 06:01:05 +02:00
Robin Burchell
3ef985ecb7 tst_dialog: Skip test that doesn't pass on Wayland.
Wayland does not support QCursor::setPos.

Change-Id: Ic50bc31944db70605af01529cc2b7483dfc334a5
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-23 13:50:47 +02:00
Robin Burchell
722fd511a2 tst_qtouchevent: Skip tests that fail with qwindow-compositor.
Change-Id: I6b37e04b8a25942f36ae09a8b0c6a3e3610eec19
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-23 13:50:39 +02:00
Robin Burchell
26edb0d315 tst_qwindow: Skip tests that fail with qwindow-compositor.
Change-Id: I95d180cfa30b7398344f5a851e0bf849e7834a7a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-23 13:50:36 +02:00
Robin Burchell
bcea65851c tst_qinputmethod: Skip tests that fail with qwindow-compositor.
Change-Id: I0163bffe49e3fcbb8132c4926ec975e3a6979285
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-23 13:50:33 +02:00
Robin Burchell
b38eb2985a tst_qguiapplication: Skip tests that fail with qwindow-compositor.
Change-Id: Iac3e9e8d4d857af944de66a95cebc9955bd8beda
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-23 13:50:30 +02:00
Robin Burchell
7232b022c8 tst_qsqlthread: Add debug about when threads finished.
Useful if someone is ever forced to try diagnose what goes wrong with this test.

Change-Id: I4b5e607e6329b6ebad2b40b3f65d6cacbb6b7fcf
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-08-23 13:50:27 +02:00
Robin Burchell
0da4ddfcc5 tst_QWidget: Skip tests that don't pass with qwindow-compositor.
Everything else passes, after some pending fixes in QtWayland.

Change-Id: Ibd8efcaab8c5210111854f1a7362434046a62898
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-20 21:45:15 +02:00
Robin Burchell
69b256285b tst_qsqlthread: Move manual qWait calls into QTRY_VERIFY
Reduces the average runtime of this test for me by ~600ms, but due to the
threading variance the exact reduction is hard to tell.

Change-Id: I96a9f949ae2381f69d9364e6637db0db4bd3b165
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-20 21:45:01 +02:00
Laszlo Agocs
28add98e24 Skip the expose region test on Windows
In some CI configurations this fails from time to time. Have to disable
it unless we can make it more robust somehow.

Change-Id: Iadd8904d7223a6aeff53dafa36b94df3f60e1ad8
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2014-08-20 18:03:44 +02:00
Eskil Abrahamsen Blomfeldt
198009db79 Fix several regressions in font selection
In Qt 5.3.0 a change was added which automatically adapts Common
script to surrounding scripts in accordance with the Unicode tr#24.

This broke *a lot* of cases of font selection because the font
selection algorithm is not prepared for handling characters with
adapted scripts. We need to disable this change for now and redo it
later with patches to font selection to avoid the regressions.

[ChangeLog][Text] Fixed several regressions in font selection when
combining different writing systems in the same text.

Task-number: QTBUG-39930
Task-number: QTBUG-39860
Change-Id: Id02b5ae2403c06542ed5d81e7c4deb2e0c7d816e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-08-20 13:10:55 +02:00
Konstantin Ritt
7304c9a4e8 Make HarfBuzz-NG the default shaper on all platforms
[ChangeLog][Important Behavior Changes] HarfBuzz-NG is now the default
shaper on all platforms. This results in a better shaping results
for various languages, better performance, and lower memory consumption.

Task-number: QTBUG-18980
Change-Id: I4d9454fc37e9050873df3857e52369dfc7f191b2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-08-20 10:10:40 +02:00
Robin Burchell
2e2374a226 tst_qsqlthread: Replace sched_yield calls with QThread::yieldCurrentThread.
Makes the test behavior identical across all platforms.

Change-Id: I5e564598d8e61588af2b73f04b4ca7c9b899c02a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 18:51:44 +02:00
Timur Pocheptsov
6b6e51e5ab OS X - QCollator::compare() returns wrong results.
kUCCollateDigitsAsNumberMask works only if kUCCollateDigitsOverrideMask
is also set.
Update 0: - test added.
Task-number: QTBUG-40777
Change-Id: I48bfec78f5f8439a51f8d749f0fc4397a72b29f2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-08-19 17:53:36 +02:00
Frederik Gladhorn
41f496cb7f Accessibility: QSpinBox should not have any children
On both iOS and Android it is very confusing to be able to move the focus to both, the line edit and the outer frame that is the spin box.
For Linux this fixes an issue that orca would not read the value correctly after pressing the up/down buttons.

Task-number: QTBUG-39861
Task-number: QTBUG-39442
Change-Id: I73c50c91e9021324c52d168d537afd0ea719a48f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-19 14:23:13 +02:00
Maurice Kalinowski
2ffcf3a423 WinRT: Fix QSettings auto-tests
WinRT is a sanboxed environment, hence files can only be created in
some writable location.
For some tests we reset the current directory to minimize the required
changes. We cannot do this for the application lifetime as the test
also has cases where it reads files relative to the executable inside
the sandbox.

Change-Id: Ib9d37c8cffd191f0d1055f835c11d10887923378
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-19 08:58:01 +02:00
Robin Burchell
3be048826f tst_qdbusabstractadaptor: Reduce qWait() usage.
Convert qWait to QTRY_ where we can, and make the qWait durations explicit (not
buried in a function call, but inline in the actual test) where we can.

Total runtime for me goes from 91 seconds to 2 seconds.

Change-Id: I45b3562cb94721a521718365fd51a4172a2e4e18
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-19 04:09:24 +02:00
Giuseppe D'Angelo
75b62f3a17 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-08-19 00:42:00 +02:00
Robin Burchell
ef1ee956c1 tst_qmouseevent_modal: Replace some qWait with QTRY_VERIFY.
Takes the total time for this test from ~1.2 seconds to ~0.42 seconds for me.

Change-Id: I426e600a7afe01d7343108b432eda8b83d6f3d85
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-18 20:57:23 +02:00
Robin Burchell
e8012b0405 Remove some manual qWait and use QTRY_VERIFY instead.
This takes 300ms off the total time for this test.

Change-Id: I230b8a58315797a81579f6a07da282b0dc40637d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-18 20:57:20 +02:00
Robin Burchell
87bc094611 tst_qstatusbar: Use a timer and remove some unnecessary waits to reduce test time.
Time taken by this testcase reduced from 7 seconds to 5.1 seconds for me.

Change-Id: I93b1c5fbc7d9d6515c9ce51a64fdd5c2ffbd54c8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-08-18 20:57:09 +02:00
Shawn Rutledge
2f9c00d9a0 Tablet manual test: show rotated ellipse if the stylus has rotation
Followup to da9e02eb83:
If the stylus is a Wacom Art Pen for example, the regular_widgets
test will show a rotated ellipse with size proportional to pressure
for each tablet point, instead of a circle.

Task-number: QTBUG-39458
Change-Id: I4bbb5f8ceabf7006928d95df3ecd62378394f085
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-18 16:51:42 +02:00
Robin Burchell
74805930d1 tst_qwindowcontainer: Convert some QVERIFYs to QCOMPAREs
So when they fail it's easier to figure out why.

Change-Id: I7e76a6e0b8076ede30a6bb9049a031063c569dfc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-18 13:53:01 +02:00
Robin Burchell
037125ee4a tst_dialog: Convert some QVERIFY to QCOMPARE.
Change-Id: Ibca62cf9dd2e19e32388d19f0c7b34fb7fd81268
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-18 13:52:58 +02:00
Robin Burchell
ac1f1c42c7 tst_qlistview: Convert some qWaits into QTRY_* usage.
This takes the total runtime of tst_qlistview for me from ~47 seconds to ~10
seconds.

Change-Id: Ie6fe95fe0852c2de37e99c2ad02230de78e0995e
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-18 13:52:54 +02:00
Matt Broadstone
45cbbe56bc refactor disconnectFromFtp to remove cached entries when necessary
In cases where a cached ftp connection fails to connect, or a file
transfer has failed, we should removed the cached connection. Since qnam
has an idea of a single internal QFtp per full operation, when file
transfers failed previously the cached connection would be reused for
subsequent connections and thus fail.

[ChangeLog][QtNetwork][QNetworkAccessManager] QNetworkAccessManager now
properly handles FTP transfer failures by removing failed cached ftp
connections.

Task-number: QTBUG-40797
Change-Id: Ie090a39ceddd7e58a0d8baf7d01f2a08c70162e5
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-15 19:48:36 +02:00
Andrew Knight
8c864ac498 winrt: Add partial SSL key support
This allows for opening of public key files. It does not, however,
support opening private keys (or decrypting/encrypting them). This is
due to limitations in the native API.

Nearly all public key tests pass (the native API doesn't support the
40-bit key in the test set). The private key tests are expected to fail.

Task-number: QTBUG-40688
Change-Id: Id8f2f1ae6526540736ceb2e5371f6a5d80c4ba7b
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-08-13 21:09:51 +02:00
Thiago Macieira
4848796f3e Make sure we don't cache old file sizes prior to new writes
If we write to a file, its size changes. We should drop previous size
caches.

Change-Id: Ib687c91e5fc88cab588c89023f23da9622160da9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-08-13 16:36:11 +02:00
Ivan Komissarov
6c3c1a4cb8 Add the QStorageInfo class
Allows to retrieve information about mounted volumes such as label,
total/available size, filesystem type and so on.
Possible use cases are:
- allows to do checks about filesystem before performing actual
  operation (such as available/maximum volume size)
- allows to retrive information about volume that can be shown in file
  dialogs
- allows to retrieve volume for specific path and check if two or more
  paths belong to the same volume or not

[ChangeLog][QtCore] Added QStorageInfo class to retrive information
about mounted volumes and drives

Change-Id: Ibf9c2e6b53ef39c5605894a4422acdbbca4030c4
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-08-13 16:09:58 +02:00
Maurice Kalinowski
091653e9e7 Implement native settings format for WinRT
WinRT stores settings inside the app bundle, not in the registry.
Some tests are not fully functional due to errors in the file
implementation (See QTBUG-40588).

QSettings::SystemScope translates to a roaming container on WinRT,
meaning that settings stored inside there should be uploaded and
shared among devices. However, this is untested so far.

The tests have been updated for those platforms which do not store
the order of keys. This has been done on some locations only so
far, but needed to be done on more places for WinRT.

Task-number: QTBUG-33498
Change-Id: Ifd0194387b09c220d31812b4b6fd0ce9a7d84d24
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-08-13 09:40:56 +02:00
Frederik Gladhorn
fc931e5595 Accessibility: Fix boundaries for text functions in QLineEdit
Make the functions work consistently. For example asking for the line at
the cursor position when the cursor was at the end returned an empty
line before.

Task-number: QTBUG-38500
Change-Id: I60fc78c7be129a59c83efcfce6d8fdd16f2c3f65
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-08-13 09:07:04 +02:00
Marcel Krems
9f486efcbe Show the correct cursor for QLineEdit's side buttons.
Task-number: QTBUG-40708
Change-Id: I5869f42bab3a27085b5572a4b83b16c39a67f733
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-12 14:56:23 +02:00
Frederik Gladhorn
ca524e5b70 Merge remote-tracking branch 'origin/5.3' into 5.4
Manually included changes from
3a347a4e70
in src/opengl/qgl.cpp.

Conflicts:
	src/opengl/qgl_qpa.cpp
	src/plugins/platforms/android/androidjnimain.cpp

Change-Id: Ic26b58ee587d4884c9d0fba45c5a94b5a45ee929
2014-08-12 13:05:02 +02:00
Laszlo Agocs
b08cc0ec6f Make the expose region local on all platforms
QExposeEvent::region() reports a region in a random coordinate system.
The behavior is undocumented and the platform plugins do different things.

xcb, offscreen and ios are correct. These set the region in local coordinates,
which is the most logical interpretation of the expose region.

windows is almost correct, except for one occurrence.

cocoa and others need changes: passing in geometry() as the exposed region is
always wrong.

The patch documents the expected behavior both for QExposeEvent and
internally in QWindowSystemInterface. The problematic plugins are fixed to
use local coordinates.

Task-number: QTBUG-40470
Change-Id: I6ded3154d14254fa71d4292d8e1b5e6cf696c81a
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-12 07:47:32 +02:00
Olivier Goffart
c2badc7423 Fix disconnect()ing from signals declared in a base class
Fix disconnection from pointer to member signal that belongs to the base
class, but whose type is a pointer to a member of the derived class.

Commit 9cc106d9d7 fixed connect, so apply
the same fix in disconnect

[ChangeLog][QtCore][QObject] Fixed disconnecting from pointer to member
signal that belongs in the base class but whose type is explicitly given
as a pointer to a member in the derived class

Task-number: QTBUG-40638
Change-Id: Ia546fc8f36e1ea0dd0645bdd820aea47f43677ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-11 16:49:01 +02:00
Thiago Macieira
db851ed5d1 Trim the QString benchmark test
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).

Please contact Thiago Macieira to obtain the benchmarks and test data.

Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-09 15:36:36 +02:00
Thiago Macieira
e319196f76 Ensure that qCleanupFuncinfo works with some C++11 new constructs
This commit adds tests for ref-qualified member functions, the new
syntax for functions and decltype.

__PRETTY_FUNCTION__ for lambdas varies wildly between compilers and will
produce really bizarre results after cleanup. It's not tested and is
known to be broken.

Change-Id: I70c8dbcba54790357cecba35aa45c5cc672f29d1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-09 15:35:59 +02:00
Marc Mutz
e41b45f1ae QPair: add constexpr liberally
On templates, adding constexpr makes a given instantiation constexpr
if it can be.

This turns qMakePair(0,0), say, into a compile-time constant.

The effects on existing code are small, but exist:

  $ size lib/*{-baseline,-paircexp} | sort -nr
  6516727  211192    2608 6730527  66b31f lib/libQt5Widgets.so.5.4.0-baseline
  6516711  211192    2608 6730511  66b30f lib/libQt5Widgets.so.5.4.0-paircexp
  5373720   44492   15976 5434188  52eb4c lib/libQt5Core.so.5.4.0-baseline
  5373504   44492   15976 5433972  52ea74 lib/libQt5Core.so.5.4.0-paircexp
  5107206  125072    6080 5238358  4fee56 lib/libQt5Gui.so.5.4.0-baseline
  5107030  125072    6080 5238182  4feda6 lib/libQt5Gui.so.5.4.0-paircexp
  1341290   30180    2600 1374070  14f776 lib/libQt5Network.so.5.4.0-baseline
  1341210   30180    2600 1373990  14f726 lib/libQt5Network.so.5.4.0-paircexp
  # no other libraries benefit

[ChangeLog][QtCore][QPair] Can now be used in C++11 constexpr contexts.

Change-Id: I3872e6aa33a7d02a168516f4dfa7119efcac8c40
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 09:06:16 +02:00
Thiago Macieira
dcf9883dff Move the special QByteArrayList methods into QList
and make QByteArrayList be a simple typedef.

As a side-effect, the constructor taking a QByteArray is no longer
available since I couldn't find a way to add it to QList<T> when T is
QByteArray. My template-foo failed me. I tried:

 - QEnableIf<is_same<T, QByteArray>::value, QByteArray>::type
   => makes QList fail to compile for any T that isn't QByteArray
 - make the constructor a template member
   => it compiles if the parameter is a QByteArray, but not a const
      char[4] like the test was
 - inheriting constructors
   => runs into ICC and Clang bugs that I could not work around

Besides, the constructor with std::initializer_list is a superior
solution anyway.

Change-Id: Ic86fbadc1104142bfd907a5c4147199bf839fb89
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-09 09:05:43 +02:00
Marc Mutz
2431bf1b20 QPixelFormat: don't inherit it
Instead of abusing inheritance to provide convenience constructors,
use simple inline constructor functions. The name got a lower-case
q to indicate a free function. The usual fromXYZ() static methods
were deemed not fitting in this case in the initial round of review,
since they implied some kind of conversion while these functions are
simply constructors of formsts, which contain no data.

This also solves the problem that some of these ctors could have been
called with just one argument and were therefore candidates for hidden
QPixelFormat temporary injection.

QPixelFormatRgb was renamed to qPixelFormatRgba to explain the third
argument at the call site better.

There seem to be no users of this class in qt5.git at this time.

Change-Id: Ib4fe8ceb2d30744127b116a748724a3406400eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-09 09:05:24 +02:00
Glen Mabey
35105f173e Long live QByteArrayList!
Initial submission of a new class QByteArrayList with the
purpose of aggregating and then joining QByteArray instances.

[ChangeLog][QtCore] Added new QByteArrayList class.

Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I503af58f125d7f44fef10360177490c933e5840f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-09 09:01:41 +02:00
Keith Gardner
a332322de9 Long live QVersionNumber!
The class provides compare operators, stream operators, and hashing
functions. This class aims to be compatible with (but not restricted to)
the Semantic Versioning 2.0 standard (semver.org).

[ChangeLog][QtCore] Added QVersionNumber class

Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: I244c8ccc002909af03987a2df052734d1a8621a9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-09 09:00:24 +02:00
Frederik Gladhorn
1e2af80785 Fix int conversion to string
clang warning: adding 'int' to a string does not append to the string

Change-Id: I6dc393269a52e9482fde106c17132336cf5ce226
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-08 10:45:53 +02:00
Takumi Asaki
8e3aacf61b OS X: Remove mnemonics in parentheses
In some language, mnemonics put after label text within parentheses.
e.g. "&Open" is translated to "開く(&O)" in Japanese.

OS X doesn't use mnemonics and '&' in label text is removed.
Mnemonics in parentheses (and spaces before them) also should be removed.

Change-Id: I88c0a1f60af7e148b3cf24a4e215ce807d62bce3
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-08-08 10:44:29 +02:00
Laszlo Agocs
bb760d9514 Add support for glMapBufferRange in the wrappers and resolvers
QOpenGLBuffer::map() and related helpers are becoming useless in
OpenGL ES 3.0 and up: instead of the old GL_OES_map_buffer,
glMapBufferRange, but not glMapBuffer, is now part of the standard.
On desktop GL_ARB_map_buffer_range is present by default in OpenGL 3.0
and newer.

[ChangeLog][QtGui] Added QOpenGLBuffer::mapBufferRange().

Task-number: QTBUG-38168
Change-Id: I4e9bbe8ced9ee4d535ac32849a8c08c26d79cb49
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-08 07:29:53 +02:00
Laszlo Agocs
22e4391413 Add default format to QSurfaceFormat
Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat.
These define the default values for the requestedFormat members of
QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow,
QQuickWindow, etc.)

This replaces QQuickWindow::setDefaultFormat() which can now be removed.

The main inspiration here is not the convenience (avoiding setFormat() calls
for all windows/widgets), but robustness: by setting the format once at the start
of the application, all windows and contexts, including the internal share context
used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating
the possibility of failing due to trying to share between incompatible contexts.

Furthermore, since such a functionality is anyway mandatory for QQuickWindow
(due to the possibility of creating windows from QML code), extending it to
QSurfaceFormat and QOpenGLContext/QWindow is the next logical step.

Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-08 07:29:29 +02:00
Peter Hartmann
9ad5dd0e8f network tests: add manual test for auth / proxy auth
This is helpful to e.g. test an NTLM proxy.
The test server currently does not support NTLM; this test offers a
possibility to specify a proxy server via environment variables.

Change-Id: Iea94656d38424c1d932fc854d13ca15ca47cdd68
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-08-07 11:54:08 +02:00
Andy Shaw
866c8bc5e3 Uncomment some tests which accidently got commented
With SHA1 47b3ecf3f4 some tests got
commented out by accident. This re-enables those tests.

Change-Id: If9c7d8a672b66086895a0383fe87d3101fb146fb
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2014-08-07 10:08:51 +02:00
Marc Mutz
7f78d547ca QCommandLineParser: support extremely concise option configuration in C++11
The goal of this commit to make the code in the test work:

    QCommandLineParser parser;
    parser.addOptions({
        { "a",                "The A option." },
        { { "v", "verbose" }, "The verbose option." },
        { { "i", "infile" },  "The input file.", "value" },
    });

For this, QCommandLineParser needs a version of addOption that can
take a list of options. That's what addOptions() is for.

More importantly, the QCommandLineOption ctors mustn't be explicit.
OTOH, any implicit conversion from QString or QStringList to
QCommandLineOption is also undesirable.

To solve this dilemma, add new QCommandLineOption ctors that just
take one argument and are explicit, and make the existing ctors
implicit. In order to avoid ambiguities, remove the default values
of their resp. 2nd arguments. The new ctors are by intention not
\since 5.4, as they are completely transparent to the user.

Et voila, even better than getopt_long(3).

[ChangeLog][QtCore][QCommandLineParser] Added addOptions() method.

Change-Id: I5e779f3406cd0f6c8ec6ecbf6c8074af226de300
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-06 22:17:22 +02:00
Marc Mutz
18bb58a5a6 QProgressDialog: fix setBar() not properly adopting the new QProgressBar
The "adoption" code is taken from setLabel().

Task-number: QTBUG-40503
Change-Id: Id512b28eb756b4a80e5701e599e2cbdf5346ff62
Reviewed-by: David Faure <david.faure@kdab.com>
2014-08-06 14:55:36 +02:00
Jędrzej Nowacki
1fceabe8c7 Implement QStringRef::split
[ChangeLog][QtCore] Added the QStringRef::split() function

Change-Id: I28709c9761785dea7be4e7d621ecf4e1ae007a72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-06 14:04:40 +02:00
Marc Mutz
8b75ae4b82 Add a test for some copy semantics to QPalette
It isn't a thorough check of all the mutable methods for detaching, but a start.

Change-Id: I523fd30d3459186654e12fd25c384ed990ab7a00
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-08-06 13:52:30 +02:00
Marc Mutz
de8a9dee5a QPalette: add move constructor
As with many other implicitly shared classes, efficient move semantics
requires setting the d-pointer to nullptr, which then needs to be checked
for in the dtor and the copy assignment operator.

Change-Id: I654d181a1dfdd9a16e2f9fb96b57475cdd0b4561
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-06 13:52:24 +02:00
Peter Kümmel
4124cd159e Undo: Fix state entry bug for parallel state groups
This commit reverts c4cef6fae9.
The above fix for QTBUG-25958 (cloned in QTBUG-40219) is not
complete and introduces the regression QTBUG-30049.

Task-number: QTBUG-30049, QTBUG-25958, QTBUG-40219
Change-Id: I3c4b774dce06c13cb4e089f8413a7747cedfd212
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-06 07:21:18 +02:00
Friedemann Kleint
088e9bbb4b QHeaderView::restoreState(): Add sanity check.
Read data into local variables and apply only after a check.

Task-number: QTBUG-40462
Change-Id: Id06060d0d5b0eafc2d303526a86d552ff5747a72
Reviewed-by: David Faure <david.faure@kdab.com>
2014-08-06 06:28:39 +02:00
Marc Mutz
559a72e4b6 QtConcurrent::run: allow to select the thread pool on which to run the task
This is the second and last part of the forward-port of
https://qt.gitorious.org/qt/qt/merge_requests/1281

[ChangeLog][QtConcurrent] run() now optionally takes as its first argument
the QThreadPool to run the task on.

Task-number: QTBUG-17220
Change-Id: I4b46eca6ef7de9cd34dac07e6d4b8ad830426b97
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 18:05:04 +02:00
Marc Mutz
c55aec2ed7 QFutureInterface: allow to work with a QThreadPool != globalInstance()
Background:
It is often necessary/advisable to schedule tasks on thread pools !=
globalInstance(). As Herb Sutter writes in
http://www.drdobbs.com/parallel/use-thread-pools-correctly-keep-tasks-sh/216500409
and the Qt Training Material stresses, tasks you schedule on a (global)
thread pool should be non-blocking, which currently rules out using any of
the QtConcurrent functions for, say, file I/O.

Nonetheless it's often convenient to have thread pools also for file I/O, as
the thumbnail viewer exercise in the Qt Training Material shows. In this
case, you'd use a dedicated thead pool, leaving the global thread pool for
CPU-bound tasks.

Yet, none of the QtConcurrent functions allow to pick the QThreadPool
instance on which to schedule the work created with them.

This patch prepares for them to do so.

This is the first part of the forward-port of
https://qt.gitorious.org/qt/qt/merge_requests/1281.

Implement by using a new QThreadPool* member that defaults to nullptr,
and adding setThreadPool to set this member, then using it in lieu of
QThreadPool::globalInstance() everywhere.

I chose to leave m_pool == nullptr to mean globalInstance() to avoid
creating the global instance whenever a QFuture is created, even if the
future represents the result of a calculation not run on the global thread
pool.

[ChangeLog][QtCore][QFuture] Can now be used with any QThreadPool, not
just globalInstance().

Task-number: QTBUG-17220
Change-Id: I4e1dc18d55cf60141b2fa3d14e2d44a3e9e74858
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 18:04:56 +02:00
Marc Mutz
54a4488ca5 tst_QHash: check which of several equal keys is inserted
Add a test that checks that QHash keeps the first of the keys
that compare equal. This may or may not be documented, but is
inconsistent with the values in a QHash, where the last element
with equal key is kept.

Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_map).

Do the equivalent checks in tst_QMap, too. There, of course,
instead of equal keys, check equivalent ones.

Change-Id: I2c5f04f8e8a6bbc7dbaadadd878a4c876e4df042
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 18:04:46 +02:00
Olivier Goffart
27b67c5399 Logging: use the known function when the first frame of the backtrace is unknown
Change-Id: Ia591805c82e7bf77dc7af04f1054c7daca58eb6a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 16:52:34 +02:00
Laszlo Agocs
34fbc61f22 Introduce QRasterWindow
A simple convenience class providing a QWindow that has a
paintEvent and supports opening a painter on itself. It
behaves exactly like QOpenGLWindow in this respect, which is not
surprising since they share the same base class (QPaintDeviceWindow).

QRasterWindow does not however have any OpenGL dependencies and will
be present in -no-opengl builds too.

[ChangeLog] Added QRasterWindow, a thin convenience wrapper for a
QWindow on which a QPainter can be opened.

Done-with: Jorgen Lind <jorgen.lind@digia.com>
Change-Id: I37e82720492945d7b85d5f713eea8d5f7556e511
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-08-05 16:47:42 +02:00
Laszlo Agocs
e48737ae77 Introduce QOpenGLWindow
[ChangeLog] Added QOpenGLWindow. This serves as a convenience class for
creating windows showing OpenGL content via an API similar to QGLWidget
and without any widget dependencies.

Done-with: Jorgen Lind <jorgen.lind@digia.com>
Task-number: QTBUG-36899
Change-Id: I52e9bc61acb129dbfd3841b3adeffab2dbcf7f05
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-08-05 16:47:37 +02:00
Frederik Gladhorn
b53e08e335 Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-08-05 16:47:13 +02:00
Andrew Knight
a93bfc1ebe Remove d3dcompiler_qt
This library was created as a work around for limitations on Windows
Phone 8.0, which will not be supported going forward (Qt 5.4). Therefore,
we no longer need (or want to maintain) this experimental feature and
should remove it from the repository.

Change-Id: Ia417833f9de43e2d3e0940df93625e7d87a555ea
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-08-05 16:44:13 +02:00
Friedemann Kleint
61269c26f6 Fix cmake-test for Dynamic OpenGL.
Change-Id: I604501d07b4728c5158e88a6760b9f1e31311991
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-08-05 06:34:33 +02:00
Marc Mutz
e1fed5dc31 tst_QSet: check which of several equal elements is inserted
Add a test that checks that QSet keeps the first of the elements
that have equal value. This is documented, but inconsistent with
values in a QHash, which keeps the last element with equal key.

Document this as a test. That way, we'll be informed when the
behavior changes (e.g. by a port to std::unordered_set).

Change-Id: I4ca1718bb86599b925b3ccd13b0856917cd4ce67
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-08-05 00:02:26 +02:00
Frederik Gladhorn
0936bc54f9 Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	config.tests/arch/arch.cpp
	src/opengl/qgl_qpa.cpp
	src/widgets/kernel/qapplication.cpp

Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
2014-08-04 09:51:36 +02:00
Laszlo Agocs
e453484bca Make QOpenGLWidget public
QOpenGLWidget is now public.

In addition Qt::WA_AlwaysStackOnTop is introduced to support the
special case of semi-transparent QOpenGLWidget or QQuickWidget on
top of regular widgets.

hellogl_es2 becomes the qopenglwidget example. This example performs
painting both via QPainter and native GL commands and has the OpenGL
widget combined with other, normal widgets.

The widget stack receives some changes when it comes to renderToTexture
widgets like QQuickWidget and QOpenGLWidget. Calling update() will now
result in a paint event, which is essential for QOpenGLWidget since we
want it to behave like a regular widget. The dirty region handling is
extended specially for such widgets due to performance reasons.
(an OpenGL content update must not result in any backingstore painting,
and is thus handled as a different kind of dirtiness)

[ChangeLog] Added QOpenGLWidget. This widget serves as a replacement for QGLWidget.

Task-number: QTBUG-36899
Task-number: QTBUG-40086
Change-Id: Ibf7f82fea99b39edfffd2fc088e7e0eadbca25cf
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-08-01 17:13:59 +02:00
Marc Mutz
ce6a949c79 tst_QTimeZone: test QTimeZonePrivate::isValidId()
This is in preparation of rewriting the function for efficiency.

Change-Id: Id5c16b984b95d76e1f26d862e3813f75980f44fb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-31 21:05:07 +02:00
Marc Mutz
b88d4b0384 Add a test for move assignment to tst_QPalette
It was simply missing.

Change-Id: I6645bb9fe9c81aec9c46ac5efc7d2295a3784ff6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-31 21:04:43 +02:00
Allan Sandfeld Jensen
d8dc664b94 Ensure valid data after QImage::invertPixels
QImage::invertPixels may produce invalid data after inversions of
images with premultiplied alpha, because the inverted colors will be
larger than the alpha.

This patch converts any image with a premultiplied alpha channel to
ARGB32 before inverting the pixels, and then back to the original
format after the inversion.

Support is added for correct inversion of RGBA8888 and RGB30 formats.

Task-number: QTBUG-39901
Change-Id: Ief24c55f495e67ef2ad6429b5b418d02963a64dd
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-31 20:16:09 +02:00
Friedemann Kleint
8c336845ca tst_qwidget: Fix geometries.
Use sizes relative to the test widget size; move windows relative
to the top left point of the available screen geometry. Set a window
title on widgets to be able to identify them. The test now
passes on Windows using a 4K monitor.

Task-number: QTBUG-38858
Change-Id: I5df9198e390befeb3ca18796e24180135a084aad
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-07-31 18:36:17 +02:00
Friedemann Kleint
dd99c10c56 tst_qwindow: Fix geometries.
Use sizes relative to the test window size; move windows relative
to the top left point of the available screen geometry.
The test now passes on Windows using a 4K monitor.

Task-number: QTBUG-38858
Change-Id: Ia8d992f2a9bfa1cb1deacaf918ed0cfff7616959
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-31 18:36:05 +02:00
Shawn Rutledge
da9e02eb83 QTabletEvent manual test: show buttons, pressure, eraser
- Show which button was pressed or released
- Render an ellipse proportional to pressure for each point drawn
- Different color for the eraser
- More complete output for each event
- Don't show mouse events by default, just as most tablet applications
  can now ignore mouse events on the drawing canvas.  But for the
  purpose of testing interleaving of tablet and mouse events,
  one can give the argument --mouse when starting this program
  to show them too, as before.

Task-number: QTBUG-39458
Change-Id: I5e03f1aa748be39d524bd6984ff5d66579787cf9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-07-31 12:20:34 +02:00
Jędrzej Nowacki
f5c3126201 Add QString::splitRef functions.
The functions can be used to optimize code that do not need to use
the split results as QString directly.

[ChangeLog][QtCore] QString can now split a string to a list of
QStringRef.

Change-Id: Ic2dc929e1fba82f9a060e37c51068a301cb5b866
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-07-31 08:50:22 +02:00
Marc Mutz
c7386938b4 QProgressDialog: make the cancel button retranslate on LanguageChange
It is documented to be, and the LanguageChange event is caught and processed.
However, retranslateStrings() uses QProgressDialog::setCancelButtonText(),
which unconditionally sets useDefaultCancelText=true, blocking any further
changes to the button text by subsequent LanguageChange events.

The fix is to use extracted QProgressDialogPrivate::setCancelButtonText()
which - quite intentionally - doesn't set useDefaultCancelText.

Task-number: QTBUG-40504
Change-Id: I6e701deda10c454cb088c0b0778ac2d6adff574a
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-30 23:41:01 +02:00
Marc Mutz
e2331c6f76 QProgressDialog: don't crash when setting the same {bar,button,label} again
The associated test has unearthed that setBar() fails to make the new bar a child
of the progress dialog. This will be fixed in a separate commit.

Task-number: QTBUG-40502
Change-Id: I2d09ebb07ae6395449a4efe38a638df831eebdd7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-30 23:39:24 +02:00
Marc Mutz
41dae1e33a tst_QProgressDialog: enable topLevelWindows() check in cleanup()
Detects widget leaks.

Change-Id: Ia2287debc96a5b87b224b887661679eba8622dc0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-30 23:38:35 +02:00
Marc Mutz
f5b9c38a9f Clean up tst_QProgressDialog
Remove empty ctor and dtor.

Change-Id: Ib89f463eb2623bbb66cc3faa2ab2d5992810f153
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2014-07-30 23:38:12 +02:00
Frederik Gladhorn
4010cfbf2d Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-07-30 22:52:15 +02:00
Frederik Gladhorn
d71f9d8c05 Accessibility: Top level widgets should only be in the hierarchy once
On Linux for example Orca gets confused when showing a dialog that is a
child of another widget since it would show up twice in the hierarchy.

Task-number: QTBUG-39444
Change-Id: I84773ecc3d6774a652dbeb29ad201779f5b3191c
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-07-30 20:52:41 +02:00
Allan Sandfeld Jensen
d702ba20e5 Support RGB30 formats in OpenGL framebuffers and paint engine
This patch adds support for binding RGB30 images as textures, and as
internal format of framebuffer objects. Together with the
QOpenGLPaintDevice
this provides support for rendering to and from RGB30 in full precision.

[ChangeLog][QtGui][QOpenGLFramebufferObject] Support 10-bit per color
channels formats as the internal framebuffer format, making it possible
to render in that precision.

Change-Id: I06de2d12dfe1c1adc466d574fdffbc77f88f4f16
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-07-30 20:03:09 +02:00
Thiago Macieira
5d11688d02 Fix QByteArray::to{Upper,Lower} when the array contains embedded nulls
[ChangeLog][QtCore][QByteArray] Fixed a bug that would cause QByteArray
to stop converting toUpper or toLower at the first embedded null
character.

Change-Id: Ia369037206617813d86a8f1489589243c82aa51b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-07-30 19:48:41 +02:00
Kai Koehne
5b0be0c217 QDebug: Improve QDebug stream operator for QFlags
Use the built-in hex, showbase manipulator to format the number in
hex. Also, apply nospace() only once.

Change-Id: Id4b3d5f082ad13f52c8711408d7ec609bec3a621
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-07-30 16:27:33 +02:00
Kai Koehne
e968793e81 Add qFormatLogMessage()
Export the former qMessageFormatString() as qFormatLogMessage(). This
allows custom message handlers to format their messages just like the
default message handler, taking qSetMessagePattern() /
QT_MESSAGE_PATTERN into account.

The method should arguably not add the '\n' at the end, which a follow
up commit will fix.

Change-Id: Ib2a9cfda91473df079daf03bf3197e6ac63e013e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-07-30 16:27:22 +02:00
Oswald Buddenhagen
87d15f2c1b Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I2a044d44ca991ba20ddd710053b85afb51e362d3
2014-07-30 15:53:07 +02:00