Commit Graph

29271 Commits

Author SHA1 Message Date
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Lars Knoll
792a994387 Clean up xkbcommon.pri
Don't set a variable in QT_CONFIG to build the right
things. Instead have an xkbcommon-x11.pri in addition to
xkbcommon.pri that also builds the x11 specific things.

Change-Id: I16a5f0bcb39b7f4039583a676b6c14b0e073a37f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:50 +00:00
Oswald Buddenhagen
b786993f8d fix xcb-render nesting
xcb-render is emitIf on xcb-syslibs, so it needs to move into the
respective branches in the project files.

Change-Id: Iaa6db9012287ae0e9c363ca5eeec48daad862320
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:27:44 +00:00
Lars Knoll
56ee007b3f Rework privateFeature
privateFeature would add QT_NO_FEATURE to the DEFINES in the private
.pri file, which was somewhat inelegant.
Additionally, it would add the feature to the _public_ QT_CONFIG
variable, which was plain wrong.

Replace the implementation with the one just introduced for
publicFeature, with the difference that the features are written to the
private files instead.

As this entirely disposes of the old system, all usages in the project
files need to be replaced atomically as well.

Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:29 +00:00
Lars Knoll
606924132f Add support for safe feature checking at compile time
Added a qtConfig(feature) function to qmake, and a QT_CONFIG(feature)
macro. These can safely check whether a certain compile time feature of
Qt is enabled or not.

For this to work the feature has to have a publicFeature or
privateFeature output in the configure.json file.

In pro files, please use the qtConfig(feature) test function
instead of checking contains(QT_CONFIG, feature), as the latter
will be unreliable with the upcoming modularization (it requires a
load(qt_module_config) before doing any such checks). Note that
feature names are now lowercase, and identical (except for hyphens
versus underscores currently) in the pro and c++ files.

This makes the logic easier to follow, as we avoid all double negations,
and most importantly, QT_CONFIG and qtConfig are implemented in a
way that you'll get a build error for a mistyped or non-existent
feature. This will also prevent accidental use of a widget feature
in gui in the future.

This gives us complete symmetry between the handling in pro and
c++ files.

Change-Id: I60404f97953724e639ffb6386cce2e8b1e4b735a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:17 +00:00
Lars Knoll
48b4e0bf6f Improve library version handling
Output the version as a define into the private config header as
a define using a hex number. Like that we can easily do version checks
on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK()
macros.

Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:06 +00:00
Oswald Buddenhagen
de1da50557 make bootstrapped build work entirely without generated headers
instead, the only relevant defines from qconfig.h (QT_VERSION*) are
passed on the command line, like we already did for qmake and
configure.exe.
this enables us to remove the early forwarding header generation from
qtbase.pro, and rely wholly on the regular mechanism from syncqt +
qt_module_headers.prf.
another advantage is that we can be sure that the bootstrapped namespace
is not polluted by the target feature configuration.

Change-Id: If29285cfc697ae56b591e2ff1a2114686d18fb30
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:59 +00:00
Oswald Buddenhagen
ce942a2265 sync timestamps also for forwarding headers to generated ones
this wasn't possible when these headers were still generated by syncqt,
as the targets may have been still missing at that time. however, as we
do that now with qmake, forwarding the timestamps is perfectly possible,
and is consistent with what syncqt itself does for "regular" headers.

the immediate problem this solves: when the early creation of the
forwarding headers in qtbase.pro is removed, they get created only when
corelib.pro is processed. their timestamps would be after the timestamps
of the already built bootstrapped libraries. if now the project files of
these libs get re-created, qmake's not conditional-aware dependency scan
would add these headers to the libs' deps, thus causing them to be
re-built. the re-built tools would in turn cause all mocs and thus all
libraries to be re-built. this would be particularly problematic if it
happened between 'make' and 'make install' due to another bug ...

Change-Id: I8d597f1f925369d93aaf3cc6c02e954eeae003a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:54 +00:00
Oswald Buddenhagen
34b95a643d fix relative paths in forwarding headers to generated privates
Change-Id: I837407503ef81f1059a7d531d9e57a67059855c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:47 +00:00
Oswald Buddenhagen
4b288e30ef employ QMAKE_USE: LIBS += -lfoo
this switches all instances of LIBS[_PRIVATE] += -lfoo where a config
tests exists for foo.
this removes some code duplication between tests and project files (in
case of conditionals), and ensures that the projects always actually use
the libraries configure has found.

Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:43 +00:00
Oswald Buddenhagen
d5dc46d319 employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOO
this migrates the cases where the build system already made (some) use
of variables (possibly) set by configure.

Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:36 +00:00
Lars Knoll
15bf5ef8b8 Add method to encapsulate dependencies to external libraries
Adding an entry that represents an external library to the
QT_USE[_PRIVATE] variable will cause qmake to lookup the
required compiler/linker flags from the configuration system,
and add them to the module that is being compiled.

