Commit Graph

8010 Commits

Author SHA1 Message Date
Weng Xuetian
3dbd381e03 Also use x11FilterEvent for auto repeat key in xcb.
filterEvent for QPlatformInputContext is already used for auto repeat
key, x11FilterEvent also need to be filtered.

Task-number: QTBUG-25795
Change-Id: I3db87fdffdb5b01404047e905793ae6e10bb1e90
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
2012-06-27 14:43:00 +02:00
Albert Astals Cid
175c69108a Add const & to foreach 'iterators'
Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-27 14:43:00 +02:00
Stephen Kelly
1b6c83f7a3 Document that the object of a plugin must be default-constructible.
Change-Id: Iaaf56ec3bb0d2423c8ab5deb0627dc1357cee830
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-27 14:43:00 +02:00
Stephen Kelly
c4a05f5e3a Refactor the creation of imported targets into a macro.
This will make it easier to handle cases where the Qt installation
and the build do not match exactly. For example, on Windows, it
would be possible to do:

  ./configure -debug
  make
  make install
  make release
  make release_install

In which case, both debug and release libraries would be installed
even though it was only configured with -debug. On non-Windows, the
debug and release libraries would overwrite each other, so it is
not necessary to support it.

Similarly, we want to handle cases in the future where (on
non-Windows) both static and shared libraries would be
installed (again, not described with a single build configuration).

Change-Id: Ib7916c9664a0f72e40156a03bdfc79a4a6c24350
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-27 14:43:00 +02:00
Oswald Buddenhagen
61c775684f remove abuses of warn_msg()
this function is not meant to be used for debug statements

Change-Id: I84575e64814e2c9fd2e09c33fc680d0e6648f4ea
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
533b4f1afd remove support for versioning qmake properties
the rationale is mostly the same as in 568e714fdf, plus the additional
point that the qmake version didn't change for a decade.
fallback paths for version 2.01a properties are provided.

Change-Id: I3d3f16595eca9eca71c78fda9dbaf53da9f874a9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
2106ab2e75 use source root also for finding features
Change-Id: I108914c6d2c6d06414156584aeb3a1afb0f5838d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
689aa4da2d move cachefile_depth calculation out of project evaluator
it has no business there

Change-Id: I6d1a4b55b5acacc470cc109a6c69a907abbba312
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
b6b6e85f6b remove possibility to request project recursion from within a pro file again
the feature was implemented for the abld/sbs2 generators only, and is
of course undocumented.

this reverts most of commit e795e61ef93f8080f9938ac49f2fca306644af85.

Change-Id: Ibd1726b036ce6c45f8e678ea996218f774f8aed2
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:32 +02:00
Oswald Buddenhagen
031ac3c167 dispose of Option::host_mode
it was used only for determining the path separator, so do that
directly.
the -macx option went bye bye, as it is redundant with -unix now.

Change-Id: Ib8344c042db56e05af75d263447311d4b43a3bf0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:32 +02:00
Oswald Buddenhagen
a47c6e5ea0 dispose of Option::shellPath
use isWindowsShell() in the one remaining case.

Change-Id: I25eab398ef50df5a7f4ec808279b83ca900e3c58
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:32 +02:00
Oswald Buddenhagen
e18ceca47e assume windows shell iff dir separator is backslash
Change-Id: I411a4d6691e18b818ee7d1ced7f126f97af0902f
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
c0abbd39fc reduce a bit of code dupe while assembling feature search path
instead of having a bunch of nested loops, collect into a temporary list
and process it at the end.

Change-Id: I97e5642f7e13f7c7b69eae00833e61cdf46a02ed
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
a2382f7f15 unset QT_MODULE_* after loading the module pris
abuses have been observed in the wild, so make sure these variables are
not available.

Change-Id: I502c3f5db7d341cf6a8bd2ec09e87f129da2fca6
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
104ee69216 purge "dumping all variables" debug loops
the as-we-go dump is sufficient (and usually necessary to actually find
the problem). if only the summary is interesting, the -E option can be
used now.

Change-Id: I9e34c6db9dcb99b38013c4d0cb80b8cb88ca36b5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
2ca26162f8 repurpose deprecated -E switch
instead of dumping the variables as we are going, dump everything at the
end. this is potentially useful, as opposed to the previous
functionality which was redundant with -d.

