Commit Graph

21955 Commits

Author SHA1 Message Date
Tor Arne Vestbø
cc0a114cd6 iOS: Only use [UIDevice orientation] for the main/device screen
Auxiliary screens are always in their primaryOrientation.

Change-Id: I078151ccbdb8a78eb095a05672f7804ab608ff24
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-23 03:05:16 +01:00
Giuseppe D'Angelo
bd26defd9b QSslSocket: introduce support for TLS PSK (client side)
[ChangeLog][QtNetwork][QSslSocket] It is now possible to use TLS PSK
ciphersuites in client sockets.

Task-number: QTBUG-39077
Change-Id: I5523a2be33d46230c6f4106c322fab8a5afa37b4
Reviewed-by: Richard J. Moore <rich@kde.org>
2015-01-23 00:35:21 +01:00
Mark Brand
e267505d54 update bundled sqlite to 3.8.8.1
The "Fixed CE build of sqlite3" patch is preserved in this change,
which causes sqlite's own localtime implementation to be used for
wince. This is extended by #undef HAVE_LOCALTIME_S to override the
new assumption that localtime_s is available on wince and should be
used. Also, removed HAVE_LOCALTIME_S=0 since this must now be
undefined instead of 0.

Change-Id: I418e138ddc47d1bfbb80de0f4e4205a79c425f10
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-01-22 22:43:54 +01:00
Laszlo Agocs
2bc038adc9 Expose context loss
On platforms like Windows (and presumably on mobile devices too)
the loss of the context (e.g. the underlying D3D device in case of
ANGLE) is an event that can happen randomly and needs sufficient
handling.

Enhance QOpenGLContext::isValid() with the purpose of indicating
context loss.

Currently only the Windows EGL backend (ANGLE) has support for it.
Other platforms may be added later.

Task-number: QTBUG-43263
Change-Id: I8177694c1ee7cebbd5d330e34757fd94c563e6d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-22 14:16:50 +01:00
Tor Arne Vestbø
a2b358e7f5 Only show QWindows after QScreen destruction if coming from virtual sibling
For windows that were shown on an external screen (not a virtual sibling
of the primary screen), eg. on iOS, it doesn't make sense to re-show the
window when moved back to the primary screen.

By moving the logic into the QScreen destructor, we ensure that the code
path is hit both for the old and unsupported style way of destroying
QPlatformScreen by deleting it directly, and the new and safe way
of using QPlatformIntegration::destroyScreen(), while still allowing
clients to manage the windows themselves by emitting screenRemoved()
before applying our fallback logic.

[ChangeLog][QtGui][Important Behavior Changes] QWindows will no longer
be re-shown automatically when moved from a destroyed QScreen, unless
that QScreen was a virtual sibling of the primary screen.

Change-Id: If1105bc5ef41a5392854bb97d121c998bffa3606
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-22 12:58:34 +01:00
Shawn Rutledge
38abd65377 QSystemTrayIcon uses D-Bus StatusNotifier on Linux when possible
Implementing org.kde.StatusNotifier DBus interface
http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/
as well as org.canonical.dbusmenu for the limited purpose of showing
the tray icon's context menu.  If a desktop environment (such as
KDE or Unity) has a StatusNotifierWatcher listening, then tray icon
information is sent to be displayed by the tray implementation
instead of being rendered directly in an XEmbed window.  This is
necessary because some modern tray implementations no longer provide
XEmbed "hosting".

[ChangeLog][QPA][Xcb] QSystemTrayIcon uses StatusNotifier D-Bus
protocol when the desktop environment supports it

Task-number: QTBUG-31762
Done-with: Marco Martin <mart@kde.org>
Change-Id: I3b1f744d621eefc7e9c61d1469460ebfcc77fc54
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
2015-01-22 12:50:51 +01:00
Topi Reinio
3c37066062 qdoc: Ensure .qhp file is generated for all modules
When run in single-exec mode, QDoc constructs only one instance
of HelpProjectWriter, even though it generates documentation for
multiple modules in one go.

This change adds a reset() function for the help project writer,
allowing new parameters to be passed to the existing writer
instance, thus ensuring that all .qhp files are correctly
generated.

