Commit Graph

130 Commits

Author SHA1 Message Date
Thiago Macieira
c67a5df8d8 Rename the syncqt -qtdir to -mkspecsdir
It's actually looking for the mkspecs (so it can read qconfig.pri to
get the Qt version), so give it exactly what it wants.

Change-Id: I2957b2d93a8837b8492d313209d45ff3ec01704c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 00:44:54 +02:00
Oswald Buddenhagen
0986448647 restore compat with old perl: don't use \h in regexps
Task-number: QTBUG-27543
Change-Id: I94a1368de69faeabe359e2c5e1f22879e9e96cc8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-16 17:31:31 +02:00
Friedemann Kleint
69d1a4edb9 syncqt: Fix warnings about missing QT_BEGIN_HEADER/NAMESPACE.
Do not print warnings when stop-processing pragma was encountered.

Change-Id: I0dd3b317b3a685afe613527988eb137325037e16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-13 05:51:19 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Oswald Buddenhagen
695051f3be move the module validation below the loading of sync.profile
otherwise the -module option will always die.

Change-Id: I023ea5681a03a2848e1084eedbbcc66f8d060b69
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
cef552a741 remove setcepaths.bat
we don't need it any more, as the makefiles are self-contained now.

Change-Id: I1a560a8331856e246e03c55ec1b1dd1a5cb112e4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-11 17:24:15 +02:00
Oswald Buddenhagen
8d97eb298d introduce -minimal mode to syncqt and use it for bootstrapping
the bootstrap does not need CamelCase includes, deprecated headers and
whatnot, so just don't do it. the full thing will be run on qtbase by
qmake.

Change-Id: Idffdd4750a73574c8c32ee75d00080abfe37e03c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-11 17:23:27 +02:00
Oswald Buddenhagen
8a879a6148 de-duplicate code
Change-Id: Ic3f2bfeb5a16da86b1cd471b55dfc79f12dfadee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-08-28 20:47:11 +02:00
Marc Mutz
d811b2434b syncqt: parse classes that use Q_DECL_FINAL|final|sealed
I've introduced a variable $post_kw (post-class-keywords) that
contains the patterns which are expected after a class name.
This variable is used both for a negative look-ahead assertion
in the class-name capture (so the regex doesn't parse the
keywords as the class-name), as well as to carry the parser
over the keywords into the subclass clauses.

Change-Id: Ia534ca01a511e1c773d007f1b0b4f448e8d009d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-26 14:29:51 +02:00
Lars Knoll
a70eb262c1 Skip doc subfolders when checking includes.
This removes the bogus warnings when running
syncqt from configure about snippets in the doc/
folders.

Change-Id: I8e3d258238c1cd1e763ce63b895d58b68bbc06f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 15:37:46 +02:00
Oswald Buddenhagen
444cbd53e2 make sure that the stale header removal works the first time around
sort backwards by ascii, so that the lowercase headers come first -
otherwise the camelcase headers would survive the first round, as they
include the lowercase forwarding headers which were not deleted yet.

Change-Id: Iece2788206d31a11428f38da8d8f9f4d0b6dc992
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-27 16:19:43 +02:00
Oswald Buddenhagen
28d5967e68 generate the module version header directly in the include directory
... instead of having a forward from the include dir to the (shadowed)
source dir of the module.

Change-Id: I967227950e8aeb1b9f62befbf9fff3746a0486b6
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-18 19:48:59 +02:00
Oswald Buddenhagen
311fe0e811 remove support for forwarding module pri creation via syncqt
now that all modules have migrated, this dead code can be removed.

Change-Id: I5e9c7dd3fb271346d1b5f0e2930874da3e4d2d57
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-16 18:34:06 +02:00
Oswald Buddenhagen
b175e7b7c9 remove support for syncqt-based config tests
now that all modules have migrated, dispose of the clutter.

Change-Id: Ib8937c1452536f645b76c0097b927df1108afc1a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-12 17:18:36 +02:00
Girish Ramakrishnan
037238022f Make QWindowSystemInterface part of QPA API
As discussed on mailing list and QtCS 2012.

Any file starting with qwindowsystem is now marked as
QPA API.

This change drops _qpa from the filenames and adds gui-private
where required for the code to compile. This change is backward
compatible otherwise and compat headers are created for
the old inclusion headers.

