Commit Graph

27773 Commits

Author SHA1 Message Date
Maurice Kalinowski
d9c187b390 winrt: emit application activation
Previously the user only got informed about the application getting
inactive or hidden, but not when the application was reactivated again.
This can cause problems with applications using for instance a camera as
that gets disabled when not being active and never return to a active
state again.

Change-Id: I5c1d8750db8e75043ecf261616a0bc98434a3863
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-04-23 06:26:54 +00:00
Friedemann Kleint
ab83912c79 Windows/QProcess::startDetached(): Fall back to ShellExecuteEx() for UAC prompt.
When running a process that requires elevated privileges (such as
regedt32 or an installer), the Win32 API CreateProcess fails
with error ERROR_ELEVATION_REQUIRED.
Fall back to ShellExecuteEx() using the verb "runas" in that case,
bringing up the UAC prompt.

Task-number: QTBUG-7645
Change-Id: Iee82a86a30f78c5a49246d2c0d4566306f3afc71
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-23 06:12:24 +00:00
Friedemann Kleint
759b3f49c5 OpenGL/contextinfo-Example: Add command line options and status label.
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.

Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-23 06:10:45 +00:00
Friedemann Kleint
84a49594d0 Windows/tst_QTcpServer: Suppress crash notification of crashingServer.
Suppress message dialog of the test helper as does QTestlib.

Task-number: QTBUG-52714
Change-Id: I5efd7d72f77c7689500ecaccf46f1f9dfb312140
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-23 06:09:44 +00:00
Alex Trotsenko
21b3e2265a QAbstractSocket:waitForReadyRead(): fix handling UDP
Allow sockets in bound state to wait for notifications.

Task-number: QTBUG-52449
Change-Id: I5c02bd61db68abca652312d4d59023963b05b3c5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-23 06:03:09 +00:00
Błażej Szczygieł
c511466d74 xcb: Properly process enter/leave events
Ignore enter/leave events when there is a window under mouse button.
Unset window under mouse button if other window is grabbed.
Smarter ignoring (un)grab ancestor enter/leave event.
Ignore ungrab inferior leave event.

Amends: b9f76db30d

Task-number: QTBUG-46576
Task-number: QTBUG-51573
Task-number: QTBUG-52332
Task-number: QTBUG-52488
Change-Id: I8d926309aa60bb8929728691c31ecf93d1e299ad
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-22 13:58:03 +00:00
Peter Wu
1b9d082bb8 dbus: make QDBusArgumentPrivate destructor virtual
Make the destructor of QDBusArgumentPrivate virtual as it may store
other types (QDBusDemarshaller). Suggested by Thiago.

Fixes a "new-delete-type-mismatch" error reported by AddressSanitizer.

Task-number: QTBUG-52176
Change-Id: I9ac19050840530ca9cae893b10093185d31e0448
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-04-22 13:46:15 +00:00
Timur Pocheptsov
a9e7bf9ffd _q_networkSessionStateChanged - fix weird logic
a != A || a != B looks suspiciously wrong.
Found, unfortunately, only by Coverity (CIDs 152247, 152249).

Change-Id: Ia7ec810dde2a3a33ae6fc5644a4eebf279dcffe8
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-22 10:05:45 +00:00
Alexander Volkov
e27fae353c QFileSystemModel: fix updating QFileInfo for a node after a file rename
Use the correct parent path for the renamed file when creating
QFileInfo. It must be a path to the parent directory, not to the
root directory of the model.

Modify tst_QFileSystemModel::setData() to test renames in subdirs
of the root directory of the model.

Change-Id: I69d9e3a937616857a81617791ed118af3f6eea05
Task-number: QTBUG-52561
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-22 09:49:53 +00:00
Timur Pocheptsov
ea64dc9a11 qlockfile_unix - code cleanup
Coverity's CID 157687: QCache::insert, indeed, can delete (immediately)
the object we're trying to insert. While this never happens actually in
qlockfile_unix since we have max cost 10 and insert with cost 1, the
code does not look good and Coverity is not happy.

