Commit Graph

1104 Commits

Author SHA1 Message Date
Libor Tomsik
2404974176 Showing different icon for class and struct in classview
Adding new slightly different icon for Struct to make it
different from Class.

Task-number: QTCREATORBUG-8574
Change-Id: I3da655adeaa05d7a590d4ec00f9749b5d86e0340
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-02-26 11:10:27 +00:00
Orgad Shaneh
f3a2795c3b C++: Use correct features for document parsing
Task-number: QTCREATORBUG-8007
Change-Id: Ic96aaa433442812a99bac9d16bb9124d66762e8c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-20 12:54:49 +00:00
Eike Ziller
56aadc407d Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
2015-02-12 17:36:29 +01:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Nikolai Kosjar
ae3aa07c4d C++: Remove workaround for crashing if parsing invalid code
This reverts the changes

    commit beac7b9539
    C++: Fix highlighting after "invalid code"

    commit 78ab287fc6
    C++: Stop parsing a declaration after two tries

which were a work around for QTCREATORBUG-12890.

A follow-up patch provides a proper fix.

Task-number: QTCREATORBUG-12890
Change-Id: I2650a8e41c8ff1180cad9f069e463fc51bd2f1b1
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-12 10:39:51 +00:00
Orgad Shaneh
65e7db42b8 C++: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-04 15:27:22 +00:00
Orgad Shaneh
75a943ef57 C++: Fix crash when #if[def] nesting is deeper than 512 levels
Change-Id: I5e86da3a36514545834f554470b147ad8be43344
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-03 12:03:29 +00:00
Nikolai Kosjar
3b0836274d C++: Correct src/libs/cplusplus dependencies
There is no dependency to languageutils, but we now depend on cplusplus
since we use/call Utils::FileName and Utils::FileDropSupport.

Change-Id: I18ca659ec3023a146e9e358e33dabbf9805fb6ce
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-01-28 16:16:40 +00:00
Nikolai Kosjar
56dab9e931 C++: Check for cycled parents
In the struct _Wrap_alloc (see test code) the rebind struct has
_Wrap_alloc as parent. However, within rebind the typedef of type
_Wrap_alloc has rebind as parent.

We will refactor that in master by introducing a "parent iterator"
class checking for cycles, so the client code looks less noisy.

Task-number: QTCREATORBUG-13703
Change-Id: I7b6cf819ea869139d2403e15ba085d8fba19763e
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-01-23 11:41:36 +01:00
Orgad Shaneh
c24ffc4dee C++: Expand arguments in nested function-like macros
Task-number: QTCREATORBUG-13219
Change-Id: I319fe39d696ccc28230d421b1395faf4dd452b03
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-21 13:23:38 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Nikolai Kosjar
dbeae8cb43 C++: FastPreprocessor: Add only includes if there are none
For the case that the document is based upon another one (see
Snapshot::preprocessedDocument(), the only client of FastPreprocessor)
the FastPreprocessor added extra unresolved includes.

Change-Id: I0a7719fa8806af59f87a48bc6914270efd653e84
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-01-14 12:07:03 +01:00
Orgad Shaneh
33ae764554 C++: Fix completion for enum inside member functions
Take 2

Task-number: QTCREATORBUG-13757
Change-Id: I9c2558bf01121e53710db984a99d37c2c6cafaf4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-13 18:09:15 +01:00
Orgad Shaneh
9180555f26 Revert "C++: Fix completion for enum inside member functions"
Breaks loading of qtcreator project.

This reverts commit 4c6ad5e305.

Change-Id: I7c4cdaf57eed16d7643d05b9456e03d5120259b3
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-06 10:02:12 +01:00
Orgad Shaneh
4c6ad5e305 C++: Fix completion for enum inside member functions
Task-number: QTCREATORBUG-13757
Change-Id: I283306b0c8348ee82e8e9bf47d404c1ecd473fde
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-06 09:34:45 +01:00
Erik Verbruggen
242b3f4110 C++: clean up numeric literal parsing and add support for n3472.
Separate the messy pp-number parsing from the numeric literal parsing.
The C/C++ preprocessor makes a grown man cry, but at least we have
"proper" literal parsing when we want it, including C++1y binary
literals.

Next step is digit separators (n3781).