Task-number: QTBUG-43815
Change-Id: I1d1c9f713eb5f574a6f8e56616cf5f61bb3e8ff8
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-22 12:48:05 +01:00
Paul Lemire
595ed595ea Add project/unproject methods in QVector3D
Equivalent of gluProject and gluUnproject.

[ChangeLog][QtCore][QVector3D] add convenience project and unproject methods
to use like gluProject and gluUnproject

Change-Id: I6e4e3e79ea6e34d1fb0c375e15185c950b699ef0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-22 12:39:20 +01:00
Martin Smith
fdbf3bec30 qdoc: Change name of node type
QmlClassNode is renamed to QmlTypeNode. This is done
in preparation for implementing qdoc support for
documenting javascript code. Next, QmlTypeNode will
be renamed to JsTypeNode, and a new QmlTypeNode will
be declared that will inherit JsTypeNode.

Change-Id: Ia5d0c367d06c26cb43f887927bbcb096afcb7301
Task-number: QTBUG-43715
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-01-22 07:45:49 +01:00
Tor Arne Vestbø
be6c50a251 iOS: Make screen orientation reporting more consistent
Change-Id: Ic21efb939639711c4071161e3c742525a55d41be
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-22 00:30:09 +01:00
J-P Nurmi
cec7dcc723 QTextDocumentLayout: handle QTextBlock visibility
Task-number: QTBUG-10153
Change-Id: I0420b9c59a7a437da28675349c14e84bfa4aea54
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2015-01-22 00:22:53 +01:00
Tor Arne Vestbø
13c491e6c8 iOS: Fall back to statusbar orientation for initial QScreen::orientation()
At startup, iOS will report UIDeviceOrientationUnknown for the device
orientation, which toQtScreenOrientation() maps to portrait. We can be
smarter than that, by falling back to the orientation of the statusbar,
which in most cases match the physical orientation of the screen at
startup, unless the Info.plist file has been modified to limit the
possible orientations. See also:

  https://gist.github.com/torarnv/40c1931205e33d2b1ed3

Change-Id: I5c78fbe5c670ed2909a51b478bd4814e2433554f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-21 19:12:27 +01:00
Tor Arne Vestbø
bdab31166c Move static part of angleBetween/transformBetween/mapBetween to QPlatformScreen
Allows the helpers to be used at QPlatformScreen construction time, before
it has been associated with a QScreen.

Change-Id: Iab8f863ef5c9339ef6e88b3d844915c03cacda74
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-21 19:11:39 +01:00
Tor Arne Vestbø
b9eab8984d iOS: Use QPlatformIntegration::destroyScreen() instead of manual delete
Change-Id: I8128fa1a4b7d6d202d15c03d51f6360a74d75d8c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-21 19:11:38 +01:00
Laszlo Agocs
10472dce92 Unify input device hotplugging support for embedded
On embedded the mouse cursor will now appear and reappear regardless of
how the input handling code is loaded (via a generic plugin or compiled-in
to the platform plugin).

Instead of passing around QDeviceDiscovery instances that only works
when compiling-in the code into the platform plugin, introduce a new
internal central QInputDeviceManager. The single instance of this
provides a place to store any future input device related signals and
properties.

Also introduce mouse hotplugging support to linuxfb.

[ChangeLog][QtGui] The mouse cursor on Embedded Linux is now handling
hotplugging correctly with eglfs and linuxfb regardless of how the input
handling code is loaded (via a generic plugin or built in to the platform
plugin).

Change-Id: I147c1b04a193baf216598015264f2c06e1b20f84
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
2015-01-21 12:32:04 +01:00
Peter Rustler
f93c04e44a Added new private API for Android and onNewIntent
On Android the foreground activity can get intents
with onNewIntent. Those intents can not be received
in any other way. This is especially true in Android nfc.

This patch adds a way to receive those intents in Qt.
This patch heavily leans on the implementation of onActivityResult.

Change-Id: Ic4dca301f34afe9a528149c3653e545ed3265a3c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-01-21 12:13:25 +01:00
Gabriel de Dietrich
c87566bf9e Introduce QFontDatabase::isPrivateFamily()
Some platforms have the concept of private fonts (e.g., OS X and
iOS) which are generally used as system UI fonts. Since 909d3f5c7,
the platform font database has a similar but private API.