Change-Id: I16a428017bf86e151afe5256906e4cab1ef4044a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-22 08:45:48 +00:00
Richard Moe Gustavsen
8586cccc07 iOS: (crash fix) ensure we don't clear focus object in a text responder transition
When IM hints changes (e.g as a result of transferring focus
between Qt objects), we sometimes need to reconfigure the keyboard.
And the way we do that is to create a new QIOSTextResponder that
matches the new configuration and tell it to become first responder.
And in that process we need to ensure that we don't clear the
focus object when the old text responder resigns. After all, it was
the one requesting the new IM configuration in the first place.

Since we set FirstResponderCandidate to point to the new text responder
just before telling the old one to resign, we can use that variable
to check if were in a first responder transition before clearing the
focus object.

Change-Id: I05bfb8180700a92a8f14f496044457583bcd38d3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-22 06:36:59 +00:00
Friedemann Kleint
eb786d600c Fusion style: Observe text alignment of QGroupBox.
Take alignment into account in QFusionStyle::subControlRect().

Task-number: QTBUG-49068
Change-Id: Ia8f2d06c46b24761bff537247bbadd3323e41fa9
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-22 06:32:27 +00:00
Friedemann Kleint
9442b3a1c3 Windows QPA/GL: Avoid crash in GL driver.
QWindowsStaticOpenGLContext::doCreate(): Invoke
QWindowsOpenGLTester::supportedRenderers() only when needed; specifically,
do not unnecessarily call it when GLES/SW renderer is specified.
Amends change b4c8e15174.

Task-number: QTBUG-49541
Task-number: QTBUG-52693
Change-Id: I58d1c584d194f8e7fee35ee16b77575f86d3c22e
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-22 06:32:09 +00:00
Friedemann Kleint
ccfe33dc67 QWidget::grab(): Use device pixel ratio.
Return pixmaps with device pixel ratio similar to QScreen::grabWindow(),
cf c0963486ce.
Adapt kernel tests accordingly.

Task-number: QTBUG-52137
Change-Id: I9ce276d5e2d87ae0d39c8639267d1ac283fed854
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-22 06:31:10 +00:00
Timur Pocheptsov
5b54c352ed Cocoa integration - add a protection against dangling pointers
Backport watcher-sentinel trick (QPointer->QObject) from dev.

Task-number: QTBUG-42059
Change-Id: I9b2c7cde635c2ed9a3f667f216da62870d0b5ccb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-04-22 01:20:44 +00:00
Vyacheslav Grigoryev
072485048f QHeaderView: fixing selection of reordered rows and columns
The old code incorrectly calculated visual region for a selection (specified by
QItemSelection object) in case of reordered / swapped rows or columns. It used
the leftmost and rightmost (upmost and downmost for vertical mode) logical
indexes directly. However some middle logical index (in case of reorder) may be
the leftmost or rightmost visual index. In such cases the repainting didn't
work properly. This fix first checks whether reordering / swapping is in use.
If it isn't (ie visual=logical) we use code similar to the old code. Otherwise
the new code scans all selected logical indexes, translates them into visual
ones and gets the correct leftmost and rightmost indexes.

[ChangeLog][QtWidgets][QHeaderView] Fixed a repainting issue when items had been reordered.

Task-number: QTBUG-50171
Change-Id: If6afabebf445cf32a8e0afe262b6ee149e7c4b2b
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2016-04-21 21:13:38 +00:00
Stephen Kelly
9def501433 QString: Avoid searching for a needle which is longer than the hay
Avoid incurring the cost of converting the latin1 data in that case.

Several existing QString unit tests excercise the new code path.

Task-number: QTBUG-52617
Change-Id: I27256d9e7db34f09543e244a79d754ff7932f0d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-21 21:13:08 +00:00
Friedemann Kleint
276adc5a09 QtWidgets: Fix qdoc warnings related to inputMethodQuery().
Mark the overloads taking an additional QVariant as \internal as (cf
QTextEdit) and the overridden functions as \reimp.
Amends change ab67a5b7b6, fixes warnings:
qtbase/src/widgets/widgets/qlineedit.cpp:1755: warning: Cannot find base function for '\reimp' in inputMethodQuery() /