Change-Id: Ia069eef454ed5c056f77694a5b8a595d0b76adc4
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-12-18 15:46:22 +01:00
Erik Verbruggen
a48adcf9be C++: handle case-insensitive file names in the CPlusPlus::Snapshot
... by keying on Utils::FileName

Task-number: QTCREATORBUG-12390
Change-Id: Ia98afb5a9160a7fd9225a2f9e02539ff3c35ae86
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-12-17 14:32:17 +01:00
Nikolai Kosjar
beac7b9539 C++: Fix highlighting after "invalid code"
For the semantic info document we do not expand function like macros and
because of that certain macro invocations lead to invalid code that we
need to handle, e.g.:

	Q_GLOBAL_STATIC(CppTools::SymbolFinder, symbolFinder)
	class Foo {};

This change makes parsing Foo in the semantic info document successfully
again, which affects highlighting of that class.

Change-Id: I389265ac64d3f0b8b8f406d38fa58d78820b14ba
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2014-11-19 16:10:56 +01:00
Nikolai Kosjar
e3419dc5ac C++: Save a Symbol::asScope() call
isScope() calls asScope().

Change-Id: I9ffe3bf2b9cff567b32a59cf27727097642b560b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-12 12:29:58 +01:00
Nikolai Kosjar
69504c25ca C++: Document::functionAt provides line information
Needed for the debugger.

Change-Id: I6465f6dc53017df212e403ea8a9a1c7977ac1671
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-12 12:29:51 +01:00
Nikolai Kosjar
cefd1832ce C++: Include class name for inline functions in functionAt
The code that constructed the fully qualified name used
enclosingNamespace() which skips classes.

Use LookupContext::fullyQualifiedName() instead.

Change-Id: Ic03a91c0fe120c52dc69f3e78e82a574458d8314
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-11-11 11:50:46 +01:00
Christian Kandeler
9d677e3302 qbs build: Remove unneeded import statements.
The respective items are available without it.

Change-Id: Idc840cf08e7bec84f561c096afe8de25b1fb8468
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-11-10 15:45:14 +01:00
Przemyslaw Gorszkowski
0ff1cba77b C++: fix follow symbol for const arguments
Fixed case:

class Foo {};
void foo(int v) {}
void foo(const char *v) {}
void foo(const Foo &v) {}
void foo(char v) {}

void test()
{
    foo(5);
    foo("hoo");
    foo('a');
    char *var = "var";
    foo(var); // Jumps to last override, regardless of its type
    Foo f;
    foo(f); // Jumps to last override
}

Task-number: QTCREATORBUG-13128
Change-Id: I038553bb3bdbe1c300fc01573c14b6fedf0320cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-07 11:34:28 +01:00
hjk
ca151d07fa CPlusPlus: Use QVector<Token> instead of QList
Better suited to avoid the indirection (sizeof(Token) > sizeof(void *))

Change-Id: Ia5f42781e720ef6aa8161f8f81ae8ddd8e58c837
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-06 16:13:58 +01:00
Orgad Shaneh
541762a1a1 C++: Remove unused file
Change-Id: I5e4f03f9a5f80b2697ac1e7a952a8c5b5765aae2
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-04 08:37:06 +01:00
Nikolai Kosjar
0c107b33d1 CppTools: Do not re-use semantic document if dependencies changed
Changes from the current editor snapshot to the previous one represent
dependency changes (include paths, defines, ...) for the document. Use
this to stop the semantic info updater from re-using the previous
document for highlighthing.