[ChangeLog][QtGui][Fonts] Added QFontDatabase::isPrivateFamily()

Change-Id: Ibdce9de534fadbbc3965be8a942c8012edeed209
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-01-21 12:05:35 +01:00
Martin Smith
b45db5480d qdoc: Remove support for DITA XML
This update makes removes Qdoc's DITA XML generator.

Change-Id: Ibcfd013ace00e56a23268a2a5d850e6c9ea093d0
Task-number: QTBUG-43174
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-01-21 11:34:55 +01:00
Marc Mutz
914c5eb36a QAssociativeIterable: add find()
This is like value(), but returns an iterator instead of the value().

[ChangeLog][QtCore][QAssociativeIterable] Added find().

Change-Id: I029fc8f91cef78f718d419587a2a50ffd2bf7632
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2015-01-21 11:23:43 +01:00
Marc Mutz
b9365aed6a QtCore: add some more Q_DECL_NOTHROW
QtCore now builds with no -Wnoexcept warnings
(that doesn't mean there aren't tons of functions
that should be marked noexcept, just that all
conditionally noexcept functions aren't noexcept(false)
just because of a forgotten noexcept elsewhere).

Change-Id: I10dacb6b9c9d41d3595fe2f306356d62d3d91c76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-21 11:22:50 +01:00
Marc Mutz
9fab24f877 QSslEllipticCurve: enable NRVO in *Name() methods
Make it easier for the compiler to apply the
Named Return Value Optimization (NRVO) in the
shortName()/longName() functions by not returning
different objects in different return statements.

Change-Id: I1b6fa7e6121bc1c843378be33499728c56c97f92
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-01-21 11:22:41 +01:00
Marc Mutz
95e9b93a77 QSslEllipticCurve: don't call QSslSocketPrivate::ensureInitialized() in const functions
Rationale: the case of an invalid QSslEllipticCurve is already
dealt with before we'd call ensureInitialized(). But in order
to have a non-invalid QSslEllipticCurve, we must have called
one of the constructor functions first. There, we already call
ensureInitialized(), so we don't need to do it here again.

Change-Id: I96bdb5db63ec0165e6b8fac9469b5d81c6b2cdae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-01-21 11:22:35 +01:00
Marc Mutz
0c281bcc65 QSslEllipticCurve: add missing noexcept
Change-Id: I94701ddb78a822adf35aea57f9e171a747745f6b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-01-21 11:22:28 +01:00
Marc Mutz
cfdca09e91 QSslEllipticCurve: remove unneeded includes from header
Change-Id: I66b8b85e6c02b0e53391079d5048017d5e63ac8b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-01-21 11:22:19 +01:00
Simon Hausmann
112342b326 Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/dev 2015-01-21 11:14:34 +01:00
Frederik Gladhorn
b6191b16d4 Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/global/global.pri
	src/corelib/global/qcompilerdetection.h
	src/corelib/global/qglobal.h
	src/corelib/tools/qdatetime.cpp
	src/plugins/platforms/xcb/qxcbscreen.h
	src/plugins/platforms/xcb/qxcbwindow.h
	src/widgets/dialogs/qcolordialog.cpp
	src/widgets/dialogs/qcolordialog_p.h
	tools/configure/configureapp.cpp

Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
2015-01-21 11:10:14 +01:00
Thiago Macieira
3bbc1bf53b Implement the unaligned byteswap functions using the aligned ones
This leaves the decision on whether to do unaligned stores to the
compiler, as opposed to forcing it by ourselves.

Since we're now implementing them using two calls, this invalidates the
compiler bug that triggered the #ifdef for Sun Studio (whatever that bug
was).

Change-Id: I4e494ca860a15b9427b2a3000921bf5d92cbb5ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-21 11:08:52 +01:00
Allan Sandfeld Jensen
05feaeed43 Remove duplicated NAN/INF logic from tst_qstring
Qt already has solutions for cross platform isnan and isinf logic. We
should use that instead of duplicating it.

This should also fix compiling tst_qstring on MinGW with C++11.