Change-Id: I309aa2749ddf4fab13ab8fdd26e8ab2123719ea8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:26 +00:00
Jake Petroules
36ca32dbb9 Don't disable examples on iOS and tvOS
This is just an excuse to let build failures slip past CI, as has
happened and been fixed recently.

Change-Id: If4356eaced0f90c7c455b21cc7676b0c9b7b1e27
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-08-18 22:31:10 +00:00
Jake Petroules
b4ebb61c0d Don't disable QtWidgets on tvOS
There's no technical reason for this.

Change-Id: Ia57fcdfa83531155790bc4541f88479cd9d4a5a1
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-08-18 22:31:02 +00:00
Oswald Buddenhagen
6a69163055 don't exclude headers which ceased to exist in the first place
Change-Id: Ia499f8b175033b983310ab93b9d830f0177ea373
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:11:13 +00:00
Oswald Buddenhagen
19877a0507 automatically exclude generated headers from syncqt checks
Change-Id: I349a132745165f8873eda351e86bf15c90156aaf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:11:06 +00:00
Oswald Buddenhagen
a5bb91c2b8 make it possible to exclude private headers from syncqt include check
the limitation to public headers seemed pretty arbitrary.

Change-Id: I0f2290fe09c8a6a70d056ec250b902be7049790e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:11:02 +00:00
Lars Knoll
6903cad03e Make the ICO image format a configurable feature
... including a [-no]-ico command line option.

Change-Id: I3cb13d2be72b512f72f8dcdb9de72e7a99e36e47
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:57 +00:00
Oswald Buddenhagen
d90db0f136 rewrite makespec verification with qmake based system
cleaner, and covers windows as well.

Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-18 17:10:52 +00:00
Lars Knoll
97b856b788 Use the qmake based configuration system also on Windows
Adapt configure.exe to use qmake to do most of the work of configuring
Qt. This unifies a large part of our configuration system between Unix
and Windows. configure.exe is now still doing the license check,
creating qconfig.cpp, building qmake, and not much more.

On the way, re-implement the still missing Windows-specific tests with
the new system.

The opengles2 vs. opengl-desktop conditions got a bit convoluted, as
Unix prefers desktop GL, while Windows GLES2 (via ANGLE). Superficially,
there is a circular dependency, but the platform scopes are supposed to
break it.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Ia1941f2c34b7f5bd4990a7673cd737361381c2e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:47 +00:00
Oswald Buddenhagen
c027cffbef make the windows configure also use config_help.txt
specifically, make configure.bat dump the text file (which got some
windows-specific adjustments).

incidentally, this change removes the need for including a pre-built
configure.exe into our source packages.

Change-Id: Ib3515c113f3602767554fe1493df226551a7bf10
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:39 +00:00
Lars Knoll
6a90c9a8e5 Handle windows line endings and tabs in json config files
Change-Id: I154629d862977dde5232db3bb2597474b6053ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:35 +00:00
Oswald Buddenhagen
672c0b3721 unify configure command line saving with configure.exe
that is, save it to config.opt and recall it when -redo is used (and do
not write it again in this case).

a trivial config.status is still created, as having it is very
convenient when shadow-building.

Task-number: QTBUG-38792
Change-Id: I5e9f7374d6bfc60c427cbfd5e9b3e68bfcaae9f2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:29 +00:00
Oswald Buddenhagen
fd3e12e7a6 replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.

so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...

the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).

this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.

Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:25 +00:00
Lars Knoll
9172143f52 Add configure.exe-like FOO_LIBS=bar style command line options
Add the command line options supported by the windows version of
configure and respect them when running our configure tests.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I1206d60a177e251540d34d232c73c930847564b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:18 +00:00
Lars Knoll
98ddf9262e Revamp configure system for widget styles
Add [-no]-style-foo command line options for all widget styles, bringing
this closer in line with configure.exe. Add proper platform dependencies
and a configure test for the required uxtheme.h header on Windows. Clean
up and simplify styles.pri. Don't let configure.exe define QT_NO_STYLE_*
any more, as styles.pri does that locally anyway.

