Commit Graph

26676 Commits

Author SHA1 Message Date
Oliver Wolff
6a85b950a4 ANGLE: Do not use march=native
That configuration causes gcc to create non portable code and thus
should not be used.

Task-number: QTBUG-51938
Change-Id: Ib134bd0b12811c15805943180c41af8f411e6453
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-06 05:54:10 +00:00
Hannah von Reth
1726352207 Make sure QStyleOption is correctly initialized.
Ensures that QStyleOption is correctly initialized.
This prevents possible styling issues due to
QStyleOption's reporting version 0, see qstyleoption_cast.
This enables users to handle more cases in their QProxyStyle.
For now the test is only used for QCommonStyle.

Change-Id: I768db00b12b46890343fffe44e4f562762e9cf80
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-05 20:32:26 +00:00
Jason Haslam
65aff4dc42 Fix regression in scaled QLabel on hi-res display.
The change in bc1796f for QTBUG-42503 only works for scaling down
pixel-doubled images. Smaller images scale up incorrectly. Fixed by
setting the devicePixelRatio of the scaled pixmap to the
devicePixelRatio of the label.

Also, caching was broken by not accounting for scaling by
devicePixelRatio in the condition.

Change-Id: I6e1503652e61683a16312c74f46b79d28c880848
Task-number: QTBUG-46846
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-04-05 11:43:36 +00:00
Edward Welbourne
bebf89e137 QDateTimeParser: Avoid repetition in sectionMaxSize
The format to use was computed, every time round a loop, in both
branches of a ?: choice, duplicating code and potentially computation.
Pull it out into a const computed once before the loop.

A conditional return 2 is pointless for the #if-branch which returns 2
unconditionally, so move it into the #else.

Change-Id: Ia583e958e24f9f37b92cb3f2a173bc07e88bcd06
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-05 11:43:30 +00:00
Maurice Kalinowski
17d17a5d72 winrt: Change input panel behavior to platform default
Native applications do open the native input pane when the touch release
happens, not during press. Widget applications seem to not ask the
theme, so it was acting like native there already. For Qt Quick
applications the platform theme is queried, now returning true for
SetFocusOnTouchRelease.
As a side-effect this also fixes QTBUG-52295, as showInputPanel() at
press time causes issues with focus handling, causing the input pane to
disappear again.

Task-number: QTBUG-52295
Change-Id: I6da6a0126f695233b7c8a399a1549a8b7c824af2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-04-05 11:19:25 +00:00
Laszlo Agocs
41a0be329c Do not disconnect with nullptr when unplugging screens
Task-number: QTBUG-42803
Change-Id: I080ec3f0cc2cb55b43a9b8792f03b002b2e0f982
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-05 09:43:14 +00:00
Giuseppe D'Angelo
4faadb3ad3 QHeaderView::setStretchLastSection: make it a noop when setting the same value
For some reason this setter wasn't protected against setting
the same value again, and always did work (including resizing
the last section when setting it to false).

Change-Id: I044404eef95d52d165100254f3afd489997e0872
Task-number: QTBUG-52308
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-05 08:14:04 +00:00
Allan Sandfeld Jensen
a7b0cb467c Accept partial line scrolls
QAbstractSlider might register and use small scroll events that would
scroll less than a single line. Since we consume the scroll-event we
should accept it, so it doesn't scroll other widgets too.

Task-number: QTBUG-49549
Change-Id: I7c64c5f6cae46f02ba21058abbecb791fc3c88eb
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-05 07:50:53 +00:00
Friedemann Kleint
16e7bcc4cd Vista style animation: Create images with device pixel ratio.
Change-Id: Ic404c8ac8b0e4c1b8d0dd7877611443e0afac270
Task-number: QTBUG-49374
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-05 07:27:40 +00:00
Friedemann Kleint
34a984c807 Windows XP style: Change theme logic to use qreal.
Avoid rounding errors, thus preventing sizes becoming
too small when High DPI scaling is in effect. Also fix
division by zero crashes should a scale factor be below 1.

