Commit Graph

6 Commits

Author SHA1 Message Date
Nikolai Kosjar
aa796a9fc0 CppTools: Add all diagnostic messages
...of type 'No such file or directory' to the CPlusPlus::Document. Only
the first one was added and as a result, the editor only wavely
underlined that one.

Add also diagnostic messages if it's not possible to get the file
contents.

Change-Id: I8389d8e6af9480ea6712759ce5e130e1dd8912f1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-03-10 13:42:43 +01:00
Nikolai Kosjar
c1225ea3f4 CppTools: Use editor manager's codec as fallback
...for reading not already opened files.

This partly reverts commit f7c68f6. In case TextFileFormat::detect()
fails, the user configurable editor manager's codec is used instead of
QTextCodec::codecForLocale().

Adds also a qWarning() to easier detect encoding errors.

Task-number: QTCREATORBUG-10378

Change-Id: I0fa4e6b898ed090d85414ce2a001f11b115a42d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-11-18 13:03:08 +01:00
Erik Verbruggen
ba2d7a4fa7 C++: Only parse with appropriate defines for open editors.
If two files from different (sub-)projects include the same header file,
and the defined macros differ for both files, the header file will be
parsed with only the appropriate macros for the including file.

Task-number: QTCREATORBUG-9802
Task-number: QTCREATORBUG-1249

Change-Id: I560490afa287b3bb1e863bce1bb4f57af36ad56e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-10-01 10:33:51 +02:00
Erik Verbruggen
f7c68f6baf C++: change working-copy to work on UTF-8 encoded QByteArrays.
These not only take less space than UTF-16 encoded QStrings, but due to
the caching in the CppEditorSupport also take less time to build.

This patch also fixes a number of possible encoding issues, where files
and constant strings were (falsely) assumed to be UTF-8.

Change-Id: Ib6f91c9a94ebed5b5dfbd4eb2998825c62c72784
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-09-11 09:43:14 +02:00
Sergey Shambir
d8eb5ddb75 CppTools: cleanup CppPreprocessor header, added short docs.
Change-Id: Ib61197da939165d24b99e40f29f9de13d109e044
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-31 10:53:18 +02:00
Erik Verbruggen
09ea0d235a C++: moved the CppPreprocessor into its own file.
Change-Id: I399d667a1fccb376fadbd6ab8fbba243e86d8f4b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2013-04-26 13:56:08 +02:00