Change-Id: Icf14703cb93e03f7079dfc0266b219ad9c902133
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:30 +02:00
Oswald Buddenhagen
a54875057f make a bunch of functions const
values() and variables() get both const and non-const overloads

Change-Id: Idfabea1acc488bf78f24edb831681ee07f0074c4
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:30 +02:00
Oswald Buddenhagen
aac040b188 const correctness for variables()
Change-Id: Id11453ccbae3ffa32580badadada945d342d727a
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:30 +02:00
Oswald Buddenhagen
6957cb26b3 don't overuse variables()
Change-Id: Ib2da88e5e29c0bfecc39a9c06e82a34a4bd0b1e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:29 +02:00
Oswald Buddenhagen
cb43947738 make magicValues() const
the weird debugging feature is not used anyway

Change-Id: I07f481a94f2b2ab2a5b61270f0e00183cefd4cd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:29 +02:00
Oswald Buddenhagen
f85292ab20 const correctness for values() calls
Change-Id: I1476ae8d3fb7364686398c5650729dee94a8e933
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:29 +02:00
Oswald Buddenhagen
e0f1de0788 don't use backwards compat mapping for generator accesses
we can rely on only user code needing variable mapping, so apply it only
in the evaluator.

Change-Id: I6fc58e7bcf24cf0fa8783d5341ab1e7b9f001c88
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
79d6839306 introduce magicValues() function
the only place where the two remaining magic values need to be
referencable is doVariableReplaceExpand(), so make a separate function
and use it only in that place.

Change-Id: I6e2fcfa3a4f16727d90ace56eb88fc99ef272ffc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
96702729c8 make $$PWD non-magic on read
like the other variables, we can just store it in the hash.

Change-Id: I49ad39dca8d498119b27f16ea4bdc44ae698d72e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
5ef3c155db set $$_DATE_ only on project startup
this changes the semantics a bit - it will be the datetime of qmake
startup rather than the time a particular file is processed. i'd argue
that this is insignificant.

Change-Id: I75918967bef25038ce54aa81ab03c027384c0268
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
b2b72eea04 deprecate $$IN_PWD
it suggests a symmetry to $$OUT_PWD which simply isn't there. the
shorter alias $$PWD is much more popular anyway.

Change-Id: Iefbfd56f1a3e526f15c9d6cd1bf59778be6f2f8d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
dfbaf479c8 make project-related variables non-magic
$$_PRO_FILE_, $$_PRO_FILE_PWD_ and $$OUT_PWD can be cleanly initialized.
no need for magic.

Change-Id: I2e339d17bae42ecb573c2f82c716f6be15a35b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
b1c92a3dea move initialization of $$TARGET to setupProject()
that's what we have it for

Change-Id: Ib734b97d337a82c73b086dfeb2b263171f2a02b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
075d4a6d5d make $$TEMPLATE magic on write instead of on read
Change-Id: I03a68993dd7d4488f8212132a9d492d135295b9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
602ef59e85 make a bunch of invariant variables non-magic
instead of resolving them on-demand, just initialize the value hash
with them. less magic and faster.

Change-Id: I28cb6c21ae6ae60a33734f62acdef0794420ba8f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
95e7106400 don't make $$TEMPLATE_PREFIX available any more
this is a purely internal variable. projects are supposed to
query $$TEMPLATE only.

Change-Id: I32a3aa7012a4fedcf6e77e2e1302ed978baac700
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
b40b91cb39 move initialization of numerous variables to spec_pre.prf
this is cleaner by design and allows removing some hacks.

Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
1b1aa3b4f8 remove QMAKE_EXT_H_MOC and QMAKE_CPP_MOD_MOC from Option
these are not actually used inside qmake since ever the code was factored
into moc.prf.

Change-Id: I545f4857ca3f0b4bf2439703700069ac67ad4ca2
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
621b42e53d purge QMAKE_MOD_SYSTEM_ENV from Option & co.
this is entirely unused

Change-Id: Ia0368b1d90f61b64178e28479a2088a19aa418e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
073badf9d2 don't read QMAKE_DIRLIST_SEP back into Option::dirlist_sep
it's really only a host setting which is not used any more past the now
removed assignment.

Change-Id: I62c61c893697eb9a7e7be550311bf152d5a8206e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
f375fa19c9 don't make prf_ext overridable
it's entirely pointless

