summaryrefslogtreecommitdiffstats
path: root/tools/linguist/lupdate/cpp.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change to release license header.Jason McDonald2011-02-161-13/+13
| | | | Reviewed-by: Trust Me
* Update copyright year to 2011.Jason McDonald2011-01-111-1/+1
| | | | | Reviewed-by: Trust Me (cherry picked from commit ac5c099cc3c5b8c7eec7a49fdeb8a21037230350)
* fetch next token after class definition openingOswald Buddenhagen2010-09-101-0/+2
| | | | | | this makes no real difference, as at this point the token is known to be an opening brace which will be handled without side effects in the next iteration, but this is a tad more efficient and simply cleaner.
* delay next token fetching when opening namespaceOswald Buddenhagen2010-09-101-1/+1
| | | | | | | | otherwise, if the next token to be fetched is a non-empty #define, it would save the context before entering the namespace, and thus the post-define context restore would just discard the namespace entry. Task-number: QTBUG-12683
* don't let operator overloads confuse usOswald Buddenhagen2010-09-101-0/+15
| | | | Task-number: QTBUG-11426
* Wrap translatable messages with tr() in assistant, designer and linguistVictor Ostashevsky2010-09-011-41/+42
| | | | | Merge-request: 2456 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* immediately set function context when entering a namespaceOswald Buddenhagen2010-07-071-1/+6
| | | | | | | | otherwise, tr() calls without absolute qualification will not be properly qualified inside the first function if it has no qualification, either. Task-number: QTBUG-11742 (not really)
* warn about stray meta dataOswald Buddenhagen2010-06-291-4/+7
|
* don't complain multiple times about same abuse of //% meta stringsOswald Buddenhagen2010-06-291-0/+3
| | | | | Reviewed-by: Kent Hansen Task-number: QTBUG-11818
* fix double percent sign after migration to yyMsg()Oswald Buddenhagen2010-06-291-2/+2
|
* don't use qWarning() - or even qFatal()! - gratuitously.Oswald Buddenhagen2010-06-031-66/+58
| | | | Task-number: QTBUG-8044
* create magic comment messages in "finished" stateOswald Buddenhagen2010-04-151-2/+7
| | | | | there is really no point in marking them "unfinished". later file rewrites would reset the state anyway.
* make QT_TR_NOOP work in static initializersOswald Buddenhagen2010-04-151-6/+47
| | | | | | | | | do that by ignoring all equal signs and everything between and including brackets. this makes static initializers look effectively like function definitions, thus creating proper context. Task-number: QTBUG-9276
* make HashString and HashStringList objects smallerOswald Buddenhagen2010-04-151-13/+10
| | | | | | | | | | qHash(QString) has only 28 bits, so we can use the upper bits for flagging whether the hash is valid. size effect: LP32: align(4, 4 + 4 + 1) = 12 vs. align(4, 4 + 4) = 8 LP64: align(8, 8 + 8 + 1) = 24 vs. align(8, 8 + 8) = 16 P64: align(8, 8 + 4 + 1) = 16 vs. align(8, 8 + 4) = 16
* remove pointless manual assignments from token type enumOswald Buddenhagen2010-04-151-6/+6
| | | | | making the range discontiguous just makes the switch() jump table bigger or not applicable at all.
* fix "using namespace" recursion crashOswald Buddenhagen2010-03-051-8/+20
| | | | Task-number: QTBUG-8360
* Merge remote branch 'mainline/4.6' into 4.6Oswald Buddenhagen2010-01-131-1/+1
|\ | | | | | | | | Conflicts: tests/auto/linguist/lupdate/testlupdate.cpp
| * Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | don't complain about unresolved base when the reference is absoluteOswald Buddenhagen2010-01-071-1/+1
|/ | | | Task-number: QTBUG-6072
* fix encodings, take NOswald Buddenhagen2009-11-201-12/+10
| | | | | Task-number: QTBUG-4499 Task-number: QTBUG-5276
* don't overwrite explicitly specified CODECFORTR on UTF-16 inputOswald Buddenhagen2009-11-191-1/+1
|
* fix potentially wrong output codec for UTF-16 input filesOswald Buddenhagen2009-11-191-1/+1
| | | | querying the actual codec before the file has been read is pointless
* record id-based messages even if they have an empty sourceOswald Buddenhagen2009-11-061-15/+11
| | | | | | this makes sense if one uses lupdate only for validation purposes, i.e. to find out if the code uses only ids which are defined in some external specification.
* don't break on unterminated C commentsOswald Buddenhagen2009-11-041-1/+1
|
* introduce delayed resolution of aliasesOswald Buddenhagen2009-11-041-16/+41
| | | | | | | | this has two effects: - using-declarations which use forward-declared classes work without collecting the forward declarations, as the resolution happens at a place where the class definition must have been encountered already - it should be a bit faster
* fix bogus "Class '<foo>' lacks Q_OBJECT macro"Oswald Buddenhagen2009-11-041-3/+3
| | | | | | the optimization not to look for parent definitions if we already knew that there would be none did not consider that we only know that the leaf node is missing, not any intermediate nodes.
* namespaces can have parents, tooOswald Buddenhagen2009-11-041-5/+10
|
* do not crashOswald Buddenhagen2009-10-291-5/+7
|
* make magic comment parsing stricterOswald Buddenhagen2009-10-281-9/+9
| | | | | | there must be a space after the //: and similar comments, otherwise harmless comments of the sort of //====== foo here ===== will be parsed as message ids, etc.
* fix solaris buildOswald Buddenhagen2009-09-291-1/+5
| | | | "A class with a reference member must have a user-defined constructor."
* detect and eliminate forwarding headersOswald Buddenhagen2009-09-231-7/+20
| | | | | this will save quite some hash lookups (even if in empty hashes) and make the VisitRecorder bitmap smaller.
* reduce peak memory consumptionOswald Buddenhagen2009-09-231-30/+70
| | | | | drop the parse results of files which are unlikely to be included (i.e., which are not headers).
* actually use the argument of Q_DECLARE_TR_FUNCTIONSOswald Buddenhagen2009-09-231-9/+59
| | | | | | which means that one can set an arbitrary context. as a side effect, this caches the stringified context of Q_OBJECT-derived classes.
* namespaces *can* have tr() functions, after allOswald Buddenhagen2009-09-231-11/+8
| | | | | | ... by virtue of the Q_DECLARE_TR_FUNCTIONS macro. so remove the artificial limitation to classes (which was mostly an optimization anyway).
* drastically improve lupdate's scalabilityOswald Buddenhagen2009-09-231-197/+280
| | | | | | | do not import all data from included files into the current file (which turned out to be extremely expensive for 3rdparty/webkit), but do hierarchical lookups on demand. this makes the lookups as such much slower, of course, but it still pays off.
* optimize/clarify function context stringificationOswald Buddenhagen2009-09-231-5/+6
|
* do not record class forward declarationsOswald Buddenhagen2009-09-231-28/+27
| | | | | they don't create useful namespaces and don't hold flags, so it is pointless to clutter the namespace maps with them.
* remove more dead codeOswald Buddenhagen2009-09-231-2/+1
| | | | no need for parameter "unresolved"
* remove dead codeOswald Buddenhagen2009-09-231-13/+2
| | | | needsTrFunctions was never set any more
* move static objects out of function scopeOswald Buddenhagen2009-09-231-6/+6
| | | | | cuts away a few thousand instructions. need to revisit this in case of making the parser a dynamic library.
* use a source char pointer instead of a string + indexOswald Buddenhagen2009-09-231-13/+18
|
* take advantage of knowing that qstrings are zero-terminated internallyOswald Buddenhagen2009-09-231-6/+5
|
* no need to actually compute number values. only 0 is specialOswald Buddenhagen2009-09-231-37/+18
|
* when matching strings, skip also leading commentsOswald Buddenhagen2009-09-231-6/+8
|
* avoid isalpha() & isalnum()Oswald Buddenhagen2009-09-231-2/+3
| | | | they are surprisingly expensive
* cut down use of qstring::simplified()Oswald Buddenhagen2009-09-231-6/+10
|
* simplifyOswald Buddenhagen2009-09-231-4/+1
|
* missing & in foreachOswald Buddenhagen2009-09-231-1/+1
|
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me