Change-Id: I7b691fd47701a8f07e1a1fe08a95a0aca43ccca1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-21 10:54:22 +01:00
Giuseppe D'Angelo
2ec2dbed67 QSslEllipticCurve: add fromLongName
Since the conversion to a long name was already there, also support
creation from a long name.

Change-Id: Iad712db7447fb0a0a18f600b7db54da5b5b87154
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-01-21 10:41:39 +01:00
Tobias Koenig
309c804239 Haiku: Add implementation for QStandardPaths
Change-Id: Ic64a5ab3a1ef711180b855ee99154177b7e25696
Reviewed-by: David Faure <david.faure@kdab.com>
2015-01-21 06:12:42 +01:00
Simon Hausmann
fc8adfea9f Introduce helper for QML to allow creating QWidget hierarchies
Commit 1259c5768e410361bcd8b5cf0c2057a2ebabda83 in qtdeclarative removed the
ability to create QWidgets in QML by giving them the correct parent, which
requires calling QWidget::setParent instead of QObject::setParent. This patch
introduces a hook that will allow QtQml to give widgets a proper parent.

Change-Id: I84c57ca5032582c43e405219343d55ac9cf2ffa0
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2015-01-20 16:15:45 +01:00
Kai Koehne
463c559962 MSVC: Silence warning about right shift by too large amount
Silence the MSVC warning that got introduced in commit 62b752b3a2:

warning C4333: '>>' : right shift by too large amount, data loss
qdebug.cpp(316) : see reference to function template instantiation 'void putEscapedString<uchar>(QTextStreamPrivate *,const Char *,int,bool)' being compiled
with
[
Char=uchar
]
qdebug.cpp(270) : warning C4333: '>>' : right shift by too large amount, data loss

Change-Id: If1ee20b741feae3287a8d6a11c202b4296d429fb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-20 16:15:06 +01:00
Alex Trotsenko
a373ffcda9 QIODevice: remove ineffective caching members
Most of the QIODevice functions already have a locally cached
"sequential" flag. Make the rest of them follow this strategy.
This eliminates the need to use private caching members.

Change-Id: I0edb2c9b7c5f411c5bee25c425e7b40e3c9021d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-20 10:37:59 +01:00
Arnaud Bienner
bdcb3f9aab QHeaderView: fix restoring Qt4 state.
When multiple sections were grouped together, sectionItem.size was the total size of grouped sections, not the size of one section.

Task-number: QTBUG-40462
Change-Id: I401a1583dd30880ccf5b4c105a237d6563f212e8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2015-01-20 10:30:54 +01:00
Eskil Abrahamsen Blomfeldt
2a86bf8ce0 Android: Fix canonical form of nonexistent paths
On some Android devices, the realpath() implementation will return
the full path even if the path does not exist. This breaks the
expectation of the canonical path, which should be empty for
nonexistent paths. A few autotests failed due to this.
To work around it, we query existence before getting the
canonical path.

[ChangeLog][Android] Fixed canonical path for nonexistent paths on
some devices.

Change-Id: I5c1dabb8b8394694bc74d2a91912800aaff6b9e3
Task-number: QTBUG-43705
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-19 12:21:19 +01:00
Maks Naumov
4c6ab8f9e2 QToolBox: remove redundant QAbstractButton::text() from paintEvent()
Change-Id: I95773096ca1b915468c086ba61eba2e3e551a7e3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-19 11:38:34 +01:00
Kai Koehne
ca6fb5436d MSVC: Disable warning C4996 for freetype
Change-Id: I22be0faca29989142cd2fa0eaed6846fc40d3f4b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-19 11:24:35 +01:00
Kai Koehne
826d108410 WinRT: Disable compiler warning 4996 for debug builds
Move compiler warning 4996 from level 3 to 4, like we did already for
desktop builds: 0a76b6bc7f .

Change-Id: Ic4bbaeb3104352a915b15eec7a9c9dda9a5cceec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-01-19 11:24:26 +01:00
Sérgio Martins
9087df6bd2 windowflags test: Fix showing which flags are set
The text edit that shows which flags we have set should be updated in
PreviewWindow::setWindowFlags() and PreviewWidget::setWindowFlags()
but QWidget::setWindowFlags() isn't virtual so only the base class
one was called.

