Commit Graph

8086 Commits

Author SHA1 Message Date
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
Oswald Buddenhagen
5ced28ed3f eliminate some use of base_vars
this limits references to this variable to its setup and explicit cache
manipulation.

Change-Id: I88dd2418051501abea201f223da7759a15f1c249
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
757cad45d7 purge the integrity target mode
it wasn't really wired, so the only effect it had was disabling the unix
scopes (despite an attempt to override that in the spec, which probably
worked before qt 4.6, and will start working again soon).

Change-Id: I95daff75b508edaf83a8a06fd327350acd62b124
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
0ce1a6ba24 don't let the make spec determine the host mode any more
(some of) the generators are (moderately) x-platform, so it makes no
sense to nail the host platform to a generator (and thus a spec).
overriding the host platform is only a debugging mesasure anyway, so one
can use the (now undocumented) -unix/-macx/-win32 options for that.

Change-Id: If2a059f1feeb2c726e5838625ede1c7add829985
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
fc1bca8608 repurpose -unix/-macx/-win32 options
they have been deprecated long enough, so we can mess with them now.
don't make them set the target mode any more; the makespec can do that
autoritatively. instead, they can be used to override the host mode for
debugging purposes.

Change-Id: Ife5fdcf4f1b6b926901a80896ac92b7d821278d1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:49 +02:00
Oswald Buddenhagen
16785c4c14 do not unnecessarily mess with CONFIG
it could/would bite us later

Change-Id: I73f989e7603c6e5b7b85fc4ee4ad2557c1b02d80
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:01 +02:00
David Faure
2246e48a76 Add QGuiApplication::setApplicationDisplayName.
This is for use in window titles.

Change-Id: I0070a08abd379ae2edcfab4413c182bd9e840678
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-06-27 09:23:15 +02:00
Shane Kearns
ae7e9a407f Add \since 5.0 to QDir::removeRecursively
Change-Id: I2392f26e666d5e01e71932f1afa48a65704f6d48
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-06-27 03:55:29 +02:00
ABBAPOH
8655f57bb5 Remove debug output
Change-Id: I07270211ee6f0439dc7249c8946795a68025828f
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: David Faure <faure@kde.org>
2012-06-27 03:55:28 +02:00
jian liang
6bf119afc7 Workaround to compile configureapp.cpp with MSVC2010 x64
Remove a non-ascii character from configureapp.cpp to let it to be
compiled successfully with MSVC2010 x64.

Change-Id: I0b016630be49e8731cc438abca4ef959124138be
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-27 03:55:25 +02:00
Lars Knoll
3a8d7b0b9a Remove all references to XLFD fonts
XLFD fonts are no longer supported in Qt 5.

Change-Id: I83400dab417c933d5cd956c0d168c45b9d79dab7
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-27 00:46:35 +02:00
Oswald Buddenhagen
989cada8cc don't compile the host tools for wince already in configure
qmake can now produce proper mixed-target projects

Change-Id: I797f055f6e1487b9aefb75eee91d6c2cc4e6e56e
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-27 00:46:35 +02:00
James Turner
9315497d2a Convert QPA menus to use QIcon, and enable icons.
Icon support was disabled in QPA menus, now QIcon is in QtGui, convert the QPA interface, enable setting the icon in QMenu, and make the Cocoa implementation use it. (And fix a ref-counting leak if an icon is actually set)

Change-Id: Ica203bf6826b79d8beee58f39febc851b9633a66
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-06-27 00:46:35 +02:00
Shane Kearns
c0a0b37103 Implement RFC6265 test suite
Tests against the test data from the IETF working group
https://github.com/abarth/http-state

The test data is in the parser.json file, imported from that repository
and with one patch applied to make the ordering0001 test case data match
the raw files which are used by their python test server.

Task-number: QTBUG-18920
Change-Id: I17c1a8d92aef2850907f009667c6574e4c8d0cdb
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
3ff70a838b QNetworkCookie - ignore unparsable expires attribute
As required by RFC6265, if the date can't be parsed then the
attribute should be ignored but not the whole cookie.

Task-number: QTBUG-15794
Task-number: QTBUG-16798
Change-Id: I2ed2fbbaf2d00b194995349c24b174032a599703
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
cf29b7b967 Ignore empty domain attribute in cookies
As recommended by RFC6265.
This fixes the optional-domain0042 test case.

