Commit Graph

30549 Commits

Author SHA1 Message Date
Simon Hausmann
3986be6d98 Improve reliability of network bearer tests
May of the tests initiate a scan / update of the network configuration
and expect the API to deliver exactly one update. This turns out to be a
race condition as the update may be emitted multiple times, as
QNetworkConfigurationManagerPrivate::updateConfigurations() is called
via posted events (queued signal emissions) from the bearer thread, and
so after creating the spy we may receive an update from _before_ and end
up emitting the signal multiple times.

Task-number: QTQAINFRA-1040
Change-Id: I931e2907f0cb86d48b4ab1a8795d75206035ea11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-02 21:03:29 +00:00
Oswald Buddenhagen
47784b4352 re-introduce config.summary
Task-number: QTBUG-56225
Change-Id: I954cc1055ab0168c06b6618d02b06f63b4122add
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:53 +00:00
Oswald Buddenhagen
7af6e9bbe6 print help from all modules in top-level builds
this is rather hacky. a proper solution would auto-generate help from
the command line argument definitions, at the cost of needing to
bootstrap qmake first.

Change-Id: Iada6e25d5b31d7db0595309887f2d13295bbc1e3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:47 +00:00
Oswald Buddenhagen
7549bbbacb fail early after command line parsing error
we don't want to do the (possibly interactive) license check when the
command line is not valid.

Task-number: QTBUG-18459
Change-Id: I68c3b7ed4646e49865922ab5612f971930698356
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:42 +00:00
Oswald Buddenhagen
8292326f1b configure: make library sources fail more verbosely
log a message in all unsuccessful exit paths.

Task-number: QTBUG-57217
Change-Id: I8b0f2685d327da583c3e42c8149327e05b2a66cc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:38 +00:00
Oswald Buddenhagen
70a7276840 de-duplicate {mac,uikit}/default_post.prf re valid architectures
Change-Id: Ie9d5a35a7f8578a2588ec004aab086d74986b0eb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:32 +00:00
Oswald Buddenhagen
b5c809eb96 remove redundant arch list truncation in single_arch case
beyond this point, simulator_archs is only used to determine from which
one of the lists the remaining arch came from (and device_archs is
actually never used again). the lists are assumed to be mutually
exclusive, so truncating them won't affect in which of them the first
element of their concatenation is found.

Change-Id: I4736ed7e51f6623efa6bd37892ab1fcf8c83ae8b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:28 +00:00
Oswald Buddenhagen
afd82630c2 delay resolution of darwin deployment target and architectures
there appears to be no particular reason why this ended up in sdk.prf,
and it has become an actual problem now that the sdk is resolved from
default_pre.prf already, making it impossible for projects to override
the deployment target.

Task-number: QTBUG-56965
Change-Id: I8e319d10cdfb95acc1da1f431c8b8d4f76d1168e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:22 +00:00
Oswald Buddenhagen
bbf7fa1368 remove pointless conditionals
uikit already implies !host_build, as host builds are executed with the
host spec. and the only darwin alternative to uikit is macos.

Change-Id: I6b47d68bad5d4427640901ff1e32dacf9a4e352b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:17 +00:00
Oswald Buddenhagen
612f1f4668 centralize QMAKE_COMPILER_DEFINES+=_WIN32 also for winrt specs
this is mostly for appearances (as evidenced by everything working
despite it being missing from some specs), as the variable is just a
fallback for moc.prf's automatic detection.

Change-Id: Ie4af24c02ec03aaa1810281d1bb6876ea38cedf8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:11 +00:00
David Faure
77a8e90cdd QHeaderView: fix restoreState() on a model with more columns
When saving state for a 3-columns headerview and then restoring that
state onto a 5-column headerview, the headerview shouldn't suddenly think
it has 3 columns.

Rather than making restoreState() fail, we adjust for the additional
columns, so that we can still apply the customizations from the user to
all other columns (hiding, moving, etc.).