Task-number: QTCREATORBUG-12267
Change-Id: I91308700122ded7c458c267b685c00b966874a64
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-10-15 10:33:27 +02:00
Eike Ziller
ea27143239 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/libs/utils/ipaddresslineedit.cpp
	src/libs/utils/logging.h
	src/plugins/analyzerbase/AnalyzerBase.pluginspec.in
	src/plugins/android/Android.pluginspec.in
	src/plugins/android/androiddeploystep.cpp
	src/plugins/android/androiddeploystep.h
	src/plugins/android/androiddeploystepfactory.cpp
	src/plugins/android/androiddeploystepwidget.cpp
	src/plugins/android/androidpackagecreationfactory.cpp
	src/plugins/android/androidpackagecreationstep.cpp
	src/plugins/android/androidpackagecreationstep.h
	src/plugins/android/androidpackagecreationwidget.cpp
	src/plugins/android/androidpackagecreationwidget.h
	src/plugins/android/javafilewizard.cpp
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/baremetal/BareMetal.pluginspec.in
	src/plugins/bazaar/Bazaar.pluginspec.in
	src/plugins/beautifier/Beautifier.pluginspec.in
	src/plugins/bineditor/BinEditor.pluginspec.in
	src/plugins/bookmarks/Bookmarks.pluginspec.in
	src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in
	src/plugins/clangcodemodel/clanghighlightingsupport.cpp
	src/plugins/clangcodemodel/clangsymbolsearcher.cpp
	src/plugins/classview/ClassView.pluginspec.in
	src/plugins/clearcase/ClearCase.pluginspec.in
	src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in
	src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp
	src/plugins/cmakeprojectmanager/cmakehighlighter.cpp
	src/plugins/coreplugin/Core.pluginspec.in
	src/plugins/cpaster/CodePaster.pluginspec.in
	src/plugins/cppeditor/CppEditor.pluginspec.in
	src/plugins/cppeditor/cppfilewizard.cpp
	src/plugins/cpptools/CppTools.pluginspec.in
	src/plugins/cpptools/cpphighlightingsupportinternal.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.cpp
	src/plugins/cpptools/cppmodelmanagerinterface.h
	src/plugins/cvs/CVS.pluginspec.in
	src/plugins/debugger/Debugger.pluginspec.in
	src/plugins/designer/Designer.pluginspec.in
	src/plugins/diffeditor/DiffEditor.pluginspec.in
	src/plugins/emacskeys/EmacsKeys.pluginspec.in
	src/plugins/fakevim/FakeVim.pluginspec.in
	src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in
	src/plugins/git/Git.pluginspec.in
	src/plugins/git/gitorious/gitorious.cpp
	src/plugins/git/gitorious/gitorious.h
	src/plugins/git/gitorious/gitoriousclonewizard.cpp
	src/plugins/git/gitorious/gitorioushostwidget.cpp
	src/plugins/git/gitorious/gitorioushostwidget.h
	src/plugins/git/gitorious/gitorioushostwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.cpp
	src/plugins/git/gitorious/gitoriousprojectwidget.h
	src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp
	src/plugins/git/gitorious/gitoriousprojectwizardpage.h
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp
	src/plugins/git/gitorious/gitoriousrepositorywizardpage.h
	src/plugins/glsleditor/GLSLEditor.pluginspec.in
	src/plugins/glsleditor/glsleditorfactory.cpp
	src/plugins/glsleditor/glslfilewizard.cpp
	src/plugins/helloworld/HelloWorld.pluginspec.in
	src/plugins/help/Help.pluginspec.in
	src/plugins/imageviewer/ImageViewer.pluginspec.in
	src/plugins/ios/Ios.pluginspec.in
	src/plugins/macros/Macros.pluginspec.in
	src/plugins/mercurial/Mercurial.pluginspec.in
	src/plugins/perforce/Perforce.pluginspec.in
	src/plugins/projectexplorer/ProjectExplorer.pluginspec.in
	src/plugins/pythoneditor/PythonEditor.pluginspec.in
	src/plugins/pythoneditor/pythoneditorwidget.cpp
	src/plugins/pythoneditor/wizard/pythonfilewizard.cpp
	src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in
	src/plugins/qmakeprojectmanager/profileeditorfactory.cpp
	src/plugins/qmldesigner/QmlDesigner.pluginspec.in
	src/plugins/qmljseditor/QmlJSEditor.pluginspec.in
	src/plugins/qmljseditor/qmljseditorfactory.cpp
	src/plugins/qmljstools/QmlJSTools.pluginspec.in
	src/plugins/qmlprofiler/QmlProfiler.pluginspec.in
	src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in
	src/plugins/qnx/Qnx.pluginspec.in
	src/plugins/qtsupport/QtSupport.pluginspec.in
	src/plugins/remotelinux/RemoteLinux.pluginspec.in
	src/plugins/resourceeditor/ResourceEditor.pluginspec.in
	src/plugins/resourceeditor/resourcewizard.h
	src/plugins/subversion/Subversion.pluginspec.in
	src/plugins/tasklist/TaskList.pluginspec.in
	src/plugins/texteditor/TextEditor.pluginspec.in
	src/plugins/texteditor/basetexteditor_p.h
	src/plugins/texteditor/basetextmark.cpp
	src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h
	src/plugins/texteditor/codeassist/defaultassistinterface.h
	src/plugins/texteditor/codeassist/iassistproposalitem.cpp
	src/plugins/texteditor/itexteditor.cpp
	src/plugins/texteditor/itexteditor.h
	src/plugins/texteditor/itextmark.cpp
	src/plugins/texteditor/plaintexteditor.cpp
	src/plugins/texteditor/plaintexteditor.h
	src/plugins/texteditor/texteditoractionhandler.cpp
	src/plugins/todo/Todo.pluginspec.in
	src/plugins/updateinfo/UpdateInfo.pluginspec.in
	src/plugins/valgrind/Valgrind.pluginspec.in
	src/plugins/vcsbase/VcsBase.pluginspec.in
	src/plugins/welcome/Welcome.pluginspec.in
	src/plugins/winrt/WinRt.pluginspec.in
	tests/auto/debugger/temporarydir.h

Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
2014-10-14 15:36:16 +02:00
Nikolai Kosjar
32d795f2b6 C++: Do not share dependency table when copying a Snapshot
There are multiple situations were the snapshot is copied and
access/modifications to the dependency table data is made in other
threads, e.g.:

    * FindUsages called by ProcessFile
    * findReferences() in cppuseselectionsupdater.cpp
    * CppModelManager::projectPartFromDependencies() (clang path)

