Make qdoc read multiline macros in files with CRLF endings
authorJan-Arve Saether <jan-arve.saether@nokia.com>
Tue, 11 Sep 2012 11:16:27 +0000 (13:16 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 18 Sep 2012 01:34:08 +0000 (03:34 +0200)
commita95ce12b917681f72e5362992803fad4209008c5
tree195f8c9ad9b4a61afd6a2c22b0dbb1a22599215b
parent1b569fe4550462fa2226093a72e7383f2d0f5ba2
Make qdoc read multiline macros in files with CRLF endings

This caused qdoc for instance to not being able to parse qglobal.h
correctly. (On windows, it stopped to parse anything meaningful after
the line with this macro:)

  #define Q_INIT_RESOURCE_EXTERN(name) \
      extern int QT_MANGLE_NAMESPACE(qInitResources_ ## name) ();

It worked on linux just because on linux a line continuation 'token' is
the sequence "\\\n" (on windows it is "\\\r\n")

So for files with CRLF line endings, it treated *only* the first line
as a macro, potentially causing the subsequent lines to affect the
state of the tokenizer.

Change-Id: If7c80ee7eb317f2d324ace7ff540ced7c31185dc
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Martin Smith <martin.smith@nokia.com>
src/tools/qdoc/tokenizer.cpp