Change-Id: I3f220aa322ea8b629d2fe345f8cde13e0ea615d6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2016-12-29 17:32:58 +00:00
Alexander Volkov
73dafaf265 xcb: Ignore XI2 LMB mouse events from touch screens
157ee01a8d was trying to
minimize some side effects of the bug in the evdev driver
(https://bugs.freedesktop.org/show_bug.cgi?id=98188) by
not changing mouse button state on motion.
Unfortunately it resurrected bugs that were fixed by
76de1ac0a4.
Filter out mouse events from touch screens instead.
This change reverts 157ee01a8d.

Task-number: QTBUG-32609
Task-number: QTBUG-35065
Task-number: QTBUG-43776
Task-number: QTBUG-44166
Task-number: QTBUG-44231
Task-number: QTBUG-56156
Change-Id: Ie17710d94beabeb08681d669a9d8309be9b44e73
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-12-28 15:02:03 +00:00
Thiago Macieira
69ce68cb89 Doc: add a quick note about unfixed Windows encoding bug
Task-number: QTBUG-49640
Change-Id: Icb0289e3118a41dd9438fffd1492925b03de62d6
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-28 14:56:01 +00:00
Kavindra Palaraja
a89c392097 Link QVariant class documentation to the Creating Custom Qt Types article
The article does answer the questions asked in the bug.

Task-number: QTBUG-56629
Change-Id: Ib8bac0acf45bc10598fc47feb6dd73005b5ad040
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-28 13:31:45 +00:00
Kavindra Palaraja
2be9880ebb Removed random notes in the documentation that should not be there
Two sentences that read like author notes likely added by accident.

Task-number: QTBUG-56630
Change-Id: I7a0b114e128f95e54e9e8f26b43493f67747d650
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-12-28 12:00:44 +00:00
Andrew Knight
dfaa32a945 windows: use lowercase #include
MinGW's headers are lowercase, and MSVC is generally run on a case-
insensitive file system. Including in the lowercase is the more
compatible option.

Change-Id: I288cecb77ddd8029bb3925e613a830dd9ce96a6c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-12-28 06:14:03 +00:00
Andrew Knight
b16e738044 Fix warning from MinGW/GCC 6.2
src/widgets/styles/qwindowsvistastyle.cpp: In member function 'virtual QSize QWindowsVistaStyle::sizeFromContents(QStyle::ContentsType, const QStyleOption*, const QSize&, const QWidget*) const':
src/widgets/styles/qwindowsvistastyle.cpp:1872:9: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
         if (!sz.isEmpty())
         ^~
src/widgets/styles/qwindowsvistastyle.cpp:1874:13: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
             return sz;

Change-Id: Ifd3faef8c93f12d5fadaf4edf875fbe0fc6fb785
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-12-28 06:13:57 +00:00
André Klitzing
0f5687280e Fix typo in documentation
Change-Id: I86584392f2646e87f26bf6de725802e5c6a6c6e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 12:16:41 +00:00
David Faure
6722147696 QMimeDatabase: fix handling of conflicting globs
This code always intended to follow the recommended checking order from
the spec, which says "if multiple globs match, use file contents".
But if the globs had different weights, it would discard globs with
lower weights, and then wrongly conclude, if there is only one glob
left, that there was no ambiguity.

The correct way is rather: remember that multiple globs matched,
do determination from contents, and if that didn't work, *then* use
(one of) the highest-weight glob(s).

This fixes PGP-encrypted *.asc files being detected as text/plain rather
than application/pgp-encrypted.
(https://bugs.kde.org/show_bug.cgi?id=346754)

Change-Id: I734459daf9f502baa95ebb89432819964e0ce304
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 11:33:03 +00:00
David Faure
f163912b5d QMimeMagicRule: endianness fixes
* apply endianness to the mask as well
* do not apply endianness to "host" entries, they were wrongly behaving
exactly like "big endian" entries.

The issue with the mask was detected by the audio/aac magic
 <match type="big16" value="0xFFF0" mask="0xFFF6" offset="0"/>
which failed to identify the test file ct_faac-adts.aac since it was
applying the mask 0xFFF6 instead of 0xF6FF (on a little-endian machine).

Not yet detected by tst_qmimedatabase which is based on shared-mime-info 1.0,
will be covered by the upgrade to 1.8 in dev.

Change-Id: I4fb7af2d367099817e712b14f2a031066d0ac432
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 11:28:55 +00:00
David Faure
7322c65ba7 QMimeMagicRule: fix off by one in the number of bytes checked
Since the loop says p <= e, no +1 should be added to e.

Testcase:

The magic for application/x-gameboy-rom says
<match type="byte" value="0x0" mask="0x80" offset="323"/>
and this code was checking both byte 323 and byte 324, finding a match
at pos 324, returning application/x-gameboy-rom erroneously.

Given the magic for application/x-gameboy-color-rom:
<match type="byte" value="0x80" mask="0x80" offset="323"/>
the expected result for game-boy-color-test.gbc is application/x-gameboy-color-rom

Not yet detected by tst_qmimedatabase which is based on shared-mime-info 1.0,
will be covered by the upgrade to 1.8.

Change-Id: I2396cb1ccfb26db5a24d5551fef493cc0b98a247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-27 08:44:32 +00:00
Allan Sandfeld Jensen
9efd29d1e2 Fix GCC 7 developer build
Disables escalating the implicit fallthough warning to an error, since
Qt is not yet free of unmarked implicit fallthroughs.

With this we can clean the code in the dev branch instead of in 5.6 and
5.8, and only backport bug fixes.

Change-Id: Id30ee21b77de6defcb7d5bb1e05e86c0db098481
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-26 12:05:00 +00:00
Konstantin Ritt
ab732e3b2f Optimize QtActivity's onCreate a little bit
Change-Id: Iabb0f561d99f363dfe1dc206b3ad3e8f1a1d04c0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2016-12-25 04:14:58 +00:00
Jake Petroules
7957d0fbd7 Fix typo in -Xarch handling
Change-Id: I05e1491f3b1b5af28992ea53d513c709e1161a8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-23 19:03:00 +00:00
Oswald Buddenhagen
8f49da6c18 ... and so configureapp.exe disappeareth
Change-Id: I3fd9f2b0d4cf05a625484fce21532da8563cd62c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-23 13:45:59 +00:00
Oswald Buddenhagen
9b68bc4147 move "shared" registry reading code into qmake
now that configureapp does not use it any more, qmake is the only
remaining user. and the license headers already claimed that this code
is part of qmake ...

Change-Id: I9b8a16f8f2b432d2b1143efbdd1f0042305ccc0c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-23 13:45:50 +00:00
Thiago Macieira
04403d5b12 Merge all "win32-msvc*" mkspecs into one
Since we can tell the MSVC version from the compiler now, each of the
qmake.conf files is now the same, so let's just have "win32-msvc" and be
future-proof. Likewise for win32-clang-msvc.

qplatformdefs.h was already common.

Since we can't obtain the MSVC version from the unified mkspec name any
more, I dropped the warning level during the qmake bootstrap to reduce
the number of warnings that need to be disabled from compiler version to
version.

There is no point in keeping the old mkspecs, but configure will re-map
the -platform argument to the unified spec as necessary, to keep
existing configure command lines working.

[ChangeLog][Visual Studio] Qt now has a common mkspec for all Visual
Studio versions, called "win32-msvc". The old names which contained the
version number are now gone (but qmake scopes based on the old names
continue to work). The version of the compiler can be obtained from the
MSC_VER and MSVC_VER variables (for example, for Visual Studio 2015,
those contain the values 1900 and 14.0, respectively). Those variables
are also available with the Intel compiler (win32-icc) and with Clang
(win32-clang-msvc).

Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Ib57b52598e2f452985e9fffd14587c0a77a5c09c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-23 13:45:39 +00:00
Thiago Macieira
4d9fbb3345 Remove hard-coded MS compiler versions from the mkspecs
We're asking the compiler anyway, so we can fully use this information
just as well. Note that this actually happens after the spec itself has
been processed, so it was necessary to delay the version-specific flag
handling as well.

Change-Id: Ib57b52598e2f452985e9fffd14587b581d946022
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:45:26 +00:00
Oswald Buddenhagen
5196d5602c determine msvc compat version in clang spec dynamically
instead of hardcoding the compat version in the spec, run cl.exe (which
needs to be around anyway) to figure out what version to emulate.

Change-Id: I6eae97fe9a78f8e340ecdabcdc0d48738497c6d2
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:44:57 +00:00
Oswald Buddenhagen
1b5271f27f determine compiler version at build time, not in configure
this makes it consistent with the determination of the default
include/library paths. this makes sense, as it's possible to switch the
sdk/toolchain after building qt (within reason).

a side effect of this change is that for compilers which emulate other
compilers, both the real and the emulated version are now made
available.

Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:44:50 +00:00
Oswald Buddenhagen
d0db09681f prune obsolete qml file deployment
static builds of qt have been embedding their qml files via the qt
resource system since qt 5.7, so the code which attempted to deploy them
into mac bundles (introduced in qt 5.2) is useless nowadays.

Change-Id: I830cd2b660f7cab42a46ec8e002a42d9d299b528
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-23 13:25:47 +00:00
Oswald Buddenhagen
fe2f8146d4 prune vestiges of DEPLOYMENT_PLUGIN
the code was broken since 5.0, as it still hardcoded the version number
4 for the plugin basenames.
wince is not supported any more, so there is no point in trying to
restore the code to function.

at a later point, we'll make QTPLUGIN universal enough to cover both
static and dynamic deployment.

Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-12-23 13:25:41 +00:00
Alexander Volkov
49f1b667fa platform plugins: Remove unused former overriders
They were implied to override QPlatformIntegrationPlugin::keys()
but it was removed before releasing Qt 5.0.

Change-Id: Ia1f1ad27b7511b1141887f5dcde0dadeb2e5cabf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2016-12-22 23:02:45 +00:00
Alexander Volkov
fb7bfbf18d examples: Use QOverload to select overloaded signals and slots
We can use QOverload since Qt 5.7 (it depends on Q_COMPILER_VARIADIC_TEMPLATES
which is required since Qt 5.7).
Use it in the examples to show the best practice.
qOverload currently can't be used because it requires c++14.

Change-Id: I94a3c0db9d551fe169fa3d19c07ec0b329d5946c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-12-22 14:54:55 +00:00
Oswald Buddenhagen
63e7ff97e9 configure: properly serialize machine tuple detection
detecting the machine tuple must happen before committing qdevice.pri.

Change-Id: Ic37eda42fff805d6e1edb5dd92898abd59d6bdc9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-22 11:48:13 +00:00
Oswald Buddenhagen
4cbec6b730 configure: reload spec after configuring paths
this fixes the x-build for raspberry pi, as that spec refers to the
sysroot.

the path setup doesn't require the device options to be in effect yet,
so it was sufficient to move the existing spec reload to a later point
in time.

Change-Id: Idc521aa13ff441931e954c7c9004472cf7061ee1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-22 11:48:09 +00:00
Oswald Buddenhagen
a71b53d600 fix sysrootification of install paths
initially, the idea was that QLibraryInfo would receive a
pre-sysrootified ExtPrefix from the builtin qt.conf. matching this
against the sysroot would then tell us whether to sysrootify the Prefix
from a "regular" qt.conf as well.
however, this would have lead to some major ugliness and inconsistency
between the code paths, so i changed my mind.
unfortunately, i failed to adjust the remaining code, leading to
169a40d51 entirely breaking sysrootification ...

the proper (and nicely consistent) solution is to introduce a
SysrootifyPrefix key to qt.conf. this is user-accessible as well, so as
a bonus it is now possible to adjust the setting at qmake installation
time. incidentally, this omission was the last thing that prevented
using the same qmake host build for any imaginable configuration of the
same qt version ... i think.

Change-Id: Ic0eebf21f93651f6374628c0ad8b206d696a4a7e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-22 11:48:05 +00:00
Allan Sandfeld Jensen
674430cea0 Silence maybe_uninitialized warning with gcc -Og
GCC produces false positives for maybe_uninitialized when compiling with
-Og in these three places. Simply initialize the variables to silence
it. This should be entirely cost-free for normal compilation.

Change-Id: Iab778a6ba25993f78f190e928c1fcc2dbd8b2fcd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-21 22:08:01 +00:00
Joerg Bornemann
88a02c4d63 Remove ToolsVersion from generated VS projects for VS >= 2013
Before VS 2013 ToolsVersion contained a .NET version
number (e.g. "4.0"). Since VS 2013 ToolsVersion is the same as the
Visual Studio version number (e.g. "12.0"), which is also the default.

We always wrote "4.0" (except in one special case which used
"14.0"). This doesn't bother Visual Studio itself, but other tools
like PVS-Studio.

Remove the ToolsVersion attribute from generated VS projects for VS
2013 and newer.

Task-number: QTBUG-57694
Change-Id: I7a3bc4534c492e9540f6b968bee8a969980df63f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-21 16:35:49 +00:00
Joerg Bornemann
5fc2337d74 Fix unnecessary regeneration of mocables in VS projects
Change dcd2f829 introduced fake files with the extension .cbt for custom
build tools that generate code from C++ source inputs. The moc_predefs.h
header file falls into this category, because it is generated from
dummy.cpp.

It turns out that these fake files have to exist. Otherwise the
custom build step is executed on every build. That means re-moccing all
mocables on every build.

Fix this by actually creating the fake .cbt files with some
explanatory comment in them.

Task-number: QTBUG-57695
Change-Id: I251294334425d9914677787d8ba6da1169b4cca5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-12-21 16:35:22 +00:00
Lisandro Damián Nicanor Pérez Meyer
31f0728ac9 Mark QPA symbols as private
QPA headers are shipped as private symbols, so they should be marked as such.
This helps distros to check which applications/libraries need recompiling
on each Qt patch update.

Task-number: QTBUG-57060
Change-Id: Ie09d4d10e1edb5127d45a05a3dfa3f4c9dd012f2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-21 16:21:13 +00:00
Tor Arne Vestbø
8533c94a24 macOS: Take DPR into account when creating CGContexts for a QPixmap
Missing logic when refactoring image manipulation methods into QtGui
in c52bb03090.

Task-number: QTBUG-57723
Change-Id: I7b55d4451d35faf5fd794daa0b80acbd712f30cd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-12-21 16:18:13 +00:00
David Faure
b9edbb5d54 QLockFile: make sure we encode the hostname as UTF-8 in the lock file
We chose to use UTF-8 as it allows us to ensure there's no mistaking the
hostname in case the locale is changed, if the host name contains
characters outside of US-ASCII.

But this didn't work because the code that wrote the hostname always
used the local 8-bit codec instead of UTF-8. On Unix, we used the
result of gethostname(3) directly, which is supposedly on the locale codec.
This commit doesn't fix Windows, which requires _wgetenv, the plan being
to encapsulate that with a qEnvironmentVariable() method.

[ChangeLog][QtCore][QLockFile] Fixed a bug that caused QLockFile not to
recognize a stale lock file if the machine's hostname contained non-US-
ASCII characters, on Unix. A Windows fix is still pending.

Task-number: QTBUG-49640
Change-Id: Ib9d045544ff370ec901626658a84ec4e6575fe21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-21 15:57:40 +00:00
Stephen Kelly
baad82d242 QIPM: Persist model indexes after emitting layoutChange, not before
Callers can persist a QModelIndex which was not persisted before in a
slot connected to the signal, and such a persisted index must be updated
in the course of the layoutChange.

Store the indexes to persist after emitting the signal.

Task-number: QTBUG-32981
Change-Id: Ibee4c0d84817d72603a03fe5b22fdeefeac0695e
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:50 +00:00
Stephen Kelly
0874861bcc QSFPM: Remove data manipulation from move handlers
Similar to the fix in the parent commit, incorrect updating of the
internal data structures during layout changes can lead to dangling
pointers being dereferenced later.  Moves are treated as layoutChanges
by this proxy by forwarding to the appropriate method.  However, data is
incorrectly cleared prior to that forwarding.  Remove that, and let the
layoutChange handling take appropriate action.

Change-Id: Iee951e37152328a4e6a5fb8e5385c32a2fe4c0bd
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:40 +00:00
Stephen Kelly
3bd0fd8f97 QSFPM: Fix handling of source model layout change
In sourceLayoutAboutToBeChanged the source model update is ignored if
the affected parents are filtered out anyway.  The same logic is
attempted in the sourceLayoutChanged slot, but there the early-return
logic is applied too late - the mapping is cleared before performing the
early-return.  Because pointers into the mapping are used in the
internalPointer of QModelIndexes in this class, persistent indexes used
later will segfault when attempting to dereference it.

Additionally, if a parent becomes invalid as a result of the
layoutChange, it would be filtered out by the condition in the loop,
resulting in a different result in the comparison of emptiness of the
parents container.

Fix that by persisting the parent's container, and performing the test
for early-return before clearing the mapping.

Task-number: QTBUG-47711
Task-number: QTBUG-32981
Change-Id: If45e8a1c97d39454160f52041bc9ae7e337dce97
Reviewed-by: David Faure <david.faure@kdab.com>
2016-12-21 01:37:31 +00:00
Samuel Gaist
1274a7e419 Doc: Updated code sample to match documentation of QCompleter
The QCompleter documentation mentions QFileSystemModel while the code
sample still uses QDirModel. This patch fixes this by updating the code
sample.

Change-Id: I99a0d2419efcf781af3e9530508df088d77fbbfa
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-12-20 21:28:37 +00:00
Allan Sandfeld Jensen
bee9a78e13 Avoid using QRgba64 for buffers
Benchmarking showed most time rendering in rgb64 mode was spend on
memsetting the buffers because they were not declared with a primitive
type.

This patch changes the buffers to quint64, but leaves refactoring
function arguments to a later patch in the dev branch.

Change-Id: Iacc81b0d8e9570b1975dffb85c955b0aabb096a7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2016-12-20 14:56:16 +00:00
Oswald Buddenhagen
20fd99d863 fix typos in "ras[p]berry pi"
Change-Id: I2d8910df9266d9cbf2426e5f2ba2a88eb2e821ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-20 10:16:44 +00:00
Oswald Buddenhagen
33c33f6475 micro-optimize FOO-=$$BAR for empty FOO
there is no point in iterating BAR if FOO is (or became) empty.

Change-Id: I86c89bf0ad726a5ab7ead990a27ef7cc32caebbf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-20 10:16:40 +00:00