Change-Id: I9949bf3850ab4200ee500cbe33a44faacecc30b0
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-04-21 13:27:45 +00:00
Jake Petroules
bbd1228b17 Fix Group-relative specification of files in generated Xcode projects.
Xcode does not recognize "<Group>" with a capital G, only "<group>" with
a lowercase g. As a result, paths of files within these groups are
calculated incorrectly. For example, dragging any external file into the
Xcode project would result in its leading slash being removed (while
still treated as an absolute path - broken reference). Furthermore, the
dropdown in Xcode displayed the Group location as an invalid string
instead of the correct "Relative to Group". This patch restores correct
behavior.

This fixes a regression introduced in
f09ec09c208c75a16abe05b6bb505a1fc58775a6.

Task-number: QTBUG-52701
Change-Id: I9af5360049a79e7958301e4090a9a542bab0af8c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-04-20 18:18:33 +00:00
Joerg Bornemann
64b54819d8 Doc: Fix links to QProcess::start(const QString &, OpenMode)
The startDetached(const QString &, OpenMode) overload and the
QT_NO_PROCESS_COMBINED_ARGUMENT_START macro must point to the
start(const QString &, OpenMode) overload.

Change-Id: I7607fcb92b9f1ef3547a4a1aadc950532024225a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-04-20 13:43:53 +00:00
Timur Pocheptsov
6d9a3c0119 QMacPinchGestureRecognizer - fix totalScaleFactor
Set totalScaleFactor on a pinch gesture (OS X) so that it works the same way
as in 'standard' gesture recognizer and corresponds to what we document.

[ChangeLog][QtWidgets] : QPinchGesture on OS X now behaves like on other
platforms: totalScaleFactor is the magnitude of the pinch and scaleFactor
is the delta for the current event.

Task-number: QTBUG-48138
Change-Id: I66b9a1df05cbe106b76aed8f15d900bcdd41fdb7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-20 12:22:59 +00:00
Anton Kudryavtsev
bafe205d6a Moc: use QStringBuilder more
Adding strings in a single expression gets mediated
efficiently by QStringBuilder, where using += repeatedly
forces premature consolidation.

Change-Id: I6c1abb9c9801a016ce6c151cffdf8c7ac9502f4e
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-20 12:07:52 +00:00
Friedemann Kleint
e75bd17e3d QWindowsTheme::standardPixmap(): Do not create pixmaps with DPR.
The given size is mostly ignored and the resulting pixmaps typically end up
in a QIcon, which will clobber the DPR anyways when returning a pixmap
for a given size.
Moreover, returning a message box icon with a DPR > 1 when
high DPI scaling is active and Qt::AA_UseHighDpiPixmaps is not set
causes the pixmap to become too small due to some scaling error.

Task-number: QTBUG-52622
Change-Id: I8aaaa97667d6c168040e19b7edad9dfb7517f70f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-04-20 11:59:25 +00:00
Friedemann Kleint
ff49c56450 QMessageBox: Try to pass window handle to QIcon::pixmap().
Try to find a window handle so that the pixmap matching the
device pixel ratio of the screen can be found.

Task-number: QTBUG-52622
Change-Id: Iccf3cea82065af5e055d3cd932cd0808b29b15dc
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-04-20 11:59:06 +00:00
Anton Kudryavtsev
64df35c02d OpenGL: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.

Change-Id: I211ae74434bf3705914764e1e9d02ae823a1be3a
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-20 11:56:25 +00:00
Friedemann Kleint
5386a35d35 Add a manual styles test.
Task-number: QTBUG-49374
Task-number: QTBUG-52622
Change-Id: Ic205590725780147aec3abc0f4be2058d001d358
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
2016-04-20 11:35:48 +00:00
Kai Koehne
68266c4ae2 Fix compilation MSVC warning in 3rdparty/rfc6234
Fixes C4838 warnings:

  rfc6234/sha384-512.c(326): warning C4838: conversion from '__int64' to 'quint64' requires a narrowing conversion
  rfc6234/sha384-512.c(331): warning C4838: conversion from '__int64' to 'quint64' requires a narrowing conversion
  rfc6234/sha384-512.c(796): warning C4838: conversion from '__int64' to 'const quint64' requires a narrowing conversion