Task-number: QTBUG-49374
Task-number: QTBUG-51552
Change-Id: I72718521bc3c7f6b0e42392ea2d2d3bbc61e2faa
Reviewed-by: Marko Kangas <marko.kangas@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-05 07:27:37 +00:00
Friedemann Kleint
670a9c00ef Windows XP style: Allow High DPI scaling to draw directly.
Previously, the style defaulted to drawing via pixmaps when the device
transformation of the QPainter was more complex than TxTranslate.
Introduce an enumeration describing the transformation to be able
to identify the scaling used by High DPI scaling and allow for direct
drawing in that case as well. Add scale factors.

Create pixmaps with device pixel ration in drawBackgroundThruNativeBuffer()
if High DPI scaling is in effect.

Issues: Borders may go missing due to the up-scaling/rounding.
Code branches for DrawBackgroundEx==0 are not touched since it is
assumed these old versions of Windows do not run in High DPI.

Task-number: QTBUG-49374
Change-Id: Idfe1887e4fac3be2843438dc76cb4971a198ab2a
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-05 07:27:34 +00:00
Topi Reinio
0e088bd22c Doc: Simple offline CSS: Remove font-size declarations
Remove the font-size declarations from the CSS, rely on the default
sizes for each element. This solves two issues:

  - The user-configured font size (both in Assistant and Qt Creator
    Help) is correctly taken into use. Previously, adjusting the
    font size resulted in resizing fonts only for some of the text
    elements.

  - QTextBrowser backend seems to assume a DPI of 96 for all
    platforms, and font-sizes in 'pt' units are scaled accordingly.
    However, on OS X this resulted in font sizes too small to read.

Change-Id: Iaab3ad07e387912ad7391df982d4bfe7047f0b20
Task-number: QTBUG-51709
Task-number: QTBUG-51885
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2016-04-05 07:20:11 +00:00
Joni Poikelin
8c3e671239 Fix assert with Meta modifier
Meta modifier is not found in some configurations which triggers an
assert. Instead of assert, ignore the modifier if it is not found.

Task-number: QTBUG-52298
Change-Id: I258cee4014a30162afebb423eadaf07ef0ed6a1f
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
2016-04-05 07:14:47 +00:00
Friedemann Kleint
08a62af7c5 Windows QPA: Don't send geometry change after window creation for maximized/fullscreen.
For these states, geometry change will be sent from the code called
by setWindowState(); the geometry obtained immediately after window
creation is then no longer valid.

Task-number: QTBUG-52231
Change-Id: Ia7cbe95e73c5dd4126bb63d448b83f2cab6a53a1
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-04-05 07:13:00 +00:00
Anton Kudryavtsev
e8e09918c0 QDir: use QString::splitRef on all platforms
... to avoid unnecessary allocations with
both case sensitive and case insensitive paths.

Optimize 4413254ff6

Change-Id: I4288831d641f7a0ee67f2efd2f5d4f023df0d39c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-05 07:12:50 +00:00
Marc Mutz
284016c7e6 network-settings.h: don't crash when running without the test server
Don't access first() of a potentially-empty QList.
Check for QHostInfo::error() first.

Also change to constFirst() to prevent a detach.

Change-Id: I91fa0bbfb21f62af29abdb23b4869a7f039b259e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-05 06:52:39 +00:00
Marc Mutz
b5eb553bf3 Fix UB (shift of negative number) in qHash(QModelIndex)
Found by UBSan:

  itemmodels/qabstractitemmodel.h:426:28: runtime error: left shift of negative value -1

Fix by casting the lhs of the left-shift operator to uint
before shifting. Since Qt assumes two's complement repre-
sentation of signed integers, this should yield the same
result as the old code, but without UBs.