Change-Id: Ided1c5350f339c5bc960b87b32c78ccc21fa61f6
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-10-09 13:39:07 +02:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Nikolai Kosjar
a366429766 CppEditor: Add very first include after include guard
...when adding an include for an undefined identifier.

Change-Id: Ia338e924901262a847d3bd7ed9733d8e66c631dd
Task-number: QTCREATORBUG-10391
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-10-08 15:49:04 +02:00
Nikolai Kosjar
c2e5f1c819 C++: Pass on the byte offsets of macro arguments
...to the Document/Block.

Change-Id: I1a96dc70ac93254e6030326b36a5df9a2cdc2bd8
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-10-08 09:51:17 +02:00
David Schulz
78c707760e Cpp: Adjust includes when files are renamed.
Change-Id: Ie6aaaa5d99ba3823d9d42331f45b2dcab397e1cd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-10-02 15:09:20 +02:00
Christian Kandeler
a68d76cef2 CPlusPlus: Fix qbs build.
Change-Id: Id38252d7e24bccc2a0c4bf2631d98da632c16533
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-10-01 09:45:13 +02:00
Eike Ziller
81cb471997 Editors: Support dragging from outline views
Fill the line and column information in the location returned by
QmlOutlineModel::sourceLocation for that.
The drag & drop code also needed a way to override the executed drop
action for file drops, because the QML outline supports move-drags, which
would lead to the items being removed from the outline when dragged onto
a split...

Change-Id: I2478abc7d5aa2f3aa676cdd609ecb69a50adce8c
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-09-30 13:08:49 +02:00
Nikolai Kosjar
4da91bef8d C++: Fix endless loop in lookup on Windows
...for templates with typedefs referencing the respectively other
template (basic_ostream <-> ostreambuf_iterator).

Tested with MSVC 2013.

Regression introduced by ba42ceb0cb.

Task-number: QTCREATORBUG-13064
Task-number: QTCREATORBUG-13065
Change-Id: I71a45c720663a73c3302eb7da731e6ad2d8f0fbd
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-09-25 11:35:47 +02:00
Nikolai Kosjar
79f0ab18c3 C++: Clear state in DependencyTable::build
...since build() is called multiple times for e.g. the global snapshot
(CppModelManager::projectPartFromDependencies,
CppModelManager::replaceDocument).

Change-Id: I03667496a5abc984ba976046dc7b76998a6e3336
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-09-22 19:22:30 +02:00
hjk
9a968b7417 CppTools: Move DependencyTable to Snapshot
It logically depends on the Snapshot and has a related lifetime.
Keeping it in the Snapshot avoids some code compelxity.

