Commit Graph

4400 Commits

Author SHA1 Message Date
Oswald Buddenhagen
2c000f1cd1 prune ioutils test
this is now extensively tested inside qt itself. maintaining a second
version is unnecessary effort.

Change-Id: I8bbce32b53acad6df37f9c6aea18f791d5648810
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-10-28 13:00:40 +00:00
Robert Loehning
85992f823e Squish: Update tst_qml_editor for fixed editor
In 3.5, the QML editor showed two empty lines at the end of
the file. Now it's only one line so only one must be unmarked.

Change-Id: I831002e5ab9d14570d2a788010806c0b3de5614c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-22 12:09:33 +00:00
Davide Pesavento
d3583883a8 Tests: add missing column to tst_fileutils::parentDir testcase
The third column was accidentally removed from one data row in
commit 271794fbc9

Fixes the following fatal error:
QFETCH: Requested testdata 'expectFailMessage' not available, check your _data function.

Change-Id: I4a09df2e044b4dcee1ed2ffc589082a3e2601232
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-10-19 09:00:31 +00:00
Nikolai Kosjar
bc67114d53 Tests: Fix compilation of templateengine.qbs
"Duplicate product name 'StringUtils autotest" - looks like a copy/paste
error from coming from tests/auto/utils/stringutils/stringutils.qbs.

Change-Id: Ibf6088eea4471e6248581a02839a4d8ba9bc73ef
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-10-13 14:04:17 +00:00
Marco Bubke
250c8d662b Clang: Add UpdateTranslationUnitsForEditorMessage
If an editor is changing all translation units independent of their project
part they must be updated too. So we introduce a new message to update all
translation units with the same file path.

Change-Id: I70d0ea2bbca9fa880111ff7219573e54f3277026
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-13 14:03:11 +00:00
Marco Bubke
0eaa9f668c Clang: Improve diagnostic update timer
Start the timer after a translation unit change and stop after every
diagnostic is sent. We should decrease the interval as we are
sending the diagnostics because otherwise the sending is delayed to much.
If the file watcher is emitting a file change we should only react
to changes of files which have no editor open.

Change-Id: I5431b4bf6b4c0b825bfc74bb9c697bb2d198fa26
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-13 11:56:51 +00:00
Marco Bubke
b8a9e85880 Clang: Don't set a translation unit dirty if the main file is deleted
If a file is deleted the translation unit should be not updated. It will be
later removed anyway.

Task-number: QTCREATORBUG-15070
Change-Id: I40c9c70629dab1d35b713d54442ffdbb2df3db43
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-12 15:49:07 +00:00
Nikolai Kosjar
6b6ad446eb CppTools: Make FollowSymbol respect projects
Finding the class definition for a forward declaration or finding the
function definition from its declaration is mostly determined by the
file iteration order. Documents with the most common path prefix are
checked first.

This works fine as long as the files of your project have a common
ancestor. If that's not the case, FollowSymbol might take you to the
definition within another project.

Fix that issue by considering the project part id when constructing the
file iteration order. Since the cached file iteration order now depends
on the projects, ensure to clear it if projects are added, changed or
removed.

Task-number: QTCREATORBUG-15116
Change-Id: I529166bac363959c9fee0b946747fd0370a88809
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-12 15:08:24 +00:00
Tobias Hunger
95b0dc9120 Utils: Move template file processing from projectexplorer to utils
I want to use it e.g. for snippets and the TextEditor plugin may
not depend on the ProjectExplorer, so the code has to move.

This adds a dependency on QtQml to Utils, but that does not really
matter since that is loaded into QtCreator anyway.

Change-Id: Iada9f40b2966a1fc41631ab33da09812ad67d967
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-12 11:53:01 +00:00
hjk
525c33f999 Debugger: Infrastructure for reworked native mixed debugging
- Remove old experimental native mixed approach.
- Move some common stack parsing to Stackhandler.
- Mark gdbbridge.py debug output explicitly to remove it
  from actual reponse handling