It is critically important that the result is identical
to the old code (modulo the compiler exploiting the UB,
which this patch aims to prevent even in future compilers),
because the function is inline, and changing the hash value
would mean changing the layout of a QHash<QModelIndex,.>
between users compiled against the old and new libraries.

Change-Id: I7b826a34fb78b02021e40c3f85fd11af398dbec4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-05 06:52:28 +00:00
Marc Mutz
8ce657d027 QAbstractItemView: don't call restart() on invalid QElapsedTimer
In keyboardSearch(), QAbstractItemView unconditionally called
QElapsedTimer::restart().

Calling restart() on an invalid QElapsedTimer is undefined
behavior:

  qelapsedtimer_unix.cpp:192:9: runtime error: signed integer overflow: 3313808 - -9223372036854775808 cannot be represented in type 'long int'
  qelapsedtimer_unix.cpp:193:10: runtime error: signed integer overflow: 534150461 - -9223372036854775808 cannot be represented in type 'long int'
  qelapsedtimer_unix.cpp:194:17: runtime error: signed integer overflow: -9223372036851462000 * 1000000000 cannot be represented in type 'long long int'

The code already checked the timer for validity, and did not
use the return value of restart() in case of an invalid timer,
but the check came too late.

Fix by checking the return value of QElapsedTimer::isValid()
earlier, and calling start() instead of restart() instead.

Fix the same error in QTreeView, which has a c'n'p copy of
the buggy code.

Change-Id: I9751465394707d9348d5c05a0b1b2be147eceb2e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-04-03 11:32:11 +00:00
Stephen Kelly
bedf0367ac QVariant: Fix flags for type-erased associative iterator key
The flags here are passed to a private QVariant constructor, and they
really represent a boolean - IsPointer or not.

Because the flag for the key_type was incorrectly populated with the
flag for the value_type, memory would be corrupted when using a mapping
type whose value_type is a pointer, but whose key type was not, such as

  QMap<QString, int*>

This typo has been there since the concept was introduced in commit
v5.2.0-alpha1~807 (Add container access functionality for associative
containers in QVariant., 2013-04-05).

Task-number: QTBUG-52246
Change-Id: I9ecb13c603015eed2dc2ca43947fa0ecd6be8b5a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-03 10:58:12 +00:00
Giuseppe D'Angelo
ad864ef194 QGraphicsView: clarify documentation for viewportTransform
d->matrix holds the scene->viewport transform, not vice versa.

Change-Id: I997cbdfbf519f39f242cd0dbbd00621e59ec9307
Task-number: QTBUG-48705
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2016-04-02 20:46:30 +00:00
Giuseppe D'Angelo
f84c502433 QScrollerTimer: fix a memory leak
The QScrollerTimer instance allocated by QScrollerPrivate was never
freed. I've absolutely no idea why QScroller has such a messy
d-pointer handling, so go for the easiest approach: exploit the
fact that QScrollerPrivate is a QObject and parent the QScrollerTimer
to it.

Change-Id: I500edc9d0d14b2fb9eec02712229970eb2b9fe81
Task-number: QTBUG-52280
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-02 08:50:56 +00:00
Kai Pastor
f805d7075a Fix QtGui dependencies in tests/benchmarks
Before this change, -no-gui builds failed already while running qmake.

Change-Id: I3e300a16669371098589822806c5cf8aa9b801c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-01 20:24:04 +00:00
Giuseppe D'Angelo
fc65b9a7cb QGraphics*Layout: fix memory leaks
Change-Id: I5f9d2ccc8912e3fa08e376b5f6b6450d22913406
Task-number: QTBUG-10768
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-01 19:10:14 +00:00
Marc Mutz
b7c7beacda QPointer: add a test for const QPointer<X>
People use this, so make sure there's a test for it.

I don't expect this test to fail, but static and
dynamic checkers should be presented with this
use-case, so they have a chance of warning, because
certain implementation strategies of QPointer may
make this code undefined.