Change-Id: Ib531d376d3fd49785e227455f280fc4072bba8c5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-20 07:49:41 +00:00
Kai Koehne
a24ac8950f Doc: Fix typo in QAtomicPointer::loadAcquire documentation
Change-Id: I1b0e6b0f230b2f17595a9cc91234a011ad0260b5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-04-20 07:49:36 +00:00
Friedemann Kleint
cec15a89d0 QWindowsXPStyle: Enlarge QLineEdit/QComboBox when High DPI scaling is active.
In QWindowsXPStyle::sizeFromContents(), scale the margins using the
devicePixelRatio and round the height up. Typically increases
the height by 2 pixels when the device pixel ratio equals 2.

Change-Id: I446ad518c3808a6454a08db7b66a942d37c1703f
Task-number: QTBUG-49374
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-04-19 20:26:24 +00:00
Friedemann Kleint
5fb2dceab4 QTabBar: Fix crash when the tab being dragged is deleted programmatically.
Call QTabBarPrivate::moveTabFinished() from QTabBar::removeTab()
to cancel any drag in progress to prevent crashes due
to invalidated indexes.

Task-number: QTBUG-52527
Change-Id: I5bd8cc6f55e5aea1f1a4710494ba5b92939a42ee
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-04-19 20:25:36 +00:00
Alex Trotsenko
cc7cd61909 Improve performance of socket notifications on WinCE
QEventDispatcherWin32 on WinCE uses a separate low-priority thread to
monitor sockets activity, so changing the state of notifiers occurs
asynchronously to the main thread. This makes a message-based socket
activation mechanism ineffective.

To avoid timeouts in the helper thread, update the thread's pool
directly from the (un)registerSocketNotifier() functions.

Change-Id: I702c32d69dce09323ca5f65dc2ee1407842e41ef
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-19 19:32:39 +00:00
Thiago Macieira
394a026241 compile.text: Split huge line into multiple
Makes it easier to add stuff to it.

Change-Id: Id75834dab9ed466e94c7ffff1445727a2ed975cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-19 18:17:40 +00:00
Thiago Macieira
1721d56d28 Fix build on Linux/x32 systems (x86-64 ILP32)
When I tested this, it compiled, but either I wasn't using the same
compiler or the problem happens during linking: we can't use .quad
(64-bit) with a relocation on x32. So instead, let's use .long (32-bit).

Task-number: QTBUG-52658
Change-Id: Ifea6e497f11a461db432ffff14468d1a16f49c67
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-04-19 18:17:38 +00:00
Timur Pocheptsov
d31bc5cbf9 QNetworkReplyImplPrivate - potential nullptr dereference
Found by Coverity, CID 11351. If we check 'if (backend)' at one line,
not clear why we do 'if (bakcend->canResume())' two lines above without any test.
Also, 'delete backend' is noop if backend is nullptr, so ...
even this 'if (backend)' is ... not needed.

Change-Id: I7a46ce04baeb9251debb7b246954911df58880ca
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-04-19 17:53:48 +00:00
Shawn Rutledge
12fe935bb6 xcb: remove tablet->mouse event synth; harmonize handle/report methods
The synthesis of mouse events for unhandled tablet events is now in
cross-platform code, so the platform plugins don't need to do it.

xi2HandleTabletEvent's signature included an eventListener which is
no longer needed; removing it makes it look needlessly inconsistent
with the signature of xi2ReportTabletEvent; and while we're at it,
might as well make the events const and deal with the repercussions.