Task-number: QTBUG-15794
Change-Id: I6dd459797afcb52fa2a78437f8481f5abc6f3105
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
058fddd1c0 Use RFC6265 rules for cookie path & path matching
Url encoding of paths is no longer used. This matches the
current release behaviour of Firefox, Chrome and MSIE browsers.
RFC6265 does not allow this type of encoding.

This fixes remaining path test cases in the IETF test suite.
Currently the path0027 test is passed by Firefox but failed by
Chrome and MSIE, so there is a potential compatibility issue.
However it is a corner case with a malformed cookie.

Task-number: QTBUG-15794
Change-Id: I9b02bb5adc32d614f512d314d06f2c60894aa2b0
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
d76bd0d735 QNetworkCookie: Use RFC6265 rules for parsing Set-Cookie
The ';' separator takes priority even inside a quoted string.
Quotation marks have no special meaning, they are not parsed and
regenerated anymore. This means it is not possible to include
the ';' character inside a cookie value.
Other characters are returned transparently, including [",\]

Task-number: QTBUG-15794
Task-number: QTBUG-26002
Task-number: QTBUG-11641
Change-Id: I4eefef5c6ac7753d5a21c226169e264578521fe9
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
7b61e60676 QNetworkCookie - use RFC6265 rules for max-age
If unparsable, ignore the max-age attribute but process the rest of
the cookie normally.
If max age <= 0, set expiration time to "earliest representable time"
To keep this a safe value for conversions, time_t of 0 is used.

This fixes cases 0019 and comma0005 in the test suite.
Due to this change, cookies may be sent after they should have expired
in case the max-age was malformed. Previously they would have been
discarded immediately, which is more likely to break web services.

Task-number: QTBUG-15794
Change-Id: I7882af8eb37db156785e4e358ca639e90c94f8d0
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
57adc1761d QNetworkCookie - ignore unknown attributes
RFC6265 clarifies that unknown cookie attributes should be ignored,
including the version attribute which was defined by RFC2109 but
not used correctly in practice.

This fixes case 0008 in the test suite with minimal risk.

Task-number: QTBUG-15794
Change-Id: I6f15e8e5e2e5f1ed168fc733a5c84d606a452252
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
a32d6834ad qget test - fix null pointer dereference
If the server sends a redirect with no body, the file is null

Change-Id: I49fd1d8a4cdd404497ebef4c7f3b478960776896
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Shane Kearns
74d3963c25 Change invalid test case (two cookies separated by ,)
Two cookies in a single Set-Cookie header are no longer allowed.
Check that this header is parsed according to RFC6265 rules instead

Change-Id: Ice48bbe78a9886208f7d1186cf1d8c37f46f1252
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-06-27 00:46:35 +02:00
Peter Hartmann
bd38ff3c54 QNetworkRequest autotest: adapt to new cookie parsing (re. commas)
Cookies cannot be separated by commas anymore, but are separated by
new lines.
See "Remove support for multiple cookies in one Set-Cookie header to
follow RFC6265."

Reviewed-by: Martin Petersson
Task-number: QTBUG-21456
(cherry-picked from 5d809703aa2d2a08ae7e9610fd42025b081d3d0c)

Change-Id: If7d1b4e58399a5d678495af6ff280409ba220e86
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-27 00:46:35 +02:00
Jocelyn Turcotte
297a25cc4b Remove support for multiple cookies in one Set-Cookie header to follow RFC6265.
This also allows cookie values to contain commas to increase compatibility like
most popular browsers do even though the RFC still reserves them for future uses.

Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Task-number: QTBUG-21456
(cherry-picked from 8ba781b01e900148fec2e9d26485369b3295487f)

Change-Id: Ib09ab2411dddf7f99de1c0c31680428b7412fc7e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-06-27 00:46:35 +02:00
Morten Johan Sorvig
e1402c0d27 Add a method for querying window activation status from QPA.
Add QPlatformWindow::isActive(), where the platform
can do further isActive tests, and Windows implementation for it.

Change-Id: I1acfc44d3a4ab36a3aaee52fb7b5f5b40661095e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-27 00:46:35 +02:00