Change-Id: I1da3c05a0b4f6ac8cea6ecc64ce3a237957440f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
bc05c9aee8 don't copy files to default specs any more
now that the default specs really only forward to the real specs,
it is not necessary to copy any auxiliary files.

Change-Id: I169a61a045063b796062fe6af3a2afbe3f1c9da0
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
dafc4a884c don't put QMAKESPEC_ORIGINAL into INCLUDEPATH any more
the spec does that itself, given that the real spec is just included
nowadays, instead of copied (which never worked without side effects).

Change-Id: Ibf655b9a943dadb949d3c7a58d8fe50fcd62cef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
4b637bf1f0 fix specdir()
get the actual spec path directly from the project - the specs in Option
are not necessarily resolved.

Change-Id: Ia2bf2199c5269aa5b5a9d4c38de36171f25d448b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:23 +02:00
Albert Astals Cid
7a0f14c569 Remove .values() call in foreach
foreach already knows how to iterate over the values without the need to create an intermediate qlist

Change-Id: I4622a36fbdbf536a75f26b42e32488a77d078f02
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-27 12:46:47 +02:00
Thiago Macieira
9a2dca09a3 Remove deprecated method from new class.
I'm pretty sure I've caught all uses of deprecated methods throughout
the Qt codebase, except for the ItemViews changes and for QtWebKit
(which must still compile with Qt 4).

Change-Id: Ic17801b71434fa41c647f97c9e5e4234ad4f9af0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-27 12:39:53 +02:00
Thiago Macieira
dc56fb18a7 Remove the extra warnings and -Werror from tst_qmimetype
Those belong in headersclean and nowhere else.

Change-Id: Ib7078ef3071266e4c03e3580068f978a9418cbf1
Reviewed-by: David Faure <faure@kde.org>
2012-06-27 12:39:53 +02:00
Friedemann Kleint
bc8cafcf64 Add QPA prefix and version number to QPA plugin factory interfaces.
The interfaces may change in Qt minor versions.

Change-Id: I43bc6245ddbba8232e00313bdc64e8e60c7eab6f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-27 12:39:53 +02:00
Miikka Heikkinen
3812af8ad0 Fix raising and lowering native widgets
Raising or lowering a native widget needs to raise or lower the
associated platform window, too.

Task-number: QTBUG-26344
Change-Id: Ib847d97df86857d92bcc4c9c0dd51219575d8db1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-06-27 12:39:53 +02:00
Oswald Buddenhagen
caa2263051 use real qmakespec as basis for finding features
doesn't make much of a difference on unix (as the default specs are just
symlinks).
on windows, it makes the gross hack used for finding spec-specific wince
default_post.prfs unnecessary.

Change-Id: Id403dce5be487e1ae22c1f54b8095a6afdd98bc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:51 +02:00
Oswald Buddenhagen
30d1522b7a resolve real qmakespec name right after loading it
this is cleaner than resolving it on-demand, as it avoids statics (with
potential side effects on dynamic spec switching).

Change-Id: I2bc15a4c3108376e1b4a01351875fe0c445ee5d5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
32bc46a90b remove support for loading features relative to current directory
it's completely counterproductive. just include() the file instead.
i don't think anyone knew about this "feature", so just removing it.

as a side effect this removes the repeated existence check of already
found feature files, as we can use a clean else-if cascade.

Change-Id: I5d38d38d0a897f2e8857ac68d5649fd4367941c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
4753958db7 revamp handling of qmake target mode
the project evaluator becomes oblivious of the target mode.
the mode is set up in spec_post.prf according to the spec.
$$QMAKE_TARGET contains the feature suffixes to search, and is also
contained in $$CONFIG.
the target_mode variable itself becomes private to the Makefile class.

Change-Id: I3c06d9dab536b753343cec6c5c491d3203e50bd8
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
777fa561ab read spec_pre and spec_post features
these are read before the qmakespec and before the cache, resp.
this will allow moving some hard-wired logic out of qmake.

Change-Id: I6a63050d7798bc30a4add8c009bcd801a29a0deb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
88b4ee22c9 prune feature search paths which don't actually exist
this should significantly cut down the time wasted looking for files in
non-existing directories, in particular on windows.

Change-Id: I7ab3523fe8c028e3787ebc78e4543ab04f53448e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:50 +02:00