summaryrefslogtreecommitdiffstats
path: root/src/tools/moc
Commit message (Collapse)AuthorAgeFilesLines
...
| * Document `moc -f<...>` behavior change in Qt-5.2.0David Faure2014-02-111-1/+1
| | | | | | | | | | | | | | | | Better late than never :) Task-number: QTBUG-33749 Change-Id: I5035255e66a56754b609441f5b81ab119565a7cb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | moc: Make error message 'too many input files' more verbose.Friedemann Kleint2014-01-271-1/+1
| | | | | | | | | | | | | | Make it easier to diagnose quoting errors in scripts. Change-Id: I17894a426faa5cdf50f5ace4ed422ab2bd202558 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add comment to moc output to simplify slots flags reading.Jędrzej Nowacki2014-01-221-9/+22
| | | | | | | | | | | | Change-Id: I5b8f63b6fa561c108abed4c2726b3aff99144fe2 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix lack of deterministic behavior in moc.Jędrzej Nowacki2014-01-221-6/+16
| | | | | | | | | | | | | | | | Moc should check full scope of any related objects or gadget when it constructs extra data. Change-Id: Ibd1b607a389cd4e788c0916984464cd9103d9c59 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2014-01-213-3/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-01-203-3/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/corelib/tools/qstring.cpp src/gui/image/image.pri src/gui/image/qimage.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/qeglfshooks_stub.cpp tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp Change-Id: I3b9ba029c8f2263b011f204fdf68c3231c6d4ce5
| | * moc: Fix parsing of complex defines defined via command lineOlivier Goffart2014-01-173-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since now in Qt5 the moc does full macro substitution, it needs to handle the defines passed is command argument, even if they span over multiple tokens, or if they do not have any token. Example: moc '-DCOMPLEX=QVector<int>' '-DEMPTY=' foo.h [ChangeLog][moc] Fixed passing -D of a macro defined to something more complex than a single identifier. Task-number: QTBUG-33668 Change-Id: Ie8131de215f1659a24af4778d52ee40cda19759f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Remove duplicated code from moc generatorJędrzej Nowacki2014-01-201-6/+0
| | | | | | | | | | | | | | | Change-Id: I0d603ac39068f796fc7397a74230d544a16e0371 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Do not close string data by a double null terminator.Jędrzej Nowacki2014-01-201-2/+3
|/ / | | | | | | | | | | | | | | | | There is no point in saving \0 twice. Any code that could relay on it is broken anyway, because moc saves \0\0 for an empty string. Change-Id: I28fa4f78aae8c883c088df43ec89d608a99b3bdd Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | moc: Fix -Wsign-conversion warning in the moc generated fileOlivier Goffart2014-01-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is the warning it fixes: moc_foo.cpp:28:9: warning: conversion to ‘qptrdiff {aka long long int}’ from ‘long unsigned int’ may change the sign of the result [-Wsign-conversion] - idx * sizeof(QByteArrayData) \ ^ qarraydata.h:282:49: note: in definition of macro ‘Q_STATIC_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET’ { Q_REFCOUNT_INITIALIZE_STATIC, size, 0, 0, offset } \ ^ moc_foo.cpp:26:5: note: in expansion of macro ‘Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET’ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ ^ moc_foo.cpp:33:1: note: in expansion of macro ‘QT_MOC_LITERAL’ QT_MOC_LITERAL(1, 23, 5), ^ [ChangeLog][moc][QTBUG-36128] Fixed sign conversion warning in generated file. Task-number: QTBUG-36128 Change-Id: Ibf00974dbfb419bb53a3109d93e4cee598bb0588 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix regression in property handling with enums from gadgetsSimon Hausmann2013-12-244-11/+24
| | | | | | | | | | | | | | | | | | | | When declaring a Q_PROPERTY(SomeType::SomeEnum foo ...) and SomeType is not a QObject but a gadget, then we must still include SomeType's meta object in the list of related meta objects. Task-number: QTBUG-35657 Change-Id: I46195140cb5d180c4f03bb1fe06a876e3fe11267 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Fix erroneous exclusion of classes from related meta objects in mocSimon Hausmann2013-12-124-17/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume an unrelated class that declares an enum and uses Q_ENUMS. Consider then a class that uses UnrelatedClass::Enum as a Q_PROPERTY. We used to include UnrelatedClass in the primary class's related meta objects, in order to support use-cases like obj->setProperty("enumProperty", "ValueOfEnumAsString"); If however moc happens to see Q_DECLARE_METATYPE(UnrelatedClass::Enum), then it would exclude it from the related meta objects, which would silently break the string based enum value conversion. This was meant as an optimization, but it isn't apparent to the developer why sometimes the string conversion would work and sometimes not (depending on whether somebody declares that macro). This also becomes visible in QML, which relies on the same embedded type information for enum assignments. This patch removes that check in moc's code generator and cleans up the code a little. However always including the prefix of Q_PROPERTY(SomePrefix::Enum ...) is not correct either, because it may be that SomePrefix is a namespace, which would cause compilation issues. Therefore we limit the inclusion of related meta objects only to Q_OBJECT decorated classes the moc has seen, and for these we save the fully qualified name in the related meta objects array (for QTBUG-2151). While this patch makes the previous workaround for namespace issues by using a Q_DECLARE_METATYPE not workable anymore, by saving the fully qualified name we are making a hopefully sufficient effort to not require a workaround in the first place. There's always the new workaround of fully qualifying the type in Q_PROPERTY. One side-effect of this change is that in the autoPropertyMetaTypeRegistration test of tst_moc, the CustomQObject for Q_PROPERTY(CustomQObject::Number enumValue ...) is now a related meta object, and therefore when querying for the type of this property via QMetaProperty::userType(), we are now aware of this being an enum and try to resolve CustomQObject::Number via QMetaType::type(qualfiedName). As there is no guarantee for this to succeed, we must now also do what is done in the non-enum code path in ::userType(), which is to call the moc generated type registration function. Task-number: QTBUG-33577 Task-number: QTBUG-2151 Change-Id: Ibf20e7421cba464c558a25c76a7e1eef002c6cff Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | moc: move qt_meta_extradata data from .data.rel into .data.rel.roMarc Mutz2013-12-091-1/+1
|/ | | | | | | | | | It's still a relocation, but at least it can be marked read-only after the relocation run, if indeed the dynamic linker goes to such a length. Change-Id: Ibadddac3ab99d2e58cc32cfd57311bddd3bdb0ef Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix build when fwrite() is declared with attribute warn_unused_resultTasuku Suzuki2013-10-151-1/+1
| | | | | | | Task-number: QTBUG-33921 Change-Id: I58dded1f54239e4c5cfd5f4f5c1655dbf879b2c8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-3/+3
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* moc: Don't stumble over MSVC __declspec.Stephen Kelly2013-09-241-0/+1
| | | | | | | | | Commit 310031188c6 (Fix moc stumbling over gcc __attribute__ extensions, 2012-10-01) applied similar logic for GNU style attributes. Change-Id: I550eaefd703b4e974e6ffae7716f02074c8a8823 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* moc: add -M<key=value> to ease static qml plugin linkingRichard Moe Gustavsen2013-09-134-0/+35
| | | | | | | | | | | | | | | | | | | | | | | A module plugin in qml belongs to a URI/namespace. This uri is resolved run-time by QtDeclarative by knowing the path of the qmldir that references the plugin. For static plugins this becomes a problem, since we lost the information regarding which plugin belongs to which qmldir, since a static plugin has no file path. To avoid pushing the responsibility of clarifying this onto the application developer, it is better to embed this information into the meta data of the plugins themselves. Since this information can be resolved by the build system, a new option to moc has been added: -M<key=value> that will let you add meta tags to the meta data from the command line to each class that has an IID specified. For the URI case, we can then e.g do: -Muri=QtQuick.Controls -Muri=QtQuick.Controls.Private Change-Id: I81a156660148fc94db6f3cac0473e9e1c8458c58 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix moc-crash when compiling QtScript on Windows.Friedemann Kleint2013-09-111-8/+7
| | | | | | | @file-arguments were not parsed correctly. Change-Id: I10dc7ebcd7c9eedb332c7c350aa06c7ac9c2e8b1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Port moc to QCommandLineParserDavid Faure2013-09-103-226/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required special care because of @option-file where additional args can be read from. Found again one undocumented option, --ignore-option-clashes. Usage: moc [options] [header-file] [@option-file] Qt Meta Object Compiler version 67 (Qt 5.2.0) Options: -h, --help Displays this help. -v, --version Displays version information. -o <file> Write output to file rather than stdout. -I <dir> Add dir to the include path for header files. -F <framework> Add Mac framework to the include path for header fil es. -E Preprocess only; do not generate meta object code. -D <macro[=def]> Define macro, with optional definition. -U <macro> Undefine macro. -i Do not generate an #include statement. -p <path> Path prefix for included file. -f <file> Force #include [optional <file>] (overwrite default) . -b <file> Prepend #include <file> (preserve default include). -n <which> Do not display notes (-nn) or warnings (-nw). Compat ibility option. --no-notes Do not display notes. --no-warnings Do not display warnings (implies --no-notes). --ignore-option-clashes Ignore all options that conflict with compilers, lik e -pthread conflicting with moc's -p option. Arguments: [header-file] Header file to read from, otherwise stdin. [@option-file] Read additional options from option-file. Change-Id: I0dfa8e029f95ad8084832530d701e30f315df98e Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QMetaMethod and QDBusMetaObject: Give public access to signal methodsCaroline Chao2013-09-091-1/+1
| | | | | | | To be consistent with signals which are public since Qt5. Change-Id: I633077e37d0851b118c22da0681e8b8b1892ddbb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* moc generated code should compile with QT_NO_KEYWORDSOlivier Goffart2013-08-221-2/+2
| | | | | | | | | Don't use the 'emit' keyword in the moc generated code for properties with MEMBER Task-number: QTBUG-33094 Change-Id: I5a0950e9c7a0dee347a6a6c79098e3e7d4776014 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Fix related objects containing itselfOlivier Goffart2013-08-221-2/+14
| | | | | | | | | | This may happen when we have namespaces and the qualified name is used to scope an enum. Task-number: QTBUG-32933 Change-Id: Ic4923bbfb138387bae1e3694172661ace8342089 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Issue a warning instead of an error when macro argument mismatchOlivier Goffart2013-08-221-2/+2
| | | | | | | | | | | | | moc's C++ is not 100% accurate, so better process the invalid macro with a warning rather than an error. Such errors occurred in the QSKIP macro with variadic arguments since that macro is defined conditionally. It is also causing problem in boost header (cf task QTBUG-29331) Task-number: QTBUG-29331 Change-Id: Ice6a01b675286540d6470c8e36920b7efd39b540 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* don't include qconfig.cpp into moc and uicOswald Buddenhagen2013-08-152-3/+1
| | | | | | | | | whatever it was used for is long gone. Change-Id: Ifab7ae7968b1ab65982b1a6414274b3502bbc3d0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Changed digia contact details to */legal, updated licensesTeemu Kaukoranta2013-07-202-2/+2
| | | | | | | | Scripts are available in internal mkdist repo. Added license tags, updated licenses and copyrights/contacts Change-Id: Ibc734275f3000987eaa4f5c57f19d4e1fda2c479 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* moc: Avoid non-deterministic output which causes unnecesary rebuildsRobin Burchell2013-06-301-1/+6
| | | | | Change-Id: I4fdd2b37869ed73ede3a33b5adad94413bd43b01 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* moc: Fix Generator::registerableMetaTypeOlivier Goffart2013-05-201-2/+2
| | | | | | | | when the type is a pointer to a registerable 1 argument template type. Task-number: QTBUG-31002 Change-Id: Iac0d6b71b2b805a1876110a0781d02188083c4e5 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* moc: recover bad template parsing.Olivier Goffart2013-05-201-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | When encountering code such as: X<a<b> moc does not have the mean to know if 'a' is a type or a variable, so the type parser currently assume that '<' always open a template parameter. (instead of being the operator<) The type parser do not care about the actual type, it just need to strip the string out. The problem is that then the whole rest of the file will be considered as the type. With this patch, we also stop the parsing at semicolon. The type will be wrong, but this allow the parser to recover and it will continue to look for more classes after this. (In other words, moc will no longer break if it encounter such construct in a header. But it will still not parse such types correctly if used within a Q_OBJECT class) Task-number: QTBUG-31218 Change-Id: I1fef6bc58493d7c00df72401c9ad55463b24eaa7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* moc: use fprintf instead of qWarningOlivier Goffart2013-05-081-2/+2
| | | | | | | | | qWarning now depends on QT_MESSAGE_PATTERN, depending on that variable. It will show things like the moc process id or the Parser::error function name. We don't want that. Change-Id: I5b35401200f0f7de2442aa77d700a82402081489 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't bootstrap tools when not necessaryOswald Buddenhagen2013-03-141-0/+1
| | | | | | | | bootstrapping is only necessary if we are cross-compiling or have a circular build dependency. Change-Id: I17244457652ca9d4fc797043e57070c2ae3ee5d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* moc: Remove VC6 workaroundOlivier Goffart2013-03-061-10/+0
| | | | | Change-Id: I9022eee72235309303ca384f2d52fc24256af6ec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-053-4/+21
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * moc: Fix infinite recursion in macro substitutionOlivier Goffart2013-02-213-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing macro argument substitution, one should keep the set of macro to exclude, else we can enter an infinite recursion. Testcase: #define M1(A) A #define M2 M1(M2) Task-number: QTBUG-29759 Change-Id: I564bbfed65e1c8599592eaf12c6d67285d2fd9ce Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
| * moc: Error out when detecting unterminated macro usageTor Arne Vestbø2013-02-191-0/+2
| | | | | | | | | | | | | | | | | | Exhausting the symbol list while looking for the final right parenthesis means it is missing. Task-number: QTBUG-29308 Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | moc: Support the '$' character as an identifierOlivier Goffart2013-03-024-8/+9
| | | | | | | | | | | | | | | | | | | | Both gcc and clang allow the use of '$' in their identifiers as an extension. moc should not throw a parse error if there is one in the file. Instead, consider '$' as valid in identifiers. Task-number: QTBUG-22720 Change-Id: I8be3a52429c0db5b7e8308b8f4fe475d3d3994bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix compilation of moc generated file with MEMBER propertiesOlivier Goffart2013-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the object has only MEMBER properties, without any other property specifying READ, the generated will fail to compile with this error: tst_moc.moc: In member function ‘virtual int ClassWithOneMember::qt_metacall(QMetaObject::Call, int, void**)’: tst_moc.moc:3810:42: error: ‘_v’ was not declared in this scope That's because the '_v' is only declared if 'needTempVarForGet' is set, and it should be set when we have a MEMBER property. Change-Id: I829fad3faf69654b5a3fd540857df19f4a9449d4 Reviewed-by: Gerhard Gappmeier <gerhard.gappmeier@ascolab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | moc: Error out when detecting unterminated macro usageTor Arne Vestbø2013-02-191-0/+2
| | | | | | | | | | | | | | | | | | Exhausting the symbol list while looking for the final right parenthesis means it is missing. Task-number: QTBUG-29308 Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-01-2221-21/+21
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qsavefile_p.h src/corelib/tools/qregularexpression.cpp src/gui/util/qvalidator.cpp src/gui/util/qvalidator.h Change-Id: I58fdf0358bd86e2fad5d9ad0556f3d3f1f535825
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-1821-21/+21
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add support for defining properties from member variables.Gerhard Gappmeier2013-01-193-11/+40
|/ | | | | | | | | | | | | | | This associates properties with member variables and avoids writing getter and setter methods manually. The metaCall() method directly accesses the member variable, so additional method calls can be avoided. The metaCall() setter code also supports NOTIFY signals, which means the according signal is emitted when the property gets written. Task-number: QTBUG-16852 Change-Id: I88a1f237ea53a1e9cf65fc9ef2e207718eb8b6c3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove the timestamp info in genarated filesLiang Qi2012-12-151-5/+1
| | | | | | | | | | | | | For moc, rcc and uic, then it's friendly for tools like ccache. ccache is using md5 to check file modification, but the different timestamp info will cause different md5 for same meaningful contents, it will disabled ccache. Updated the autotest for uic and rcc. Task-number: QTBUG-26589 Change-Id: I9f1dcf6cd826ad9603af6e183757bcd748c32bd1 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Change license header from Nokia to DigiaSergio Ahumada2012-11-262-2/+2
| | | | | Change-Id: I2be215284d7670f60f8b5838fce1e6832dde2270 Reviewed-by: Martin Smith <martin.smith@digia.com>
* moc: Fix assertion in QVector::first()Konstantin Ritt2012-11-251-6/+10
| | | | | | | introduced in aea68c93ae437a761584719f0f1ca93eaf6f7484 Change-Id: I05c1dfa16c42019ee0a0b44ffc50ad2c2c0d209b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Proper macro replacment and branch evaluationLars Knoll2012-11-233-80/+144
| | | | | | | | | | | | Correclty replace macros according to the C++ standard. Use the correct replacement method also to evaluate With this moc correctly processes boost headers. Task-number: QTBUG-27546 Change-Id: I001b3054c5fcdc34d46cfa53d1387bd19436f361 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Correctly expand arguments in function macrosLars Knoll2012-11-231-11/+12
| | | | | | | | Arguments in function macros are only expanded if they aren't used in conjunction with a # or ## operator. Change-Id: I8c80e11902a592128504c4637545e75866566965 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove additional whitespaces from the macro tokensLars Knoll2012-11-231-2/+24
| | | | | | | | | According to the spec, we should ignore whitespace tokens at the beginning and end of the macro definition. In addition, whitespaces after a # and around ## should be ignored Change-Id: I830d0f4aaed3bcfac345d7da6df65693ec3315b8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* make qt_tool support building bootstrapped toolsOswald Buddenhagen2012-11-161-6/+1
| | | | | | | | | | as a "side effect", this fixes the build of bootstrapped tools when doing a debug build under msvc: qt.prf would add CONFIG+=release after default_post.prf already loaded debug.prf. Change-Id: Idd17cf28d358950fd90bb18ca7a8d67e06953bc1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* remove pointless TARGET assignmentsOswald Buddenhagen2012-11-161-1/+0
| | | | | | | TARGET defaults to the project file's basename Change-Id: I0cd204ae6559e6c51d3c987bc38ae372e2b4a3dd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Generate a proper static QtBootstrap moduleOswald Buddenhagen2012-11-081-9/+7
| | | | | | | | | | | Making a properly installed libQtBootstrap simplifies our tools build process a little and in addition allows other comand line tools to use the bootstrap lib and link against it. Initial-version-by: Lars Knoll Change-Id: Iddf4568a5505bc24898ec1abf7e7022e19f0a454 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>