Commit Graph

26713 Commits

Author SHA1 Message Date
Shawn Rutledge
3c08035b7b QScreen manual test: add MouseMonitor to test multi-screen scenarios
- QMouseEvent::screenPos() should be global desktop position
- QDesktopWidget::screenNumber() should tell the correct screen
- QGuiApplication::topLevelAt(screenPos) should find the window where
  the mouse is clicked

Change-Id: I9a63ab3ee1944b7246551d0f3d5e37f0d2aa5457
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-08 14:49:59 +00:00
Edward Welbourne
4ac0686a6b Remove QDateTimeEditPrivate's duplication of QDateTimeParser code.
Both constructors set up the first, last and none members.
QDateTimeEditPrivate wants first.pos = 0, different to its base, so
keep that, but the rest merely duplicated.

Change-Id: Ice22e0495112dc3427eb35b5b73420f42d7dafc1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 14:46:09 +00:00
Edward Welbourne
2996560bf8 QDateTimeEditPrivate: make clear which overrides are for which base.
The class does multiple inheritance and over-rides virtuals from both
bases; it also declared the over-rides virtual rather than declaring
them to be over-rides; so deploy Q_DECL_OVERRIDE and, while changing
those lines, move them all together and document which belong to which
base.

Change-Id: Ica3958d6d24124a537983e7e94fce642284f1f24
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 14:45:57 +00:00
Edward Welbourne
fd5720af2c QDateTimeParser: new Section mask values simplify code.
Various |s of existing section flags were used repeatedly; naming
these masks makes the relevant code easier to read.  In QDateTimeEdit,
add a comment to make clear that its Section enum is based on QDTP's.

Change-Id: Ifd8364cd396a6d0d5ed7ae7dc4d31690f77edd30
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 14:45:49 +00:00
Edward Welbourne
c671e66802 QDateTimeParser: mediate QLocale's meddling via a setter.
The former has (for now) nothing private, so QLocale got away with
setting its .defaultLocale explicitly; provide a setter method by
which it can do that, to allow scope for later encapsulation.

Change-Id: I77fc5fc8f868fc7cf8d51eb1c5d18926c61cbf78
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 14:45:38 +00:00
Edward Welbourne
ee22fe13cd QDateTimeParser::parse(): improve readability
A switch (was inconsistent about whether enum members need casts and)
made it less obvious, rather than more, what was going on; so changed
it to a nested if.

Change-Id: I9af322d9dd17aa08cac5003eff2c8eaa73b50d45
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-08 14:45:30 +00:00
BogDan Vatra
b2c0e5af18 By default use native menu bar
Task-number: QTBUG-52010
Change-Id: I8f5feacc41719b1c084ec5a8763e597c1dab716c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
2016-04-08 12:45:18 +00:00
Oswald Buddenhagen
5e30c4065d remove bogus no_cxx_module conditional
this flag specifies that the plugin does not track a qt module. this is
entirely unrelated to whether the plugin should be versioned.

amends f54a3d783.

Change-Id: Ibd3e9bedf488dc58e6354ccf7dd33d974e5f52c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-08 10:56:43 +00:00
Frederik Gladhorn
161fbfda70 Improve gdb backtrace handling
Long backtraces would get cut off in the terminal, this is especially
bothersome when having lots of threads.
Make sure that the output is complet by setting height=0 for gdb.

The gdb manual states:
"If you specify a height of either unlimited or zero lines, gdb does not
pause during output no matter how long the output is. This is useful if
output is to a file or to an editor buffer."

Change-Id: I282054bc9e205d67d3076e37d5c928475803b22d
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-04-08 10:32:11 +00:00
Eskil Abrahamsen Blomfeldt
24914b1acb Qt Quick: Fix bug for selections with line wraps and breaks
This fixes yet another bug where the selection spans both line
wraps and explicit line breaks. Offsetting the log clusters by
the text position in 342c909b34
was not entirely correct, because in some cases the script
item will refer to a specific part of the string, as indicated
by si.position, while iterator.itemStart is in the context
of the full string.

In this case, the log cluster array pointer we use refers to the
script item's part of the array, i.e. it is already offset by
si.position. Therefore, we must offset the logClusters pointer by the
text position *relative* to the current script item. Previously
we would actually offset by si.position twice in cases where
si.position != 0.

