Commit Graph

22 Commits

Author SHA1 Message Date
Thiago Macieira
6668f5becf Implement a more direct headersclean check
Test each include file directly, instead of doing a large #include. This
verifies that each header is compilable on its own. One big advantage of
doing it via a special compiler in qmake is that we skip pre-compiled
headers, which has hidden build errors in the past.

This solution is implemented by making syncqt produce a second list of
headers.  This list is the same as the list of headers in the source
code to be installed, minus the headers that declare themselves to be
unclean, via the pragma:
  #pragma qt_sync_skip_header_check

This mechanism is applied only for public libraries (skipping
QtPlatformSupport, an internal_module).

This test is enabled only for -developer-builds of Qt because it
increases the compilation time.

On QtTest: the library only links to QtCore, but it has two headers that
provide inline-only functionality by including QtGui and QtWidgets
headers (namely, qtest_gui.h and qtest_widget.h). If those two modules
aren't getting compiled due to -no-gui or -no-widgets to configure, we
need to remove the respective headers from the list of headers to be
checked. If they are being built, then we need to make QtTest's build
wait for the headers to be generated and that happens when qmake is
first run inside the src/gui and src/widgets directories.

Change-Id: I57d64bd697a92367c8464c073a42e4d142a9a15f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-04-17 00:54:45 +00:00
Jani Heikkinen
cb95fff1c7 Fixed license headers
Change-Id: Ibebe1318d1c2de97601aa07269705c87737083ee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-17 18:46:09 +00:00
Oswald Buddenhagen
b6f0060f60 support spaces in build and install dirs
spaces in the source dir are not supported for now, as that requires
some more profound refactoring of the bootstrap makefiles.

Change-Id: Ie0c07a1558b8326f642f2ea144bc1cd85ee761af
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-02-17 18:28:00 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Thiago Macieira
1eb7005850 Use the new warning enabling/disabling macros in qtbase
Change-Id: I91ff06644e8047c2ca483f9768b46c1372eb6171
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2014-12-03 18:09:17 +01:00
Olivier Goffart
84e189502a syncqt: Fix regexp capturing class names of partial specialisation
Example with this code:
"template <class Key> struct QHashNode<Key, QHashDummyValue> {"

The previous regexp would take "QHashNode<Key," as some keyword,
and "QHashDummyValue>" as the class name.  By forbidding '<' in the
keyword, we avoid such mistake

Change-Id: I5d5077b9e5e764e91899bcaef137d99214ea5d63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-08 16:12:44 +02:00
Oswald Buddenhagen
f8c5dd9857 automate handling of generated headers some more
let the syncqt + qt_module_header.prf pair handle generation of
forwarding headers.

in qtbase this is ineffective to some degree, as the need to create
QtCore's forwarding headers early for QtBootstrap requires qtbase.pro
already doing the real work, but at least we get the verification that
nothing breaks.
Other Modules (TM) will need the full functionality.

Change-Id: Ifd3dfa05c4c8a91698a365160edb6dabc84e553f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Oswald Buddenhagen
46feffea1b de-duplicate header install source calculation
Change-Id: I7c26d70fdfceac6d3c562e704cc725fad80c4f59
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Oswald Buddenhagen
e8b2ff63ec remove duplicated nested condition
Change-Id: I433773dbf21a7a7625d4f763b3cebe75c746aa1f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Oswald Buddenhagen
40babf8b4a un-pluralize code
since ever we've thrown out the phonon hack, each header is synced to
only one location (CamelCase headers notwithstanding).

Change-Id: Idfef33db9410908aefe309bc7a3edeae5fc5a671
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Oswald Buddenhagen
6571aaf1c4 merge %explicitheaders into %classnames
no need to have two mechanisms for the same thing.

the values of %classnames can be comma-separated lists now, so one
header can have multiple classes assigned. conversely, if an extracted
class name reverse-maps to a different file name, it is omitted.

Change-Id: Ia0a35d64764b6376f33b77bbfe59e1df70a3cf1a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Oswald Buddenhagen
3d50a09645 remove vestiges of uic class map code
amends ad52be1ac.

Change-Id: I2bfb10908217708c4f046d0d315dadd1b626da12
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-28 03:17:11 +01:00
Frederik Gladhorn
e5bcf68d30 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-06-15 22:39:25 +02:00
Oswald Buddenhagen
af2f1e14f6 don't touch deprecated headers unless they actually change
Change-Id: Iabeec90c2a6549cf92b3b8369a41764a576fd0aa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:06 +02:00
Oswald Buddenhagen
ad52be1acc purge dead uic class map code.
Change-Id: I9b67924a66c847cd4cf2ce9f2996017ae7eb61a4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:03:01 +02:00
Oswald Buddenhagen
f5a5272bc7 remove unused symlinkFile() function
Change-Id: Ie235fe65020ed7c4870d9c8784a181bf880b9e28
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 13:02:58 +02:00
Oswald Buddenhagen
150408e37d don't process ANGLE and zlib headers like real qt modules
we run syncqt on them only to get normal forwarding headers and the
headers.pri file. the module master include header and the module
version header are useless, and scanning for qt class names just wastes
time.

Change-Id: I58e8d1eb36cea5c31cbd46ce673438316d1963dc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:05 +02:00
Oswald Buddenhagen
96557bc389 move module master header generation back to syncqt
now that we split out the part that depends on the project file, we can
do it cleanly here.
this way we can generate these headers at pre-build time already.
and for git builds, perl is probably faster than qmake at this task.

Change-Id: I343255c6de22329471a3ae2c2aac9ebeb160a501
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:42 +02:00
Oswald Buddenhagen
8d69232b28 let configure create the forwarding qconfig.h again
this avoids that syncqt needs to forward to a yet unexisting file (which
will have a yet unknown location, when syncqt is run at packaging time
already).

the %inject_headers syncqt config variable remains, so it can be told
not to purge "foreign" files.

Change-Id: I127ff6e0b7d5702fb0acaee9a5b7940b482d3608
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:31 +02:00
Oswald Buddenhagen
5d8b8eed90 move module version header generation back to syncqt
there is no particular reason for it being done by qmake.
avoids that the logic is distributed over two source files,
and allows us to generate these headers at pre-build time already,
including not forwarding to a yet unexisting file (which would have a
yet unknown location).

Change-Id: I9c78ab425cf6f01d076c86fd1ee602626f231487
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:25 +02:00
Oswald Buddenhagen
5c555e3a29 factor out writeFile() function
Change-Id: I8e3e1665d7628c3210d000c46dfffa9f1af71009
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:19 +02:00
Oswald Buddenhagen
6b38524bba get rid of syncqt wrapper scripts
instead, rename it to syncqt.pl and rely on qtPrepareTool()'s new
ability to correctly invoke it as a perl script even under windows.
the wrappers themselves have been trivial at this point, so there is no
added value in keeping them, either.

Change-Id: I77cf65edbcfaa48ed1900defe940d4eb4b82d5b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:48 +02:00