New native mixed needs QtDeclarative changes and
QTC_DEBUGGER_NATIVE_MIXED=1 for now.

Change-Id: I09eed1da51cea878636d36756015b7bfaed34203
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-09 05:19:45 +00:00
Daniel Teske
307061032c Fix changing "#include" lines after file renaming
Didn't work if there was any folded text before the #include.

Change-Id: I8f16205f06bfaa8b8541401a9ebd5995c15b2227
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-06 13:17:55 +00:00
Robert Loehning
1d88042b3f Squish: Remove dir separators from expected project tree
Project tree displays native separators since
d7a373ef26

Change-Id: I75a9b391641a20f32000f909b5310ad702ab0ee3
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-05 05:41:59 +00:00
Robert Loehning
f885286d22 Squish: Update expected project tree for qtcreator.pro
The handling of .pri files was changed in
51ba32bccc

Change-Id: I581bfa00465e1d9f3c4bbcdfefa4d64555d48c73
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-05 05:41:52 +00:00
Claus Steuer
158b07c9c8 C++: Support noexcept operator
The code model failed to parse the noexcept operator which is often
used in noexcept specifiers, e.g.: "void f() noexcept(noexcept(g()));"
Consequently some c++11 headers such as unordered_map, array
and unordered_set could not be parsed and no code completition was
available. I have created the NoExceptOperatorExpressionAST class
which is created whenever a noexcept token is found in an
expression with operator precedence. The noExcept test case
in the cplusplus/cxx11 test now contains a function that
uses the noexcept operator.

Fixed noexcept operator parsing

Added the test requested by Sergey Shambir, which then revealed that
i had not implemeneted the noexpect operator parsing according to the
c++ specification.
As stated here http://cpp0x.centaur.ath.cx/expr.unary.noexcept.html
the noexcept operator is a unary-expression that contains an
expression (and not a constant-expression). This should now be fixed.

Change-Id: Id4a99a43b660bd83e7680274491d99a698b57094
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-03 17:24:45 +00:00
Marco Bubke
a4917d3fdd Clang: Disable logging by default in unit tests
Change-Id: I489cec1dcbcfba71dfa6679e8d90bbf8c8d0a867
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-01 13:04:59 +00:00
Nikolai Kosjar
f1300df6b3 Strip BOM from files
Change-Id: I9167c016760fe1e8378cdf84144c4bed5cd4e57c
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-01 10:51:10 +00:00
Robert Loehning
f3400f62cd Squish: Remove workaround for fixed bug
Change-Id: Ifac94dfc27b0cb5f230d7b137bafabaa82a6773c
Task-number: QTCREATORBUG-14307
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-01 08:59:08 +00:00
Nikolai Kosjar
1c7fb225db Clang: Add one more test for SendDocumentTracker
Ensure that the document is not send with initial values. In that case,
the document was just loaded and has not any modified content yet.

Change-Id: I67ee8dcffe20779ef8294cf2668d0974b44f5bbb
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-09-30 14:44:09 +00:00
Nikolai Kosjar
a7928b4b0b Clang: Integrate clang's fixits as refactoring actions
They are invokable by the usual means (Alt+Enter, editor's context menu
> Refactor) plus by the context menu of the editor's left margin for the
related line.

The fixit text comes directly from libclang and is thus not translated.
We modify the text slighty by stripping the diagnostic category prefix
("note:", "error:", ...) and capitalizing the first letter.

A follow-up change should properly indicate available refactorings with
a refactoring icon in the editor's left margin.

Task-number: QTCREATORBUG-14868
Change-Id: I86157c9f824d2a9dedf19087476d02ad1e6cc854
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-09-29 11:39:21 +00:00
Nikolai Kosjar
de6d7f0617 Clang: Refactor handling of diagnostics
...by introducing ClangDiagnosticManager and the helper class
ClangDiagnosticFilter.