We want the text range to refer to the full string, though,
so it can be compared to other text ranges later. However,
in some cases when we are requesting only part of a script item,
then iterator.itemStart does not correspond to relativeFrom,
so in order for the text range search to work, we must pass in
the text positions we are using [relativeFrom, relativeTo],
though offset by si.position so that it refers to the full
string and not just the part addressed by the script item.

Task-number: QTBUG-51759
Change-Id: Ib69856d6d3bc1dd501db94c9d295623f436d122c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-04-08 09:44:06 +00:00
BogDan Vatra
f6eadcd601 Hide the navigation bar only on Android API-19+
Hiding navigation bar only on Android pre API-19 is useless because the
navigation bar appears every time when the user touches the application
window.

[ChangeLog][Android] Hide the navigation bar only on Android API-19+

Change-Id: I085d691a0170cf10dd9970e009c34c6afc961bc6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2016-04-08 06:04:43 +00:00
Oliver Wolff
a064bcf883 winrt: mimic desktop Window's "QKeyEvent::isAutoRepeat" behavior
We should mimic desktop Qt's behavior as close as possible. That means,
that a key release event is triggered between auto generated press
events for most keys. For some keys like modifiers, caps lock, scroll
lock etc. there are no auto repeated events if the key is held down.

The "last" release event after having held the key and several events
are triggered does not have the isAutoRepeat flag set so we should not
have that flag in this case either.

Task-number: QTBUG-52055
Change-Id: I001a73416c4b2072d307ee5d87c7cb8406c9575f
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-04-08 05:57:22 +00:00
Oliver Wolff
fe4fad790e winrt: Fix QKeyEvent::isAutoRepeat
When keeping a key pressed CorePhysicalKeyStatus'
RepeatCount stays 1 while WasKeyDown changes from
false to true. Thus WasKeyDown should be used to
determine the auto repeat status of the key event.

Task-number: QTBUG-52055
Change-Id: I7cde6b92473bd5335e85418c2b92cfe8f338975c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2016-04-08 05:57:20 +00:00
Maurice Kalinowski
34e0e908c8 winrt: Add capabilities as specified by modules
So far no capabilities (but internetClient for Windows 10) were added by
default, which forced developers to always manually edit the
WINRT_MANIFEST.capabilities(_device) property.

This allowed to leave out non-required capabilities and keep the created
manifest clean, examples being microphone for multimedia.

However, this also breaks first user experience as deeper knowledge
about this topic is required. Furthermore this is inconsistent with
other platforms like Android, where all capabilities are set by default
and developers need to edit the manifest manually in any case.
With this change, modules can define the capability set to enable all
features in the module. If developers want to disable some again, they
need to adapt the generated manifest. From our experience this needs to
be done in any case, latest at publishing stage when the store
manipulates the manifest.

Task-number: QTBUG-38802
Change-Id: I6d522268ee0afbfa00a30dbdd5e6ec9f415bebf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-07 20:03:55 +00:00
Joni Poikelin
684ae5f7fe Fix compiling examples with -no-sm
There is access to session manager functions which are not present when
building with -no-sm.

Change-Id: I1c92b4a70f7adb56816877930fb9f55b04ff8940
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-04-07 08:39:37 +00:00
Sebastian Lösch
7d1e6ca199 Limit URLs for proxy auto config to 2083 chars
On Windows only URLs up to 2083 characters are supported, so longer
URLs are truncated.

Task-number: QTBUG-52271
Change-Id: I625e4d089df4d977d39e61e5831611e04260e729
Reviewed-by: Markus Goetz (Woboq GmbH) <markus@woboq.com>
2016-04-07 08:38:21 +00:00
Andy Shaw
5b17fb1428 Doc: Make the replacement functions for obsoleted functions explicit
Change-Id: I3a4bd3b4fcfd253b63fe342da6e398a4aeaf6825
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-04-07 08:06:28 +00:00
Rolland Dudemaine
2b09d371eb Resolve build failure in network stress tests.
strncmp() needs 3 arguments, not 2.