Task-number: QTBUG-47007
Change-Id: I0f76c8ed2d2b0baed0652bc68286f1734b8b72ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-19 13:07:24 +00:00
Oswald Buddenhagen
a74603098a actually enable mocdepend
so it turns out that the 'unix' conditional in moc.prf meant that the
feature was not enabled *anywhere* by default, as the unix configure
disabled it everywhere.

amends b3fcaea5.

Change-Id: Ie41ed2ebc338e560b8d6bfbb0bb18888e31b6d13
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-19 12:39:40 +00:00
Oswald Buddenhagen
efb829d44b Mime type browser example: Add documentation.
Change-Id: Ic5f2103b0771799bc9e5e5efceeadf153f8a2159
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-04-19 11:34:35 +00:00
Anton Kudryavtsev
35b0ecf5da QtNetwork: replace Java-style iterators
... with STL-style iterators or with algorithms.
Java-style iterators have overhead.

Introduce local template separate_if algorithm from kleopatra
project to simplify current code.
http://api.kde.org/4.3-api/kdepim-apidocs/kleopatra/html

Done-with: Marc Mutz <marc.mutz@kdab.com>
Change-Id: Ib154f80f46f8041d9cafd81bed0e1982b21541cf
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-19 11:26:02 +00:00
Eskil Abrahamsen Blomfeldt
7094466f7d Interpret fixed CSS line-height as minimum rather than absolute
The QTextBlockFormat::FixedHeight overrides the line height
regardless of its calculated height. If the line contains
objects or text which is higher than the specified line height,
using FixedHeight will cause them to overlap with the previous
line. This is not what happens in normal web browsers. The
expected behavior is that the line height given in CSS is the
minimum height, but that we still reserve space needed to display
everything without overlaps.

To make it possible for people to retain the old behavior, we
introduce the -qt-line-height-type property, which allows them
to override the default.

This also fixes output from toHtml() to use the new property
rather than set the minimum height of the paragraph or the
"line-spacing" property, which does not exist in either CSS nor
in Qt.

[ChangeLog][QtGui][Important Behavior Changes] When line height
is specified in pixels, this is now interpreted as the minimum
line height rather than an absolute line height to avoid overlaps.
To get the old behavior, use the -qt-line-height-type property in
CSS and set it to "fixed".

Task-number: QTBUG-51962
Change-Id: Ic2dde649b69209672170dad4c2de1e1c432a1078
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-19 09:32:10 +00:00
James McDonnell
cc1a28d07e Add the ability to change precompiled header use
Give the Windows configureapp the same -pch/-no-pch arguments found in
the Linux configure script.  Using command line arguments to
enable/disable precompiled header use is preferable to mkspec changes.

Make -pch the default for all toolchains.  In particular, this makes
-pch the default for QNX on Windows.  Previously, QNX on Windows had
an implied default of -no-pch.  Precompiled headers are the default
for QNX on Linux; they should also be the default for QNX on Windows.
A 'dictionary["PCH"] = "no"' will need to be added in
Configure::applySpecSpecifics for any toolchain that should default to
-no-pch (none known at this time).

-no-pch is implemented by putting a "CONFIG -= precompile_header"
in qmodule.pri.  This ensures that Qt is built without precompiled
headers (as requested) even if allowing precompiled header use is the
default for the toolchain.

Task-number: QTBUG-52578
Task-number: QTBUG-11545
Change-Id: I1b59bc2d416c5ba169161c5b3cc13accd76eeac8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-19 00:00:58 +00:00
Friedemann Kleint
f1e0eedcf5 QWindowsXP/VistaStyle: Move the Vista treeview handling to QWindowsXPStylePrivate.
QWindowsXPStylePrivate maintains a list of theme handles for various
style items. The derived class QWindowsVistaStylePrivate had logic
to use a special helper window with the "explorer" window theme set to
obtain the correct treeview arrow branch indicator (arrow shape for Vista as
opposed to '+'/'-' on Windows XP) when creating the "TREEVIEW" theme.
This required calling the helper function
QWindowsVistaStylePrivate::initTreeViewTheming() before
QWindowsXPStylePrivate::createTheme(), which is prone to errors and
initialization order issues.