Change-Id: I334bd73204ba4e186c4098fc6b7188917407e020
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-01 18:57:25 +00:00
Andy Shaw
a5456b23f4 eglfs QPA: Hide the cursor when QT_QPA_EGLFS_HIDECURSOR is set
Change-Id: Ib5491c26db2a29e8905573198741df75d8511ace
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-01 17:50:25 +00:00
Simo Fält
f44d826751 Autotest: Remove blacklistings
Removing blacklistings from tests that are now passing.

Change-Id: I00aa1ce286d3e7715fb4bee4a36d0d77049a29ae
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@theqtcompany.com>
2016-04-01 05:41:21 +00:00
Eskil Abrahamsen Blomfeldt
05ed495191 Fix possible out-of-bounds access when making distance fields
While extremely unlikely, there is a theoretical possibility that
the '0' glyph of a given font will have a width or height of 1 pixel,
in which case the (x + 1) / 2 way of getting the center would give us
an out of bounds pixel. We just default to true in this case, since
we cannot make any assumption based on the 0 glyph if it doesn't make
any sense. If the image is invalid, we default to false.

Change-Id: I36cea0b80c9d55aa10eb65db44d1b7ec8a40fc8c
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2016-03-31 12:53:26 +00:00
Eirik Aavitsland
ea122fa9e3 Fixup for text labels in lancelot graphics test
Some strings were drawn with a different size or scaling than what the
string itself said, causing confusion.

Change-Id: I4b187cba6d467cfa0900576bdf451052baa806e6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-31 10:27:39 +00:00
Joerg Bornemann
479ee4fa46 moc: bail out early on missing or invalid options file
If moc is invoked with the @ argument and no options file is specified
or the options file cannot be read, do not try to parse the empty
arguments list. Otherwise QCommandLineParser will print an additional
error message that is of no value for the user.

Task-number: QTBUG-51847
Change-Id: I9aa1eb20a44097b553123be8bc6fded87473a03a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-31 08:57:39 +00:00
Eskil Abrahamsen Blomfeldt
a4e2f2e687 Fix possible crash in QImage::pixel()
QImage::pixel() assumed that the color table was valid
for the values in the bitmap. This was always wrong
for indexed images with explicit no color table set and
was wrong for mono images that were constructed from
preexisting data.

For mono images, we default to a black/white color table,
like we do when constructing with uninitialized data.

For indexed image, we always default to no color table,
but instead of crashing in pixel(), we warn and return
an undefined value.

[ChangeLog][QtGui][Image] Fixed possible crash in QImage::pixel()
for mono or indexed images.

Change-Id: Ieaf19c03984badddfd06e1855a7e287b862adc70
Task-number: QTBUG-50745
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2016-03-31 08:54:03 +00:00
Friedemann Kleint
f5b5e1f76d Windows QPA: Scale the cursor rectangle of the input method.
Fixes the position of the input method window when High DPI scaling
is active.

Task-number: QTBUG-51923
Change-Id: I35ee4bcf320f8c2b7d5cc7fb8484348b18e1d833
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-03-31 03:05:41 +00:00
Timo Jyrinki
87715cc491 Blacklist Mali-T760/Mali-T720 from supporting BGRA.
Extend the blacklist with Mali-T760 and Mali-T720 as found on Meizu
Pro 5 and Bq Aquaris M10 Ubuntu Editions. Reading from FBO like
taking screenshots does not produce correct result otherwise.

Initially reported at: https://launchpad.net/bugs/1557915 and
https://launchpad.net/bugs/1559906

Change-Id: Ic875bd083277bf933863a3a50f8e874dd6e04365
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-03-30 14:15:57 +00:00
Alexander Volkov
adc4e000fc QFontEngineFT: Apply hinting for non-scaled rotated glyphs
Scaled hinted glyphs looks ugly, see QTBUG-24846. It was fixed
in 6da6845f07 by disabling hinting
for them. But at the same time that commit also disabled hinting
for glyphs with the most common transformation - rotating without
scaling.