Change-Id: I5c9d47d003d5701dde1ab63df0d349f641d66f44
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-19 11:17:49 +01:00
Oswald Buddenhagen
553a3661c1 Bump version
Change-Id: I250fa893cdf831d03f9217b5dc0a5aa2f9a6a6b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-19 10:54:37 +01:00
Ulf Hermann
0310cef332 FusionStyle: Don't try to draw null pixmaps
We have the same check for null already for PE_IndicatorHeaderArrow
which actually uses the same pixmap. If the file is not found the
pixmap will be null and the code dividing by its width or height will
thrown an arithmetic exception.

Task-number: QTBUG-43067
Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2015-01-19 10:53:10 +01:00
Daniel Teske
c243dd5643 QIncrementalSleepTimer: Use QElapsedTimer instead of QTime
Since the former is monotonic and we need a monotonic timer here.

Change-Id: I34325da4fe0317e12f64629a6eef6a80990c3e1a
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-01-19 10:50:08 +01:00
Sze Howe Koh
c49641a117 Doc: Fix typos
Change-Id: I29d5576902a5d1ea25558e980081952d9157f7f0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-01-19 10:48:03 +01:00
Sze Howe Koh
0f5b970894 Doc: Remove references to QOpenGLContext::destroy()
This function is private.

Task-number: QTBUG-35907
Change-Id: I370c0bfd8fda11c68ee76ee42967f117a81b381c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-01-19 10:48:00 +01:00
Pierre Rossi
890ae41d06 Fix a crash in QPlainTextEdit::documentChanged
The layout for an invalid block is very likely to be null, it
shouldn't be accessed without checking the block's validity first.
We can make the check a bit more conservative and simply check that
the block isn't empty.

Change-Id: Ic1459a6168b1b8ce36e9c6d019dc28653676efbe
Task-number: QTBUG-43562
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2015-01-19 10:47:28 +01:00
Andy Shaw
7c9497ad6a Respect the hotspot passed in for the cursor
When the hotspot is set to be QPoint(0,0) then QPoint will see this as
being a null QPoint. However, it is a valid position as far as the hot
spot for the cursor is concerned, so we default to QPoint(-1,-1) instead
and check for that.

Task-number: QTBUG-43787
Change-Id: Ibf6253033016c4b556b8a2a79c89819a4d5825cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-19 10:44:54 +01:00
Andy Shaw
730d07df83 Account for pixmap's device pixel ratio when calculating the label size
When determining the size of the QPushButton's label then the device
pixel ratio of the pixmap used to represent the icon needs to be taken
into consideration so it is rendered correctly.

Change-Id: If32760b120d7a749a51e2c30592d621c0e63dace
Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-19 10:44:48 +01:00
Andy Shaw
17cce24648 Only call ShowWindow() once when going from FullScreen to Maximized
Since going from FullScreen to Maximized is taken care of inside the
FullScreen block then we don't want to call ShowWindow() again in the
Maximized block. Therefore the Maximized block is moved so it is only
invoked if it is not coming or going to fullscreen.

As the minimized case is not accounted for in FullScreen that is left as
is in its own if block.

Task-number: QTBUG-43849
Change-Id: I3141347e072c50b2a4475098d7b8ee0b207578a7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-01-19 10:44:42 +01:00
Marc Mutz
b69c2e86de QFreeList: fix undefined behavior
Signed integer overflow is undefined behavior ([expr]/4),
but unsigned arithmetic doesn't overflow, so isn't
([basic.fundamental]/4, footnote there).

So, use unsigned arithmetic for the loop-around serial
number generation in incrementserial(). While we're at
it, also use it for the masking operation in the same
function.

Found by UBSan.

Change-Id: I500fae9d80fd3f6e39d06e79a53d271b82ea8df8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-19 10:43:45 +01:00
Marc Mutz
62a96dbb53 QTextFormat: fix undefined behavior
Left-shifting of negative values is undefined ([expr.shift]/2).

Since hashValue is a uint already, rectify by casting it->key to
uint prior to shifting.

Found by UBSan.

Change-Id: I94a5311f5a4492f514f595b8fb79726df1e7d0de
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-01-19 10:41:57 +01:00