summaryrefslogtreecommitdiffstats
path: root/src/tools/moc/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-02-121-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qimage.cpp src/gui/text/qtextengine.cpp src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/printsupport/kernel/qprintengine_win.cpp Change-Id: I09ce991a57f39bc7b1ad6978d0e0d858df0cd444
| * 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>
* moc: Fix parsing of complex defines defined via command lineOlivier Goffart2014-01-171-1/+2
| | | | | | | | | | | | | | | | | 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>
* 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-131-0/+23
| | | | | | | | | | | | | | | | | | | | | | | 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-101-218/+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>
* don't include qconfig.cpp into moc and uicOswald Buddenhagen2013-08-151-1/+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>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix moc stumbling over gcc __attribute__ extensionsSimon Hausmann2012-10-011-0/+8
| | | | | | | | | | | | | | | | | Reported by David Faure. In KDE a DEPRECATED macro gets defined in a header file created by cmake. The define is not guarded with #if Q_CC_GNU or similar because at cmake time the compiler is determined. Therefore moc suddenly sees this gcc specific token and stumbles over it. This patch simply defines an empty __attribute__ macro that will expand to nothing and thus become invisible to moc's "C++ parser" after the pre-processing. Change-Id: I4448b9ac3f72b6334e32b27484401fb0fca23a0c Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-191-3/+3
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Search the include paths for json files containing plugin infoLars Knoll2012-07-311-0/+1
| | | | | | | | This fixes shadow builds with autogenerated .json files as e.g. used by Qt Creator. Change-Id: Ibb783b05d97d996100da4b0dca859fa3f310dc83 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Revert "Allow moc to handle symbols that have been redefined."Matthew Vogt2012-07-041-1/+1
| | | | | | | | | | | | This reverts commit 5bb1408927b4eb5a03e8ab9f7cbc68f80d8a3962. The temporary measure used to support redefinition of QtDeclarative class names during the transition period is no longer required. Task-number: QTBUG-24517 Change-Id: Ib90f08fcdfb02e004e594ac72b698eaa0325d98d Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* MOC: Avoiding MAX_PATH limit on WindowsYuchen Deng2012-06-201-1/+9
| | | | | | | | | See: http://msdn.microsoft.com/en-us/library/aa365247(v=VS.85).aspx Task-number: QTBUG-26157 Change-Id: Ie74481cd06c31149a060a432352da5b2731caaef Reviewed-by: Debao Zhang <dbzhang800@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix shadow build compilation with MSVCThiago Macieira2012-05-291-1/+1
| | | | | | | | \#include "foo" in MSVC does not search the output path, so we need to pass the proper -I flag to find the build dir's src/corelib/global. Change-Id: I546051c99fd29d7734f8bf35d058ea283ec9bca7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Deprecate qMemCopy/qMemSet in favour of their stdlib equivilents.Robin Burchell2012-04-111-1/+1
| | | | | | | | | | | | | | | | | | Just like qMalloc/qRealloc/qFree, there is absolutely no reason to wrap these functions just to avoid an include, except to pay for it with worse runtime performance. On OS X, on byte sizes from 50 up to 1000, calling memset directly is 28-15% faster(!) than adding an additional call to qMemSet. The advantage on sizes above that is unmeasurable. For qMemCopy, the benefits are a little more modest: 16-7%. Change-Id: I98aa92bb765aea0448e3f20af42a039b369af0b3 Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com> Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Allow moc to handle symbols that have been redefined.Matthew Vogt2012-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Allow moc to produce the desired identifiers when used with C++ symbol names that have been redefined, for example by -Dfoo=bar. Two changes are required: firstly, when encoding a type name, the components of the name must be checked for substitutions that have been defined for that token (note that this is not done here by correct pre-processing, but only by processing the resultant table of definitions). Secondly, the arguments to the SIGNAL, SLOT and METHOD macros must be allowed to be substituted during macro expansion rather than stringized directly. This is a temporary change to prevent breaking existing projects that depend on the declarative module. After clients have had an opportunity to update their code to the use the new interfaces, it can be removed. Task-number: QTBUG-23737 Change-Id: I39e6844cebf6ca7984af6028160b8a3797ac44a5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* moc: Get rid of implicit conversions to const char *Kent Hansen2012-02-201-3/+3
| | | | | | | | | moc mostly operates on QByteArrays. When an actual const char * is needed, it should be explicit. Change-Id: I0b3e262830128306688f4512a4b59ce8966c2579 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* added -b<file> option to moc to support additional include filesKeno Fischer2011-09-071-3/+18
| | | | | | | | | | Merge-request: 41 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Change-Id: I11a532b6ffe5f1c3e08aef8bc564e93f965b9e7c Reviewed-on: http://codereview.qt-project.org/4374 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* simplify relative path generationOswald Buddenhagen2011-06-221-28/+1
| | | | | | | | | instead of hand-crafting the logic, simply use QDir::relativeFilePath() Change-Id: I5a495ad6bdfa8ec126741180770934e7ebee0495 Reviewed-on: http://codereview.qt.nokia.com/512 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+448
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12