Change-Id: Ia7077108a533321d5218cc35fd78ada8863f8200
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-07 07:22:54 +00:00
Marc Mutz
f72152381b tst_QStringBuilder: add a check for self-assignment
Change-Id: I78094146bf534163af12d6e265276d987d5ce994
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-07 07:02:38 +00:00
Friedemann Kleint
d37239aa41 QFtp: Use UTF-8 encoding.
According to RFC 2640, FTP uses UTF-8 encoding. Fix the conversions
accordingly.

Task-number: QTBUG-52303
Change-Id: I615199b3d074fc3861f25df113dda672525766b6
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2016-04-07 04:25:57 +00:00
Jake Petroules
3ddb2c325e Fix QPrinter PDF output using fonts with spaces in the PostScript name.
Task-number: QTBUG-52352
Done-with: Andy Shaw <andy.shaw@theqtcompany.com>
Change-Id: Id8dcb4a57520c2cc53483672f6578e5ab0bb5de5
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-06 22:42:55 +00:00
Marc Mutz
140a273b3c QFontDialog: re-enable X close button in window decoration
Change-Id: Id8d9dab7a0e4cf22abefd9bdc7bf2fd4cba1f445
Task-number: QTBUG-32240
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-06 22:29:41 +00:00
Marc Mutz
aee197da01 QStringRef: fix some QStringRef <> const char * relational operators
Their implementations were swapped.

Found while extending tst_qstringapisymmetry, which only exists in
dev, so test will be added to dev once this change has merged up.

[ChangeLog][QtCore][QStringRef] Fixed relational operators against
(const char*) to return the correct result.

Change-Id: I3f331037571b9a543a6885802836b768143d1c1a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-04-06 22:29:34 +00:00
Gabriel de Dietrich
5f8bd44ada Avoid unnecessary allocation in QClipData::setClipRegion()
Change-Id: I1280a496478ec6839ac432ffd63ecea28dbb972a
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-06 22:20:45 +00:00
Friedemann Kleint
1e69d4e3ac Refactor QWindowsXPStylePrivate::drawBackground() and helpers.
Pass the DC obtained drawBackground() to drawBackgroundDirectly(),
saving a call to hdcForWidgetBackingStore() to find it.
Pass the error code from the Win32 API DrawThemeBackground()
to the calling functions.

Change-Id: I1c25241f53d87e4429ad924f7b2e29da215d7e4f
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-04-06 18:29:01 +00:00
Friedemann Kleint
e4e62496ac Windows QPA: Scale hotspot of custom cursors correctly.
Separate factors in QWindowsCursor::createPixmapCursor()
and apply factor to the hotspot.

Task-number: QTBUG-52276
Change-Id: Ia5a5db39ddc2bc4215a23ff8625431af9b4a76d8
Reviewed-by: Adam Light <aclight@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-04-06 18:28:00 +00:00
Friedemann Kleint
2a282551ac Remove empty first lines of files.
They might upset licensing related tools.

Change-Id: I858d21fc418ba16959c88847b559b11bea29ed6b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-06 18:26:26 +00:00
Friedemann Kleint
dd9cf15005 QtXml/htmlnfo example: Remove Nokia-related HTML demo file.
Change-Id: I0b0ebcf20747a607ad9eed130d7b4fe810a1f2e1
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-06 18:25:29 +00:00
Friedemann Kleint
c7ec317822 Direct2D QPA: Fix build with clang-cl.
Remove overzealous constexpr triggering errors like:

in file included from .\qwindowsdirect2dpaintengine.cpp:44:
./qwindowsdirect2dhelpers.h(58,37) :  error: constexpr function never produces a constant expression [-Winvalid-constexpr]
Q_DECL_CONSTEXPR inline D2D1_RECT_F to_d2d_rect_f(const QRectF &qrect)
                                    ^
./qwindowsdirect2dhelpers.h(60,12) :  note: non-constexpr function 'RectF' cannot be used in a constant expression
    return D2D1::RectF(qrect.x(), qrect.y(), qrect.x() + qrect.width(), qrect.y() + qrect.height());
           ^