Change-Id: I72ea0f394dee74f46e614fcf11ab5500ac9fef2a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-07-03 01:55:37 +02:00
Oswald Buddenhagen
a56ef02b2d let default_pre add modules to the qmake path
that way qmake is made aware of the forwarding pris which are generated
for this module even when a top-level .qmake.cache prevents the module's
root from being found automatically.
the path is also added to the cache, so that subsequent partial
qmake-ing of the tree will still find the module.

this also makes the -cache-module-fwd parameter of syncqt useless, so
remove it.

Change-Id: I2afbc52a465c0b3260e9bcaf032c43a82ae8061f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
32042413f2 move generation of module master headers to qt_module_headers
this has the advantage that the %mastercontent assignments in sync.profile
are not necessary any more. as it happens, most modules got them wrong
anyway.

Change-Id: Ibdf689be408f18e1d90c44ef4ecacd7c24b1f1c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
8dba9e50ac make master phonon compat header a forwarding header
instead of writing the same file twice, just forward to the compat
header, like it is done for every other header.

Change-Id: I8c908f80149aff4720cca6d51ab5b550c31f78b1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
2d8dd9a6c9 do not route qtmodule-configtests invocation through syncqt
there is completely no reason to do it.

Change-Id: Ie186ef4c1bbd12c256acb2fe374d12ebe777d6c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:57 +02:00
Oswald Buddenhagen
0b76b7ab8a auto-generate module pris
Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:06 +02:00
Oswald Buddenhagen
95b2e051f9 move creation of module version header to qt_module_headers
Change-Id: I650b495ec1789eb03b31d796f9f475ba01aab2d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:05 +02:00
Oswald Buddenhagen
e0839abbb4 create module version headers in build dir, not source dir
Change-Id: I07bf4dbeba2d35284ecf55542f9cd457b2e49b80
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:05 +02:00
Oswald Buddenhagen
3c69bb8291 make %inject_headers a per-module config value
it's module-specific.
on the way, fix it to actually support multiple files.

Change-Id: I796b0e98e38a54754022e0e2fa48cecb54d06ff4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:05 +02:00
Oswald Buddenhagen
61bcd838fa automatically add the module version headers to %classnames
Change-Id: I7706a0d54e704320e9e1e480b387e46417739ccf
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:05 +02:00
Oswald Buddenhagen
94bd205575 make sure that forwards for injected headers are not garbage-collected
qmake-generated version headers don't exist yet at the time syncqt runs,
so the forwarding headers would be deleted - just to be re-created a
moment later, thus changing the timestamp for no good reason.

Change-Id: I1b4c2f05f57c2315adf4b8dd726ea413ede1be5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:04 +02:00
Oswald Buddenhagen
912f7efbd4 fix status output for generated headers
Change-Id: I92c250037eb1b1838998cddbaea6ca065153e86e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:04 +02:00
Oswald Buddenhagen
a8ad1e77ba generate fwd-pris in qt_module_config, not in syncqt
the forwarding pri is loaded even if it was still created by syncqt, so a
top-level qmake -r will still catch it even in the future.

Change-Id: I2e4b556cd06eb88be9ee378662a2e6e1bff67ad7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:03 +02:00
Oswald Buddenhagen
45711a8b73 write forwarding pris to $outpath/mkspecs/modules
this makes qmake find them automatically now.
consequently, also do not write QMAKE_EXTRA_MODULE_FORWARDS to
.qmake.cache. still write the cache file, though, as otherwise a
top-level cache would mess up the module root detection.

Change-Id: I998b94fcc73ca3f8bf1af09a394ff8d40cf1fb76
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:01 +02:00
Oswald Buddenhagen
ab9f0e694f move $QTDIR handling out of syncqt
instead, always pass -qtdir (which, btw, is a slight misnomer - it
should be -qtdatadir) with the correct path. this centralizes the
relevant logic in default_pre.prf.

Change-Id: Icc788d3f3e5f7b68b444e63e181efdea3b4ef160
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
c98b223567 rewrite fixPaths()
now the phonon paths are actually normalized.
just relying on File::Spec for the path relativization, so the code is
much shorter.

