summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppmodelmanager_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Replace QFileInfo::fileName() with FileName::fileName()Orgad Shaneh2015-01-291-4/+3
| | | | | | | | | | Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d Reviewed-by: hjk <hjk@theqtcompany.com>
* | CppTools: Rename EditorDocumentHandle to CppEditorDocumentHandleNikolai Kosjar2015-01-141-2/+2
| | | | | | | | | | | | | | | | ...and related functions. For clarity in client code. Change-Id: Icad6fc7b1eee2ce46a2eba8435359837a23409c8 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Core: Use FileName for file path in IDocumentOrgad Shaneh2015-01-121-1/+1
| | | | | | | | | | Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* | Merge remote-tracking branch 'origin/3.3'Eike Ziller2015-01-081-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/cppeditor/cppdocumentationcommenthelper.cpp Change-Id: I2cf25eba1de149765a6c44ad354d606ce9de512d
| * CppTools: Do not append '/' to fallback header pathsNikolai Kosjar2014-12-151-1/+1
| | | | | | | | | | | | | | | | | | ...since this will confuse the completer. Task-number: QTCREATORBUG-13567 Change-Id: I4172d433f23f3907690d4c00f92fadb68fa354e8 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* | CppTools: Tests: Stop writing into source dirNikolai Kosjar2014-12-191-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, always write into a unique temporary directory in QDir::tempPath(). Where applicable, read the test source from files instead of first writing the file. Some clean ups in test_codegen*. Change-Id: Id48dc50c6ca16252edfd9fc8a86ba0de9f9be486 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | CppTools: Fix flaky test_cpplocatorfilters_CppLocatorFilterNikolai Kosjar2014-12-191-1/+1
| | | | | | | | | | | | | | The GenericProjectManager tests left over some state in CppModelManager. Change-Id: I3f5c5bf27b9443e6753eb6c24114e2e5b99e7372 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* | CppTools: Fix test_modelmanager_extraeditorsupport_uiFilesNikolai Kosjar2014-12-191-52/+12
| | | | | | | | | | | | | | | | | | | | | | | | The test was broken since the QmakeProject was changed to work asynchronously. FAIL! : CppTools::Internal::CppToolsPlugin::test_modelmanager_extraeditorsupport_uiFiles() Compared values are not the same Actual (workingCopy.size()): 1 Expected (2) : 2 Change-Id: I6f7d05fb70af3def5fc371a9783b606309686e32 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* | CppTools: Create ProjectInfos explicitlyNikolai Kosjar2014-12-191-25/+17
| | | | | | | | | | | | | | | | | | | | | | ...instead of going through CppModelManager::projectInfo(). Now CppModelManager::projectInfo() returns an invalid ProjectInfo in case there is no valid data for the given Project. Change-Id: I11908bf2ddf865b1d3d71ff176eaf4139292b21c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | C++: handle case-insensitive file names in the WorkingCopyErik Verbruggen2014-12-151-2/+2
|/ | | | | | | | | ... by keying on Utils::FileName Task-number: QTCREATORBUG-12390 Change-Id: Ia1a59d2e422b4f92300ac6a8e0e52dd7456a6e70 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* CppTools: Update document on activationNikolai Kosjar2014-12-031-0/+63
| | | | | | | | | | | | | | | | | | | | | | ...if the project was updated in the meanwhile. If a project is updated mark invisible editor documents dirty and update them if they get focus. This also fixes document highlighting when restoring a session for documents that the user "switched away" before the project info is pushed to CppModelManager. This completes CppTools: Update visible documents on project update commit c2eb91e053332d010adc8b9e7918d9de28ef4c90 which only takes care of visible documents. Task-number: QTCREATORBUG-13270 Change-Id: Id445e7f509deac5d03194aecc54ce4629b7926ce Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* CppTools: Always check for a valid BuiltinEditorDocumentParser*Nikolai Kosjar2014-11-281-1/+2
| | | | | | | | | | This fixes a crash if the include hierarchy sidebar is invoked with the clang code model. BuiltinEditorDocumentParser::get(editorFilePath) returns 0 in that case. Task-number: QTCREATORBUG-13553 Change-Id: I9292691c8156bdaaffcac1c3864201ba8a6cbdef Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possiblehjk2014-11-031-1/+1
| | | | | | | | Faster. Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81 Reviewed-by: Marc Reilly <marc.reilly@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* CppTools: Remove last traces of CppEditorSupportNikolai Kosjar2014-10-211-5/+0
| | | | | | | | | | Superseded by commit commit 89bd4ee3c4e4be4b39dee9ef12e798d21be3d2cb C++: Base parsing on editor document instead of widget Change-Id: Iffa6e47bddc0fa3de1eab9b65fe8f711520d2d7f Reviewed-by: Christian Stenger <christian.stenger@digia.com>
* Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | CppTools: Avoid compiler warningChristian Stenger2014-10-061-0/+1
| | | | | | | | | | Change-Id: I19c423dd9f6cbaecbaa925df0090af001b951601 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Cpp: Adjust includes when files are renamed.David Schulz2014-10-021-0/+47
| | | | | | | | | | Change-Id: Ie6aaaa5d99ba3823d9d42331f45b2dcab397e1cd Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | ProjectExplorer: Apply static pattern to ProjectExplorerPluginhjk2014-09-261-5/+3
| | | | | | | | | | | | | | Adjust caller sites and surroundings. Change-Id: I6c3c80e42f35eabedc1f89c8c42cca1025aca12f Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | CppTools: Change CppModelManager implementation patternhjk2014-09-191-4/+2
| | | | | | | | | | | | | | | | | | Replace the CppModelManagerInterface/derived CppModelManager combo by a more common CppModelManager/CppModelManagerPrivate pimpl pattern. Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: remove C/C++ distinction from ProjectPart fields.Erik Verbruggen2014-09-161-16/+16
| | | | | | | | | | | | | | | | | | | | .. because they now hold only files for a single language+extensions combination. Task-number: QTCREATORBUG-11709 Task-number: QTCREATORBUG-12818 Change-Id: If294f6de07d60126be733d98de12b89b8af3efce Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: update project info once after finishing adding all project parts.Erik Verbruggen2014-09-121-0/+16
| | | | | | | | | | | | | | | | So that recalculating the information is not O(n^2) but linear. Change-Id: I69903e0b5ad321d071804d782ad634a3f300e71a Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | C++: Change QStringList to QSet<QString> to prevent conversions.Erik Verbruggen2014-09-041-9/+9
| | | | | | | | | | | | | | | | | | This eliminates a bunch of list->set->list conversions. Especially the ProjectInfo::appendProjectPart takes lots of time converting for every part added. Change-Id: Ib3c8cd4b0ad6c012ccbeed12ebedd46b9b6cca95 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | Cpp{Editor,Tools}: Remove some Qt4-only codeNikolai Kosjar2014-08-281-7/+1
| | | | | | | | | | Change-Id: I94ca7b239e974b6b400933466ee2ef5ae4def336 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | C++: Base parsing on editor document instead of widgetNikolai Kosjar2014-08-251-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mainly takes CppEditorSupport apart. * Parsing is now invoked by CPPEditorDocument itself by listening to QTextDocument::contentsChanged(). * Upon construction and destruction CPPEditorDocument creates and deletes an EditorDocumentHandle for (un)registration in the model manager. This handle provides everything to generate the working copy and to access the editor document processor. * A CPPEditorDocument owns a BaseEditorDocumentProcessor instance that controls parsing, semantic info recalculation and the semantic highlighting for the document. This is more or less what is left from CppEditorSupport and can be considered as the backend of a CPPEditorDocument. CPPEditorDocument itself is quite small. * BuiltinEditorDocumentProcessor and ClangEditorDocumentProcessor derive from BaseEditorDocumentProcessor and implement the gaps. * Since the semantic info calculation was bound to the widget, it also calculated the local uses, which depend on the cursor position. This calculation got moved into the extracted class UseSeletionsUpdater in the cppeditor plugin, which is run once the cursor position changes or the semantic info document is updated. * Some more logic got extracted: - SemanticInfoUpdater (logic was in CppEditorSupport) - SemanticHighlighter (logic was in CppEditorSupport) * The *Parser and *Processor classes can be easily accessed by the static function get(). * CppHighlightingSupport is gone since it turned out to be useless. * The editor dependency in CompletionAssistProviders is gone since we actually only need the file path now. Change-Id: I49d3a7bd138c5ed9620123e34480772535156508 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Rename SnapshotUpdater to BuiltinEditorDocumentParserNikolai Kosjar2014-08-201-6/+5
| | | | | | | | | | Change-Id: I554b5e9e3f1ef7c167fa45b5cd0c230fdf63073b Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Move Project{Part,Info} to new cppprojects.{h,cpp}Nikolai Kosjar2014-08-201-1/+1
| | | | | | | | | | Change-Id: Ieff216017b9da1e6a12121688ea9572bdd81fd9b Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Move WorkingCopy to new cppworkingcopy.{h,cpp}Nikolai Kosjar2014-08-201-1/+1
| | | | | | | | | | Change-Id: I447acf28849bffb52c1e6b6eafdde221ec0b179e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | EditorManager: Close documents instead of editors where appropriateEike Ziller2014-08-181-2/+2
|/ | | | | | | | | This is the first step in actually making "closeEditor(s)" close editors instead of documents. Change-Id: I02761e0cef950b8fc093f65a90df04a9a7550681 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* CppTools: Auto-include pre-compiled headersNikolai Kosjar2014-07-241-8/+23
| | | | | | | | | | | | So far the pre-compiled headers were processed (thus defines from those headers were visible), but the actual includes for the documents were not added, which is necessary for lookup/completion. Note that this will be only done if pre-compiled headers are not ignored (Options > C++ > Code Model > [] Ignore pre-compiled headers). Change-Id: I54a8e6b00597af164d958e3e9f2a1075ea187788 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: fix include/framework path handling.Erik Verbruggen2014-07-041-18/+37
| | | | | | | | | | Instead of having two lists of paths, now only one list is used where both include paths and framework paths can be mixed. This reflects the way the compiler is invoked, and retains the (correct) search order. Task-number: QTCREATORBUG-11599 Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppTools: Rename CppPreprocessor to CppSourceProcessorNikolai Kosjar2014-06-041-5/+5
| | | | | | | | | | ...since it does quite a bit more than only preprocessing, as the name suggests. We use that class to process source files in general. The output is not a preprocessed source, but a set of CPlusPlus::Documents with symbols. Change-Id: I787d0f22f9f042ddf0c99e8c2f0bdb9aa7001735 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Cpp{Tools,Editor}: Tests: Use CppModelManager::document()Nikolai Kosjar2014-05-231-4/+4
| | | | | | | ...instead CppModelManager::snapshot().document(). Change-Id: If79bc03d062d309bbf6d4b229255ba281cddf8d5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Cpp{Tools,Editor}: Expect UTF-8 encoded literalsNikolai Kosjar2014-05-231-1/+1
| | | | | Change-Id: I9843c4163aad3fa3f1bfa33060c76328fc2dc25a Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* CppTools: Pass some const variables by referenceOrgad Shaneh2014-05-211-1/+1
| | | | | Change-Id: I3e703c923f6e1a14a89c76f394a070184db0c7bf Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* DocumentModel: Make interface statichjk2014-05-131-10/+10
| | | | | | | Move item model implementation to private, adjust user code. Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * CppTools: Fix test_modelmanager_defines_per_projectNikolai Kosjar2014-01-071-0/+4
| | | | | | | | | | | | | | | | The example project parts had no project file set and thus the "right" project part could not be determined in cppeditor.cpp:718. Change-Id: I088571e9d3c3c8790670bbdd8e68190835a85ad5 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Avoid triggering garbage collector on editor close in testsNikolai Kosjar2014-01-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | Closing an editor might trigger a timer which leads to the invocation of the garbage collector. This is unfavourable for the plugin tests since a test function closing an editor might influence a subsequent test function (e.g. files get removed from the global snapshot although they were added shortly before). Change-Id: Ia80c11f99e2437fe145dc2d983b21962539b5181 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Clean up *Test* classesNikolai Kosjar2014-01-071-1/+1
| | | | | | | | | | | | | | | | * Unify class names * Fix coding style Change-Id: I7498192ba9e6b9fc0e97d3d4f0dbb30f1853a0c9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Introduce Test{Case,Document}Nikolai Kosjar2014-01-071-9/+6
| | | | | | | | | | | | | | Move common functionality of the 12 test classes into base classes. Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppEditor/CppTools: Tests: Fix potential race conditionNikolai Kosjar2013-12-121-32/+27
| | | | | | | | | | | | | | | | ...when updating the code model. Change-Id: Ifc55b7d0bb795b9cfd72465990991bc2cc907846 Reviewed-by: Christian Stenger <christian.stenger@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | C++: split defines into project-defined and toolchain-defined.Erik Verbruggen2013-12-101-7/+7
|/ | | | | | | | So we can ignore possibly problematic toolchain-defines, while can still unconditionally apply project-defines. Change-Id: I7cb96f35a963d080011fe888ef71bfc098dd33ef Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* CppEditor: Ensure utf8 encoded working copy from the preprocessor dialogNikolai Kosjar2013-11-121-1/+1
| | | | | Change-Id: Ifbc2adeff83cbef9841da872e15a5b9dd8379a3d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Revert "EditorManager: Fix crash when closing an editor upon activation"Orgad Shaneh2013-10-081-5/+5
| | | | | | | | | | | | | | | Deleting an editor while currentEditorChanged is apparently not a good idea. Use a queued connection instead. This reverts commits 243a6259618e69b8da9ac2438480c449754f7f77, 447c4ed37f8904ca733d6e6253ad19bb0388f209, d9602ca550c53e60a5229bfec9539e41fa5a694c and 31034870389a512e3450e32ed990e1622bd6e679. Change-Id: Iccbee25fb77714963faa6f7184d1f5f53ed348a6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* fix build against qt4Oswald Buddenhagen2013-10-021-1/+1
| | | | | Change-Id: I1884f6e61dcae95817da10f0ead67f2df99b4ec7 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* CppTools: De-duplicate some code in cppmodelmanager_test.cppNikolai Kosjar2013-10-021-187/+129
| | | | | Change-Id: I371e986c9b41fec5cddf05e3f7849c5e0b9e6b69 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Tests: Move TestDataDir into plugintestutils.{h,cpp}Nikolai Kosjar2013-10-021-2/+1
| | | | | Change-Id: I76d5e421258eda85907e56762a59894ce7f84f13 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* C++: add code-model support for defines-per-editor.Erik Verbruggen2013-10-011-0/+96
| | | | | | | The UI side will come in another commit. Change-Id: I1038a438587fe4cef70408f7f627d08837fc192d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>