Change-Id: I24ee4483b44d9b0d7f2e4d494ae7ea624b949f9c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-19 11:11:30 +02:00
hjk
7104998d41 CPlusPlus: Simplify MatchingText interface
Change-Id: I46878d9ca048d0c79032445f5adc27c12d27f30c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-17 11:26:14 +02:00
Erik Verbruggen
67421f6c53 C++: fix invalid nesting of if statement.
Reported as a dead store by the clang static analyzer.

Change-Id: Id5eb72ea4698a17486b8a05d88ee66f3fd89bcfc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-12 11:31:56 +02:00
Nikolai Kosjar
1f53ecd898 Revert "C++: add support for resolving typedefs for template arguments"
This reverts commit c228b36ccf.

There are multiple issues with the reverted patch:
  * Infinite loop due to indirect recursion e.g. when opening projectmodels.cpp
  * Crash when executing CppTools tests on Windows (no infinite loop)

Change-Id: I38f02132ca57d3d32085db6146d0df7d620d7618
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-09-11 12:55:02 +02:00
Przemyslaw Gorszkowski
c228b36ccf C++: add support for resolving typedefs for template arguments
Example:
template <typename T>
struct Base { T t; };
struct Foo { int foo; };
void fun() {
  typedef Foo TypedefedFoo;
  Base<TypedefedFoo> baseFoo;
  baseFoo.t.// no code completion
}

Change-Id: I4822693d3fa1ee2e9b0e4cdd28bb9a8d441fb313
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-09 13:49:31 +02:00
Orgad Shaneh
dc6c0bceac C++: Remove double return in FindUsages
Change-Id: I76a0f4e20b364affdd8a7939fced6f0f012b661c
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-09-09 11:58:47 +02:00
Christian Kandeler
847f10e9cc Remove Qt version checks.
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.

Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-09-08 10:33:25 +02:00
Kai Koehne
e2584f69d4 Replace QLatin1String("x") with QLatin1Char('x') where possible
Change-Id: I2f90c8ae7b5e968b9de882833f8661ab540a9232
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-09-04 14:50:00 +02:00
Eike Ziller
49db3a450a Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/coreplugin/editormanager/editormanager.cpp
	src/plugins/cppeditor/cppeditor.cpp
	src/plugins/remotelinux/remotelinuxdebugsupport.cpp
	src/plugins/texteditor/basetexteditor.cpp

Change-Id: I0da7c1cf2506b12d0563795aa8177fc45e97050f
2014-09-03 16:08:02 +02:00
Nikolai Kosjar
d5c6a360d0 C++: Remove unused local variable
Change-Id: I4568709edc7e11de2584916014c16f95ceb4b584
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-08-29 16:59:44 +02:00
Erik Verbruggen
c8c2aaafdf C++: Fix possible use-after-free of AST.
The CppRefactoringChanges::fileNoEditor takes a Document from the
snapshot it has. Although this snapshot is a safe copy, it might have
been gotten right after it was updated by indexing. Such a document will
still have its AST. If this AST is used by any refactoring action
without retaining it, the pointers will be dangling after a short while
(specifically: after the locator has extracted all the information).

The fileNoEditor method is called by the declDefLinkFinder to search
the target document. The snapshot is obtained before, and contains the
document for the semantic info. However, the target document will not
come from the semantic info, but from the indexer.

Change-Id: I212ff41dde6910e94e80552b2c3e5911fe9496ae
Task-number: QTCREATORBUG-11262
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-29 14:14:37 +02:00
Erik Verbruggen
703f36a4b8 C++: remove reserved names.
See [global.names] (17.6.4.3.2 in the C++11 spec.)

Change-Id: I8434496dbe392b52d339d5f17cfaeee8dbd88995
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-28 17:58:33 +02:00
Przemyslaw Gorszkowski
29532a6971 C++: refactoring: extract finding anonymous as nested type
Change-Id: I73d50d7b51e6a4e9d2b20df487f871793a6a6889
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-28 16:02:07 +02:00
Filipp
077bbf6803 search for partial specialization for arrays
A<int[]> now prefer second specialization for
template<typename T> class A
template<typename T> class A<[]>

Change-Id: I32e874f78b2f5b363d088fbab6a8897e42e44035
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
2014-08-20 10:26:11 +02:00