Change-Id: I69d6bac73e366ed0f754e1282a375871ce5559c4
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:53 +02:00
Oswald Buddenhagen
800aef3424 remove dead variable
Change-Id: Ic37c2a0da6346f044df10c7d8b5ee1a95efcc29c
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:53 +02:00
Oswald Buddenhagen
208184071e don't use abs_path on input arguments
for one, the input paths are already absolute.
second, if a path does not exists, abs_path will fail, which makes the
fallback code which tries to create them rather pointless.

Change-Id: Ie56ff09313e48e82e8bc8e8f06eca384644de464
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:53 +02:00
Joerg Bornemann
6375cbf99a make syncqt work with MSys Perl and MSVC
The common root dir detection was broken, because
of an inconsistent root drive path style:
    <srcbase> = /c/dev/qt/5.0/qtbase
    <outbase> = C:/dev/qt/5.0/qtbase

Now we don't need ActivePerl anymore.
The Perl that comes with msysgit is enough.

After every Perl function call that returns a file path
we need to normalize it to bring it into a form that can
be used by
    - Perl functions that take a path as parameter,
    - C++ sources as include file path,
    - qmake's .pro files as include file path.

Task-number: QTBUG-25912
Change-Id: If1cf56cc7246a9d6535cd3867222f225d1617712
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-01 18:26:18 +02:00
Girish Ramakrishnan
33edd606ae Fix qpa legacy headers installation
syncqt is run twice when using the top level configure (as in
the CI system). The pri_install_files and pri_install_pfiles
variables are not populated if the file already exists when
generating the compatibility headers.

Therefore, headers.pri ends up with different content in
each syncqt run. In the first run, the compatibility headers
are part of SYNCQT.HEADER_FILES. In the second run, they
are not part of it since the header files already exist.

Change-Id: I4908fb934a639a3c9f6af1796d56a40fd4df2d50
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-05-09 06:42:25 +02:00
Girish Ramakrishnan
4a58853aea Fix qpa files installation
qpa header files were not installed under qpa/.

Change-Id: I243c3a7e83a342f7485791a1a29b65c9a8f25d6b
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-05-08 20:03:49 +02:00
Girish Ramakrishnan
36547f4eff Expose QPA API under qpa/*
The main reasons for doing this are:
1. _qpa.h end up in the master QtGui include file. QtGui is meant for
userland applications. qpa code is neither binary nor source compatible.
Inadvertant use of QPA api makes the user code binary-incompatible.
2. syncqt creates forwarding headers for non-private header files. This
gives people the impression that this is public API.

As discussed on the mailing list, even though QPA api is internal and subject
to change, it needs to  treated differently from private headers since they
will be used by  in-qtbase and out-of-qtbase plugins.

This commit does the following:
1. The _qpa in QPA header files is dropped.
2. syncqt now treats any file with qplatform prefix as a special file and
moves it to qpa/ directory. The recommended way of using QPA API in plugins
is: #include <qpa/qplatformfoo.h>. This allows the user include QPA API
from multiple modules (for example, qplatformfoo might be in QtPrintSupport)
3. The user needs to explicitly add QT += <module>-private to get access to
the qpa api.
4. Creates compat headers for the olden style qplatformfoo_qpa.h and QPlatformFoo
includes.

This commit does not change the cpp filenames. This requires a more careful
merging of existing non qpa cpp files and existing cpp files on a case by
case basis. This can be done at anytime.

The following files are not renamed as part of this changed but will be fixed
as part of a future change:
src/gui/kernel/qgenericpluginfactory_qpa.h
src/gui/kernel/qgenericplugin_qpa.h
src/gui/kernel/qwindowsysteminterface_qpa.h

files were renamed using

    for x in `find . -name "qplatform*_qpa.h"`; do git mv $x "${x/_qpa.h/.h}"; done
    for x in `find . -name "qplatform*_qpa_p.h"`; do git mv $x "${x/_qpa_p.h/_p.h}"; done

includes were renamed using script

for file in `find . -name "*.h" -or -name "*.cpp" -or -name "*.mm"`; do
    sed -i -e 's,.*#.*include.*<\(Qt.*/\)\?\(QPlatform.*\)>,#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\)\?\(QPlatform.*\)",#include <qpa/\L\2.h>,g' \
        -e 's,.*#.*include.* "\(qplatform.*\)_qpa.h",#include <qpa/\L\1.h>,g' \
        -e 's,.*#.*include.*"\(qplatform.*\)_qpa_p.h",#include <qpa/\L\1_p.h>,g' \
        -e 's,.*#.*include.*<\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)>,#include <qpa/\2\3>,g' \
        -e 's,.*#.*include.*"\(Qt.*/\|Qt.*/private/\|private/\)\?\(qplatform.*\)_qpa\(.*\)",#include <qpa/\2\3>,g' \
        $file