Detect this type of transformation and don't disable hinting for it.

Change-Id: I0e69a2b60e7e4bc24e9efc4fdedb984df07ad15c
Task-number: QTBUG-50574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-30 10:33:12 +00:00
Kai Pastor
9bc352e38d Enable cmake auto tests for -no-gui
This change disables tests which require QtGui.

Change-Id: Ib647afd086f54536054cb4c0cde5696d762ee8c4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2016-03-30 07:16:50 +00:00
Friedemann Kleint
8875e9fe82 Refactor methods QTextEdit/QPlainTextEdit::inputMethodQuery().
Replace if / else if chain by switch() and return the value
instead of reassigning it.

Change-Id: Ib87c54bbf9911a58d3ae764b71f19f33d59590ce
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-30 07:13:00 +00:00
Friedemann Kleint
086317d72a QTextEdit::inputMethodQuery(): Preserve types when applying offset.
The old code converted QRectF into QRect when applying the offset. Change
the offset point to QPointF and change the conversions accordingly. Add an
autotest similar to that of QPlainTextEdit.

This minimizes rounding errors and prevents conversions since
the input method logic mostly uses qreal.

Task-number: QTBUG-51923
Change-Id: I0c2f80ccae028d8bbbb97ec603f8782f69959c76
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-30 07:12:57 +00:00
Gabriel de Dietrich
c35795b413 QFontEngine: Add handle() function
Both QFont::handle() and QFont::freetypeFace() used to
be available in Qt 4 but were removed in Qt 5. There's
currently no API to get access to the native font handle,
which the font engine holds in a way or another.

Similar to the way it was in Qt 4, the actual handle type
depends on the font engine currently in use. The types map
as follows:

     Font Engine      Native Handle
    ------------------------------------
     DirectWrite      IDWriteFontFace *
     Freetype         FT_Face
     Mac              CTFontRef
     Win              HFONT

All other font engines return a null handle.

Change-Id: I3bea8259ac1378fd24079723aa6603bf9e74834c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-03-29 17:37:35 +00:00
Gabriel de Dietrich
72ff2a2f0d QMacStyle: Return a guess for SE_ProgressBarGroove's rect
QMacStyle doesn't know how to accurately compute SE_ProgressBarGroove
But, since we only need the progress bar's main dimension, its rect
is good enough for QProgressBarPrivate::repaintRequired().

Change-Id: I81e936003b847cc9cc0ddf4fbfc05ddc1c9f6625
Task-number: QTBUG-51120
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-29 17:34:08 +00:00
Błażej Szczygieł
88fae806a8 QtWidgets: Add autotests for Qt::WA_OutsideWSRange flag
Task-number: QTBUG-48321
Task-number: QTBUG-49445
Task-number: QTBUG-51788
Change-Id: I6c04919ff788cad684df69d0aee73d86fd985bb9
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-03-29 12:06:10 +00:00
Andreas Holzammer
a58cf40044 wince: Disable Native Filedialogs for WEC2013
Qt crashes when opening a native file dialog. Disable this feature to
fix this issue.

Change-Id: I1ee17d858238c2531964a63ddbe3e11c5a85483c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-03-29 12:05:49 +00:00
Friedemann Kleint
b169b5a4f3 QPlainTextEdit: Take vertical offset into account when answering input method queries.
Determine offset point to similar to QTextEdit::inputMethodQuery()
and add an autotest.

Task-number: QTBUG-51923
Change-Id: I8232eb348063e2cd95d0632fe74a6eb30c897eda
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-03-29 11:10:27 +00:00
Edward Welbourne
717724b17a Purge sRGB chunks from PNGs in tests.
Subjects each *.png file that matched grep -law "sRGB" to:
pngcrush -ow -brute -rem allb -reduce
(Two needed -force but did get smaller.)