Change-Id: I81341f887a65b4e45e77380974eb79743acfad77
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:13 +00:00
Lars Knoll
27b03be893 Add support for locating headers and libs in qt_configure
So far we only had support for locating executables. Also
support locating header files and libraries.

Change-Id: Ib2a83e8338d2da975204089d84c608061a081f29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:03 +00:00
Lars Knoll
c8b46d3989 Implement proper dependencies for configuration tests
Some test types (like the compile tests) require that other
features have been checked before, so that the compile test
sets up the right environment. Implement this through a
'testTypeDependencies' section in the json file that explicitly
encodes those dependencies for certain test types.

This replaces the 'priority' field in the feature list.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I70e7c67a4f2c971149bcac090cecbbe9cfff3f57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:09:57 +00:00
Oswald Buddenhagen
c0cc505209 rewrite library handling in configure
so far, each library was distributed over a test and (optionally) a
'library' output of a feature. this was conceptually messy and limiting.
so instead, turn libraries into a category of their own.

libraries now support multiple properly separated sources, which makes
overriding them a lot saner. sources can be conditional to accommodate
platform differences.

as an immediate consequence, move (almost) all library references from
the config test projects to the json file.
a few tests were excluded, because they are doing somewhat magic things
that should not be handled in this bulk change:
- freetype: .pri file shared with actual source code
- clock-gettime: -lrt is conditional, and there is a .pri file which is
  shared with actual source code
- ipc_posix: -lrt & -lpthread conditional
- iconv: -liconv conditional

the multi-source mechanism is used to make a variety of tests work on
windows, where the library name differs from unix (and sometimes between
build configurations). some tests still needed minor adjustments to
actually work.

on the way, fix up disagreements between manually specified libraries
and pkg-config lines (affecting several xcb-related tests).

Change-Id: Ic8c58556fa0cf8f981d386b13ea34b4431b127c5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:52 +00:00
Oswald Buddenhagen
4b8dd9c846 fix name of stack-protector-strong feature
dashes, not underscores.

Change-Id: I51db3a5475ebf8dfe85e447baffafba225476967
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:46 +00:00
Oswald Buddenhagen
d175f799ca don't implicitly test for kms in egldevice test any more
having compound tests is messy, and we already have a separate test for
that anyway.

the kms test itself gains a fallback library, as that's what both the
egldevice test did and the actual projects using kms do.

Change-Id: I4544b64de86d58d6c6449bc0ad9095acaf144056
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:43 +00:00
Oswald Buddenhagen
492d7d14fc improve handling of test commands which produce output
never use $$system() directly, but instead use qtRunLoggedCommand() with
a newly introduced out parameter. that way we can print the command's
raw output, which should help debugging configure problems.
additionally, we now consistently check the exit code of all executed
commands, which should avoid confusing followup errors.

note that as a side effect some calls now use $$system()'s 'lines' mode
instead of the bizarre default splitting mode. this has no impact on any
of the cases, which is why it is basically a negligible style change at
this point.
however, qtLog() gained support for arguments with more than one element
to accommodate this.

Change-Id: I40d907e27de32dfec8d6086ce7d93fc4be18241f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:38 +00:00
Oswald Buddenhagen
f99f28de31 remove the [-no]-native-gestures options from configure.exe
the code which they control is dead (due to not having been adjusted to
Q_WS_WIN disappearing).

Change-Id: I4b939e10d33b9da3a5642f303a84f297549ba522
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:34 +00:00
Lars Knoll
734e0c636e Remove the [-no]-qmake command line argument in configure.exe
Qt will not build with -no-qmake.

Change-Id: I0fb5995d53fd3d6e4e5bd956929ce43432fb526d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:09:29 +00:00
Lars Knoll
81f54e5dd8 Remove some dead code from the configures
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: If725ae0abee4d636ac8775c53e34ab138d360905
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:09:23 +00:00
Oswald Buddenhagen
0b93d1a10a remove spurious QT_CONFIG -= opengl
it's not quite clear what the purpose of this is supposed to be,
especially given that the prf is loaded way after anyone would have
examined QT_CONFIG.

Change-Id: Ia49377c952902fed4084178c7f857e1acd11ad03
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:09:13 +00:00
Erik Verbruggen
3bf0c14a26 Darwin: Fix clang LTO builds
llvm-ar is not shipped as part of Xcode. Use libtool instead, just like
Xcode does.

Change-Id: Ic9c5e16c826c0d42979556f78d2cf6415542ef93
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-18 13:48:52 +00:00
Olivier Goffart
3c6220c4f8 Android selection handles
This commits implement the cursor and selection handle in the platform
plugin.