done

Change-Id: I04a350314a45746e3911f54b3b21ad03315afb67
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-05-07 20:25:24 +02:00
Lars Knoll
eef3f8c58a Ignore moduledir/doc in syncqt
When modularizing our documentation, module level
documentation is supposed to go into a doc
subfolder in the modules sources. Since this folder
also contains header files (snippets), we need to ignore
it in syncqt.

Change-Id: If8159816b042a1a6c810eaa0b6dbd99bf58d8ffa
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-04-17 23:16:51 +02:00
Denis Dzyubenko
8692326629 Fixed syncqt to ignore all lines that define Qt namespace
That includes non-standard macroses for QtAddOns, e.g. for QtJsonDb addon the
macro looks like QT_BEGIN_NAMESPACE_JSONDB - by default syncqt doesn't
recognize the macro and concantenates it with the next line in the header file,
which breaks forward include generation if that next line is the class
definition.

Change-Id: Ia269f8a091113e4951d6a2615ef392b21bd5e3a3
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-04-11 01:42:12 +02:00
Girish Ramakrishnan
1e13160a00 Fix qtmodule-configtests to honor error codes
The test is marked as fail if qmake or make fails.

Change-Id: I565c68af4a9271d7aa36fb592ac399aa728ba4d8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
2012-03-08 23:52:34 +01:00
Matthew Vogt
1f80ce8135 Report failure to open deprecated header file
If a deprecated header file is not writable, report the error message.
The existing error message statement is not processed due to an
operator precedence issue.

Change-Id: Ifb2d4e234c64e560d05c021c621966bce19ce215
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-23 04:04:59 +01:00
Matthew Vogt
4816c42115 Ensure the directory exists to receive a deprecated header.
When creating a deprecated header, create the directory it will be
located in, if it does not yet exist.

Change-Id: Id0ac7327e7dfe5b3e34b431c7bc3844b72251a3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 13:25:46 +01:00
Oswald Buddenhagen
cd2a2251d1 make locateSyncProfile() a "tad" less convoluted
Change-Id: I261b6c6b42bed576edb8a1d8420da19d34bd87a1
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-10 00:27:44 +01:00
Lars Knoll
96501b0a18 Move QtConcurrent into its own module
Task-number: QTBUG-20892

Change-Id: I614500aafb6428915509983608bbb0ade4e4f016
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 17:49:16 +01:00
Bradley T. Hughes
f6f1a2dbc1 Revert "Put the generated <module>version.h into build tree"
After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component.

This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf

Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2012-02-01 10:48:09 +01:00
Xizhi Zhu
ba9302b8a9 Remove Symbian specific code from qtbase.
Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 07:08:31 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
Liang Qi
273715fc9b Put the generated <module>version.h into build tree
It was put in source tree before.

Task-number: QTBUG-20439
Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-28 14:44:48 +01:00
Denis Dzyubenko
6b46741876 Added $publicclassregexp variable to sync.profile
$publicclassregexp specifies the prefix for Qt classes in a qt5 module. For example
in QtJsonDb all classes have "JsonDb" prefix and forward include headers were
not generated properly - e.g. "jsondb-client.h" was generated in the include
folder, but "JsonDbClient" (which matches class name) was not.

Change-Id: I6b57a799d926254e2ab3fd00fa6e38f95b8eb96c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
2012-01-27 22:48:41 +01:00
Oswald Buddenhagen
11eefaf0f7 remove bogus comment
Change-Id: Ibd2d974ac46f80953f628e8d7c93e742e4c8eb23
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-01-27 13:55:43 +01:00
Oswald Buddenhagen
e924143a90 delete handling of dead -base-dir argument
Change-Id: I4f69ea213f996f99d2ad8b00efbaf85882e59e27
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-01-27 13:55:36 +01:00