ClangDiagnosticManager will get more state in a follow-up change.

Change-Id: Id2c312bc897ea41ed67292b56b24dcfb7975ff4a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-09-29 11:38:53 +00:00
Orgad Shaneh
e68327666f Tests: Fix MSVC warning
tst_timelineselectionrenderpass.cpp:75: warning: C4305: 'return' : truncation from 'double' to 'float'

Change-Id: I2d8e06338bf69c219020e7d9c7015f52db34877a
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2015-09-28 16:51:47 +00:00
Marco Bubke
b412eb81ea Clang: Add revision and completion management
Reparsing a document is expensive so we should avoid it by all means. In
this patch we prevent that the same document is send again. It isn't send
too in advance of a code completion if there was no changes before the
the completion position.

Change-Id: I0bb786ba1d4e7ce08611a518cb32f8cf8f4d0037
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-09-28 15:46:15 +00:00
Eike Ziller
0ba4781bfc Merge remote-tracking branch 'origin/3.5'
Change-Id: I889b93611d1762121548fb71d1d3493e4adba313
2015-09-25 10:35:42 +02:00
Nikolai Kosjar
8eb30feb03 C++: Add basic tests for raw string literals
Change-Id: I9ca253a6a2296912eafe139ce53f4f9779097248
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-23 07:22:01 +00:00
Robert Loehning
335f6e4363 Squish: Stabilize tst_cli_output_console
Skip frequently failing qDebug output from Qt 5.4.1 MinGW.

Change-Id: I20d0fed184e3935484179e9509c902eb94e48ead
Task-number: QTCREATORBUG-15067
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-21 12:27:00 +00:00
Robert Loehning
e087ed2452 Squish: Fix tst_default_settings
Change-Id: I136d93e7b698dcda5388bc24b9bcaaae482fb861
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-21 11:01:43 +00:00
Eike Ziller
054ed354e0 Merge remote-tracking branch 'origin/3.5'
Change-Id: I30148c16cbb66ef670caaf1c74dccff47069bf68
2015-09-15 07:41:02 +02:00
Robert Loehning
73fbf3afd1 Squish: Don't check state of closed bug
The bug is fixed in master so checking for
it here in 3.5 is wrong and causes fails.

Change-Id: Idd429cf61734c869ada2728151b2bf6f82f6a240
Task-number: QTCREATORBUG-14307
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-11 12:15:20 +00:00
Robert Loehning
ebad4ed2c1 Squish: Test warnings about outdated Qt version
Change-Id: Id5c3243ace16ef545386cc3f63744963edd5fda1
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-11 12:14:45 +00:00
Ulf Hermann
b1dd6c9d75 Timeline: Adapt selection renderer autotest to new material
Change-Id: If518418ba1ee22bff99abe9c108166976ce43f2c
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 09:13:10 +00:00
Ulf Hermann
8d1693e175 Tests: Fix Qt dependency for timeline and qml tests
"declarative" is QtQuick1

Change-Id: Ia72c846dcddc478a7eb0c247345259281fe65d77
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-11 09:13:06 +00:00
Nikolai Kosjar
915f68deac C++: Revert problematic template specialization changes
This mainly reverts

    commit 81721f6781
    C++: Fix resolving of recursive typedef

    commit 2070431d8c
    C++: Fix resolving of partial specialization

and some bits of other changes due to dependencies. It also reverts

    commit e0594fc9b9
    C++: Fix expensive lookup for boost

which attempted to solve the upcoming problems.