Change-Id: Ia030f0bc1d3617ba716bcc26677ff919ef58423c
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-03-29 08:39:43 +00:00
Lorenz Haas
215a04d51a Fix debug message to match the method's name
Change-Id: Ieaf7366663beeecec3240353d045fb19e2ae99ee
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
2016-03-25 18:49:17 +00:00
Giuseppe D'Angelo
95c9a0376e QTabBar: enable high dpi moving of a tab
Moving tabs of a QTabBar goes through a temporary QWidget that
captures a "screenshot" of the tab, and then gets moved around.
Unfortunately, that screenshot was not using the devicePixelRatio,
resulting in blurry text and icons. For some reason, setting
the DPR on the pixmap isn't enough -- that causes it to be
drawn twice as big (bug somewhere in Qt styles?).

Work around that by not using the palette, but a simple widget
which draws the pixmap (which also leads to somehow clean code).

Change-Id: Id12f9251625693d108031488ddfab86277128705
Task-number: QTBUG-50898
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-25 16:31:40 +00:00
Hannah von Reth
f64640f441 Allow to style arrows drawn with drawPrimitive in QCommonStyle.
Its currently not possible to style the arrows with QCommonStyle because
drawPrimitive from QCommonStyle is called instead from the proxy.

Change-Id: I910b13df110601cb18578bc16edfa5ddaa17bbd2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-25 16:31:31 +00:00
M. Moellney
705d29585b Fix qSetMessagePattern to have many time/backtrace parts
The previous implementation overwrote multiple 'time' parts in the
qSetMessagePattern with the last setting in the pattern line.
%{time}%{time process}%{time boot} ended up to be output as if
%{time boot}%{time boot}%{time boot} was set.

This fix keeps the arguments of each individual 'time' part.

The same holds for multiple 'backtrace' parts. The previouse
implementation overwrote multiple 'backtrace' arguments with the
arguments of the last occurrence.

This fix keeps the individual arguments for the 'process' parts.

The individual arguments are applied in qFormatLogMessage.

A new test to verify the individual 'time' arguments application
is added, too.

Task-number: QTBUG-51944
Change-Id: Ib757614a482c5f31ed0a61b550daa2eea4b907b4
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-25 11:03:43 +00:00
Friedemann Kleint
2e385b3d74 Windows QPA: Fix regular expression to match CLSIDs in file dialog.
Match correct number of digits and entire string, amending
change 4347e81161.

Task-number: QTBUG-33962
Task-number: QTBUG-51373
Change-Id: I56de00bd5ffb3a3a700efbb20970154faf86f923
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-03-24 21:09:01 +00:00
Joerg Bornemann
1534297323 Update comment in tst_QLocalSocket::readBufferOverflow
QWindowsPipeWriter doesn't write in a separate thread
anymore.

Change-Id: Id978bfdfa2531be91cce94476ab9b0dff237bd61
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2016-03-24 20:35:18 +00:00
Alexander Volkov
6cacd19db5 Don't propagate unsolicited events from QWidgetWindow to QWidget
Show and Hide events were not propagated before this change.
Add Timer, DynamicPropertyChange, ChildAdded, and ChildRemoved,
because they are supposed to be delivered to one QObject.

Also don't propagate these events if WA_DontShowOnScreen is set.

Change-Id: I134bf3909d46141e4d3e39f41983f493a4f35478
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-03-24 16:37:01 +00:00
Marc Mutz
aedda12ef1 tst_QAtomicInteger: fix UBs (signed overflow)
Drop addSub() test. It executes exactly the union of fetchAndAdd()
and fetchAndSub(), which have already had their UBs fixed.

No need to do fixes in duplicated code.

Change-Id: Ib72caab0310fce3ff9a40c261d8a38518f91ecaf
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-24 16:16:15 +00:00