This could be solved by making QWindowsXPStylePrivate::createTheme()
virtual or similar, but since it the fate of QWindowsXPStylePrivate is most likely
to be merged into QWindowsVistaStylePrivate; it was decided to move
the entire special handling of the Vista treeviews into
QWindowsXPStylePrivate. The existing enumeration value
QWindowsXPStylePrivate::TreeViewTheme is renamed to
QWindowsXPStylePrivate::XpTreeViewTheme and a new value
QWindowsXPStylePrivate::VistaTreeViewTheme is added for which
QWindowsXPStylePrivate::createTheme() invokes the special handling.
This also removes the need to destroy the helper window in unpolish(),
which should save some initializations.

Task-number: QTBUG-52230
Change-Id: I0492ecf38fb3e5eabc4ecbdef70f0bf05e82e104
Reviewed-by: Adam Light <aclight@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-18 13:57:43 +00:00
Alexander Volkov
4d10e55d4d Fix detection of the proxy base style when QT_STYLE_OVERRIDE is set
QProxyStyle checks QApplicationPrivate::styleOverride but ignores
QT_STYLE_OVERRIDE when it is trying to detect the name of the base
style.
Set styleOverride from QT_STYLE_OVERRIDE to make it work. Thus there
is no need to check QT_STYLE_OVERRIDE from multiple places.

Change-Id: I2a64b5ff5443701f800ef5d2a9cb425068f909f1
Task-number: QTBUG-52596
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-18 09:51:11 +00:00
Oswald Buddenhagen
b3fcaea5f2 make extra compiler targets depend on their respective compiler
Change-Id: I6c04e0188137f6bbfeab243f00860b8ff079f69a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-04-18 09:38:10 +00:00
Anton Kudryavtsev
bdf2d7e0af QStringListModel: proper construction of vector
... with known size and known value by corresponding ctor.

Don't use appending for this case.

Change-Id: I70f5b943cda7e55eeb45becf439f79c9aee77278
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-18 04:49:31 +00:00
Anton Kudryavtsev
f083830b8d CoreLib: use const (and const APIs) more
For CoW types const methods will be called.

Mark store_persistent_indexes() as const,
because this method does not modify the object.

Change-Id: Ic867913b4fb5aaebfbaaffe1d3be45cf7b646403
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-04-18 04:49:19 +00:00
Anton Kudryavtsev
777d46b403 Moc: use const (and const APIs) more
For CoW types, prefer const methods to avoid needless detach()ing.

Change-Id: Iefc33552d826aa30320e52acd2d421c9bdae127e
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-18 04:48:59 +00:00
Kai Koehne
4c6b0cf5d5 Xcb: Fix compilation with -no-c++11
nullptr (introduced in commit d7db6c6c19) is a C++11 keyword.

Change-Id: Id6aa639f5d2ddbe8b228f8648754c2b24ef53799
Reviewed-by: David Rosca <nowrep@gmail.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
2016-04-17 18:28:17 +00:00
Anton Kudryavtsev
5361a8dec5 Moc generator: avoid creating QMap::keys().
Iterate the keys directly off the QMap itself.

Change-Id: I7792414db250d8ae63a935513a16a01eb184ebde
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-17 10:26:20 +00:00
Friedemann Kleint
002f5fe52d Windows QPA: Fix top level flags for Qt::SplashScreen.
Set Qt::FramelessWindowHint so that the translucency logic triggers
correctly (raster windows). Fixes the splash screen of Qt Linguist
to be transparent.

Change-Id: I3d50129b7f15bee0eff6ce3318c7f0fec055dc45
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2016-04-16 09:41:29 +00:00
Louai Al-Khanji
760b2929a3 xcb: Fix image scanline padding
Commit b9d386f2cc neglects to account for
the scanline padding requested by the X server. This can result in visual
artifacts if padding is required. This commit fixes this by factoring in
the X server's requested scanline padding when calculating image stride.

Change-Id: I082cb7101ec3a9c554b9b58a76f53f780b87d31e
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-04-15 17:27:14 +00:00