Task-number: QTBUG-34867
Change-Id: Icb3fd9ddfd9f4152e2004078a92a3d9502e9113c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-08-18 13:23:26 +00:00
Milla Pohjanheimo
bc2cee35c3 Blacklisting tst_QWidget::saveRestoreGeometry test on Ubuntu 16.04
The test is blacklisted already for Ubuntu 14.04, and needs to be
blacklisted for Ubuntu 16.04 too.

Task-number: QTBUG-46116
Change-Id: Ic321a4fd13e00c653e6c387d8a159832173b2eb3
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2016-08-18 11:37:15 +00:00
Jędrzej Nowacki
6cb5e4938d Remove declaration of QMacNativeWidgetPrivate
The class doesn't exist and should not be forward declared nor declared
as private of QMacNativeWidget.

Change-Id: I5dd5a12a372c06b6e750b33401a4960a8c884ce6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-18 11:36:32 +00:00
Timur Pocheptsov
2e4e73d8d3 HTTP/2 - fix invalid read (auto-test)
Since headersFrame is a reference to a vector's element, clearing this
vector before accessing headersFrame.flags is not a good idea, must be
done later.

Change-Id: I80eee0761ac1cad580e979be9371ec7588a694ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-17 20:23:59 +00:00
Timur Pocheptsov
3c5b9977cd HTTP/2 - do not set END_HEADERS if we have CONTINUATIONs
Setting END_HEADERS flag on a HEADERS frame means we do not have
CONTINUATION frame(s). So do NOT set it too early, only if we
fit into a single frame.

Change-Id: I891a2db227cee59e4eacfe7c2f18b431cd85fe47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-17 20:23:34 +00:00
Friedemann Kleint
02a03e52f7 QCocoaFileIconEngine: Add icon size 256
Change-Id: Ib36025f802404f74f6ce5494f3858dfe0e283004
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-17 04:44:15 +00:00
Jake Petroules
5264ddf1e0 xcodebuild.mk: forward INSTALL_ROOT from make to xcodebuild
This allows overriding the INSTALL_ROOT with the Xcode generator.

Change-Id: Ifb894bdbf9764918f76428fb32d9af68914853f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-16 21:22:20 +00:00
Jake Petroules
f1f767da92 Don't build the tests which require helpers on UIKit platforms
These tests use helpers, which are not supported on UIKit platforms.

Change-Id: I51447754dba2cd2547be05c3767e4ff3b6b5a671
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 21:22:15 +00:00
Jake Petroules
e708d63e18 Don't build the complexpingpong example on UIKit platforms
This example uses QProcess which is not available on UIKit platforms.

Change-Id: I126d20369ccf307579a60956de7769e92e17548a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 21:22:10 +00:00
Jake Petroules
dee35b5a78 xcodebuild.mk: explicitly specify the Xcode project to build
This fixes the examples build on UIKit platforms in
examples/dbus/pingpong where there are two Xcode projects and the build
therefore cannot disambiguate between the two.

Change-Id: Ic8b808c1ddf3565bb9861a487eab6854ec177184
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-16 21:22:05 +00:00
Anton Kudryavtsev
8617ce5c88 Use QStringRef() more, exploiting its new ::chop()
Change-Id: Id2201639be604b9a32b2dc5d21e675a961bee477
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-08-16 20:08:31 +00:00
Friedemann Kleint
ff00b2efbd Add " We mean it" comment to qdeadlinetimer_p.h
Fix warning:
QtCore: WARNING: qtbase/src/corelib/kernel/qdeadlinetimer_p.h does not have the "We mean it." warning

Amends change 12eacc3bab

Change-Id: Ibb8fd25cee0249380996ae271200055e131d359b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-16 15:46:20 +00:00
Giuseppe D'Angelo
8dc45d5b7c Deprecate Q(Persistent)ModelIndex::child
Due to how invalid model indices are handled in Qt, child() is unsuitable
for general purpose usage. In particular you can never get a top level
item in the model because the root model index by definition hasn't got
a pointer to the model it belongs.

That makes child() useless for anything but tree models (and even there
you'd need to special case your code anyhow).

[ChangeLog][QtCore][QModelIndex] QModelIndex::child has
been deprecated due to its lack of generality.
Use model->index(row, column, index) instead.

[ChangeLog][QtCore][QPersistentModelIndex] QPersistentModelIndex::child has
been deprecated due to its lack of generality.
Use model->index(row, column, index) instead.

Change-Id: Ice73c17133aaf71355fa2af1eacfe64da01bd456
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-08-16 11:07:03 +00:00