C:\Program Files (x86)\Windows Kits\10\include\10.0.10586.0\um\d2d1helper.h(160,5) :  note: declared here
    RectF(
    ^

Task-number: QTBUG-50860
Change-Id: I0bb4d17b7a7db69c5cc7e286ef0b8ff104f72b2e
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-06 18:24:39 +00:00
Edward Welbourne
6a7f5dab0d Explain QTimeZonePrivate::isValidId a bit more carefully.
Its "rules" are actually guidelines, its suggested regex was wrong,
its actual implementation was fuzzier than its documentation suggested
and the exception it tacitly permitted should be distinguished from
the stricter rules it otherwise appears to implement.  There was also
a redundant check ('-' had been handled earlier in the chained if).

Explain why the situation is tricky, fix the regex mentioned (making
it more readable, too) and note what might be worth doing a little
more fussily, without actually changing code behavior.

Change-Id: I93fa0da0640a134e5d84011b435a186576824063
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-06 14:52:16 +00:00
hjk
6fae048af5 Add some QChar::unicode() calls to brush over deprecation warning
Change-Id: I16383254373289584818cd2b590d51d9e4a649c5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-06 14:50:28 +00:00
Joerg Bornemann
2050e32b5f Fix abuse of assignment-in-conditional (and the resulting warning)
Change-Id: I2025e3360151c76982c45764cbee332855409dd0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-06 14:49:35 +00:00
Joerg Bornemann
181e861625 Remove superfluous includes from qlocalsocket_win.cpp
Change-Id: I4f641966af3443d0c487df95d2e565182a945bf3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-06 14:48:06 +00:00
Olivier Goffart
6c54e10144 Qt Meta macros: Allow tools to define annotations
This might be useful for IDE or other tools to be made aware of Qt macros.

This is inspired to what QtCreator[1] and moc-ng[2] does. But they are forced
to redefine or inject code at precise location which might be difficult.

This is going to make it easier to use libclang in qdoc.

With this change, the tooling can just predefine the macro QT_ANNOTATE_FUNCTION
and QT_ANNOTATE_CLASS to get what they need.

Example with libclang:
 "-DQT_ANNOTATE_CLASS(type,...)=static_assert(sizeof(#__VA_ARGS__),#type);"
 "-DQT_ANNOTATE_CLASS2(type,a1,a2)=static_assert(sizeof(#a1,#a2),#type);"
 "-DQT_ANNOTATE_FUNCTION(a)=__attribute__((annotate(#a)))"
 "-DQT_ANNOTATE_ACCESS_SPECIFIER(a)=__attribute__((annotate(#a)))"
 "-DQ_CLASSINFO(name,value)=static_assert(sizeof(name,value),\"qt_classinfo\");"
 "-DQ_REVISION(v)=__attribute__((annotate(\"qt_revision:\" QT_STRINGIFY2(v))))"

[1] qt-creator/cplusplus/wrappedQtHeaders/QtCore/qobjectdefs.h
[2] https://code.woboq.org/mocng/src/qobjectdefs-injected.h.html

Change-Id: I88fcb28f1dbb3d26ea82f10e9948e68a18c795e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-04-06 14:36:48 +00:00
Friedemann Kleint
58c23ae161 Windows QPA: Check QWindowsStaticOpenGLContext in nativeResourceForIntegration().
The instance of QWindowsStaticOpenGLContext has been observed to be 0.

Task-number: QTBUG-52387
Change-Id: I1ca97c6df0d96e732ae62354e03f465cd461bcb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-06 08:59:07 +00:00
Giuseppe D'Angelo
7bd08f4bfd QToolButton: always restart the menu popup timer
The logic for activating a delayed popup menu on QToolButton is a bit
cumbersome: when the button is pressed, a timer is started. This timer
however doesn't get reset if the button is released before the timer
expires. Instead, the function triggered by the timer checks if the
button is pressed at that time. If so, the popup menu is shown.

This logic allows the user to press-release a QToolButton many times
and suddenly get a popup menu appear way before the expected timeout
for the popup expired. That's because the first press started the timer,
and then the button happened to be down when the timer expired.

Instead, always *re*start the timer on a button press, and cancel
the timer when the button is released.

Change-Id: I3e0849264fdb6f670d018ebb5012eb15fa699cfb
Task-number: QTBUG-48906
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-06 08:56:42 +00:00
Alexander Volkov
db22609642 QListView: propagate the source of wheel events
Change-Id: I3ff5dd1f7e02a8a6a0610d71707c26fd5ea74650
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2016-04-06 08:28:43 +00:00
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