Task-number: QTCREATORBUG-14741
Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-14962
Change-Id: I3f9e1f97199e5199b71da394fc27051c7709bd1f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-10 12:00:01 +00:00
Robert Loehning
506c0685a3 Squish: Avoid menu problems with Squish 6.0.0
Change-Id: I43219d36f07e2b5636f84f891f94220148f4dd7f
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-09 10:27:26 +00:00
Robert Loehning
1921e56863 Squish: Update README
Change-Id: Iac7dfbbd62ce03b73ca55562148d8741f52d4d1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-08 14:05:53 +00:00
Eike Ziller
c868b9f3ed Merge remote-tracking branch 'origin/3.5'
Change-Id: Ife5fdcd71b0adc99d4297a28a64515e9e93d7864
2015-09-04 09:19:28 +02:00
Robert Loehning
e873f872ef Squish: Reanimate tst_opencreator_qbs
Change-Id: I00d1d1baea71e5b63a1a6b7c11aaf47e74082a21
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-03 14:58:53 +00:00
Robert Loehning
9c9dbe3c53 Squish: Update Creator's sources to v3.5.0
Change-Id: Idc41db621470886920173f7d5caf366204408731
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-03 11:41:20 +00:00
Nikolai Kosjar
c504e56d0c C++: Fix MSVC assert in std::isspace()
...when dealing with UTF8 bytes.

std::isspace() expects unsigned char, not char.

Change-Id: I3f9b5e347d79cf94015cc99f8797d5feab406151
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-09-02 10:42:43 +00:00
Christian Stenger
326dec96b9 Provide pyqtc file
Change-Id: I2147cdd49e4050ad6bb8a538dfccc679fa2b1069
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-09-02 10:30:49 +00:00
Nikita Baryshnikov
5398f4f5b1 fix metatype declaration in a few places
Change-Id: I76a12a278db8e74d935e76a5e832daf8e34df2a9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-09-02 08:48:20 +00:00
Marco Benelli
86bca29f36 Fixed QT variable value in importscheck.pro .
It now use the 'qml' feature instead of the deprecated 'script'

Change-Id: Ie2e4148e586503be11d233b7f544cf4f3c040bdb
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-09-01 14:49:38 +00:00
Eike Ziller
3b1a966cc8 Merge remote-tracking branch 'origin/3.5'
Change-Id: Iebaabfc2f724cd493b7cab025406531cea5cd2dc
2015-09-01 12:57:51 +02:00
Robert Loehning
a80f4d179b Squish: Verify shown filenames when adding C++ files
Change-Id: I1e6c944a70c4f44d4f1b3e5cb7b6b6c8421ba453
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 09:44:41 +00:00
Robert Loehning
652ff8efeb Squish: Add test for creating new C++ class
Task-number: QTCREATORBUG-14949
Change-Id: Ie42471f174eaacab2810eec12c2af4201a9374fe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-09-01 09:44:28 +00:00
Marco Bubke
7eee8061f6 Clang: Add unsaved files messages
We have auto generated buffers from ui files which are not open but have no
file representation. So we need to provide them as unsaved files only.

Change-Id: I48a426c18e06eeda2fa707864f32f293e17ac651
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:02:19 +00:00
Marco Bubke
6e14eb6940 Clang: Rename ForCodeCompletion in ForEditor
It reflects that the translation units and projects have a tied
relationship with an editor.

Change-Id: I3c01d5776980fe079af1fdef82feded83fdf5463
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:02:02 +00:00
Marco Bubke
8ad7616420 Clang: Reparse for removed files too
Change-Id: Ibe8a3fa46bead6018a4279c3a270cb2535a7b296
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:01:43 +00:00
Marco Bubke
053e9597af Clang: Fix CodeCompletionsExtractor.BriefComment test
Change-Id: Ic01f3c361a5c81cfb96c51d6111ed6d589a76563
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:01:37 +00:00
Marco Bubke
0267f2861d Clang: Send the diagnostics delayed
Change-Id: I6065e51d38c262cf59d977c11c6453dec85a6dfe
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:01:18 +00:00
Marco Bubke
aa300e363f Clang: Adds needs reparsing test
Change-Id: Id58a831ac7ae389f225e3eac5d376dbf78a07772
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-08-31 15:01:10 +00:00