Commit Graph

50 Commits

Author SHA1 Message Date
Eike Ziller
f83be6debe Merge remote-tracking branch 'origin/4.15'
Change-Id: Ia6558fc2423fd9cd84ca2282bfa60d102dff682e
2021-05-19 09:54:07 +02:00
David Schulz
a13aef759e Utils: filepathify fileutils
Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-18 14:30:53 +00:00
Christian Kandeler
32653e1a7b CppTools: Fix possible crash when testing
Change-Id: I9ade8c861c44329376c8f1dcc9506561b7689de5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-05-17 13:40:34 +00:00
Christian Stenger
6e798401a0 Fix plugin unit tests when using projects
The ClangTools and the AutoTest plugins use an internal
mechanism to load and configure a project when performing
their integrated unit tests.
Both assumed to have exactly one kit present for these
tests.
Make it possible to have more kits present when starting
with existing settings or if more kits get automatically
generated when starting with clean settings.

Change-Id: If2bc66320c4854f1d34a19d17107e8f0b7d64d39
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-17 04:13:30 +00:00
Christian Stenger
ea88ded352 CppTools: Simplify compile fix
Partially reverts 3f53db12bb.

Change-Id: I7a291550306235430ad460cdba4e0343445aa0ba
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-11-29 08:07:12 +00:00
Christian Stenger
3f53db12bb CppTools: Fix compile
Change-Id: I08ceaa94d9f18b671cee23f226dcdd7db1da0429
Reviewed-by: hjk <hjk@qt.io>
2019-11-28 10:27:23 +00:00
Nikolai Kosjar
818f2d0c5c CppTools: Fix race condition when opening projects for tests
The ClangTools plugin tests open a project and immediately trigger a
build afterwards. We checked whether CppModelManager got already data
from the project manager, but this alone was racy for the mentioned use
case as e.g. the QbsProjectManager might still be in parsing mode and
thus the build was not triggerable. Check for the parsing state, too.

While at it, simplify the code by using QTest::qWaitFor(), which also
takes care of posted events.

Change-Id: Id298695b2e67578def42275bac4ea31f4a39edf2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-22 06:50:42 +00:00
Tim Jenssen
333b33edbe Merge remote-tracking branch 'origin/4.10'
Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
2019-07-12 15:53:56 +02:00
hjk
9703f2e948 CppTools: Avoid some deprecation warnings
Change-Id: I0726bbcf9fd3992312e5980bd176ce85903f27a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-05 12:32:33 +00:00
hjk
b9d6721be8 ProjectExplorer: Reduce ProjectExplorer::configureAsExampleProject()
... to the bits that are actually used.

Change-Id: I39a6ed1f4136d75b776bb89eec6165479097a4ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-07-01 10:05:19 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Tim Jenssen
a78e3e5dd5 use initializer lists
Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 15:10:54 +00:00
Alessandro Portale
1d3d18a969 CppTools: modernize
Change-Id: Iaf02e4d026f1ac8b216833d83cd7a735e21ff60a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2019-01-21 09:00:18 +00:00
David Schulz
a4b5fc00a8 CodeAssist: use shared pointer to pass around proposal models
Task-number: QTCREATORBUG-17752
Change-Id: Ia41f169b86ead209830e6f15764062389ced2b67
Reviewed-by: hjk <hjk@qt.io>
2018-02-27 12:32:36 +00:00
Nikolai Kosjar
45b7c5ac29 Revert "CppTools: Do not put configuration document into global snapshot and working copy"
This reverts commit 05942b63f8 because it
breaks refactoring, e.g. Q_PROPERTY generators.

Change-Id: I9a14b912ba72663f08ea99e7e066d824b18da4b0
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-03-07 11:54:16 +00:00
Tobias Hunger
f50d73cc3c TemporaryDirectory: Fix failing test cases
Change-Id: Ied61a1de9d226815da1eaa050a09dde30091d006
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-01-25 08:16:59 +00:00
Tobias Hunger
c6f90e575e Utils: Introduce a TemporaryDirectory and TemporaryFile class
Both wrap the corresponding Qt class, but make sure all temporary files
or directories are created inside a "master temporary directory".

Change-Id: I55461be507c828c965224c02863ea5ed9bbf9498
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-01-20 12:17:10 +00:00
Nikolai Kosjar
05942b63f8 CppTools: Do not put configuration document into global snapshot and working copy
These are remnants of the time when we had only one snapshot.

Change-Id: I6ff4db645d1065a0ef195834890e0774e2e2c60e
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2016-12-08 08:52:17 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Marco Bubke
ddd1d4c9cc CppTools: Remove cpptools/cppprojects.[h|cpp]
Change-Id: Ida0e8552d371972c141cf561b28667f4428c6fff
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2016-01-13 14:47:27 +00:00
Tobias Hunger
71b4ce6673 Qt: Remove platformName and platformDisplayName methods
Fix fallout of this in KitInformation/Kit/KitManager and the wizards.

Change-Id: I5cb88cc381dc04409401909b810940ab6dccf86a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-02 14:49:29 +00:00
Daniel Teske
b82311024d Open Project: Don't show a error dialog for duplicated projects
Instead, switch to edit mode, show sidebar, scroll to project,
and show a tooltip next to the project.

The tooltip is somewhat easy to miss, but this is a clear improvement
in most cases.

Change-Id: Icd27f76e7d434f33e731b6fd56473ff913986a89
Task-number: QTCREATORBUG-8422
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-24 11:29:09 +00:00
Nikolai Kosjar
442bdbded2 CppTools: Avoid unnecessary blocking of main thread
Among others, BaseEditorDocumentParser::projectPart() was a blocking
operation in case the parser was running. This led to noticeable GUI
freezes for the ClangCodeModel since the function was called from the
main thread.

Rework *EditorDocumentParser to clearly separate the configuration data
(input) from the actual object state. Querying/setting configuration or
(last) state does not block anymore. update() is supposed to get the
necessary configuration and the last state at the beginning and to set
the new state at end.

Change-Id: Ib4b534fa6ff373c3059826726b3f10ece95acc21
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-07-10 14:04:07 +00:00
Nikolai Kosjar
8cb7d68cf6 CppTools: Tests: Fix QTemporaryDir warning on Windows
...coming from TemporaryCopiedDir.

The warning was:

	QTemporaryDir: Unable to remove <some path> most likely due to the presence
	               of read-only files.

It occurred for plugin tests (e.g ClangCodeModel) that used a Qt resource path
as source for TemporaryCopiedDir. Copying a qrc file makes it read-only, see
also QTBUG-17163. Therefore, explicitly add the write permission.

Change-Id: Idc04acd4844c5bc20e9b3de1efc78da3b06ac97c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-07-02 15:28:11 +00:00
Nikolai Kosjar
c5c57dca0c CppTools: Tests: Allow to check only project relevant state
Needed for ClangCodeModel.

If editors are open, the global snapshot and working copy will not be
empty.

Change-Id: I0d1bab8e082a7f41630c7b1b78febe2da009298b
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-03 09:15:39 +00:00
Nikolai Kosjar
05e0b074c1 CppTools: Tests: Clean up ProjectOpenerAndCloser and introduce timeout
Change-Id: Id46305a7e9fba1d8383622a4d21f22ee8cbc470c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-04-14 07:58:23 +00:00
Friedemann Kleint
fb80206f3c Clean exported headers of the CppTools plugin.
Change-Id: I0144ac33e88980c431c54a6d69bbde28da4b1967
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 08:16:48 +00:00
Nikolai Kosjar
93c8509a50 CppTools: Tests: time out in waitForFileInGlobalSnapshot()
Change-Id: I0bf7d826d53749c5fd1be1e4f3c2faa403d13342
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-02-18 12:16:29 +00:00
Orgad Shaneh
831fb6181e CppTools: Remove assertions for CppModelManager::instance()
It cannot return null.

Change-Id: I3ac5f33e7e02554edc8df067c7b85518e58c1fc2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-17 10:11:29 +00: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
f0aea93b44 CppEditor: Tests: Move doxygen tests in separate test class
Change-Id: If27b4e11deafaefd95a5815466fc5fdac23ba30a
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-04 09:21:42 +00: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
Christian Stenger
91fabc4868 CppTools: Fix hanging test on OSX
Temporary directory is created in a folder having a symbolic link,
verification was done with the unresolved path and failed.

Change-Id: I40c943a307fe136a0f3f6fdbea5145296a63a19e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-07 15:21:18 +01:00
Nikolai Kosjar
6cafc424e8 CppTools: Tests: Stop writing into source dir
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>
2014-12-19 10:29:16 +01:00
Nikolai Kosjar
b94b7b3ee6 CppTools: Fix test_modelmanager_extraeditorsupport_uiFiles
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>
2014-12-19 10:24:55 +01:00
Nikolai Kosjar
ef403a4515 GenericProjectManager: Tests: Clean up
* Get rid of CppModelManagerHelper.
  Now we simply use CppModelManager::projectInfo(someProject).isValid() to
  test whether a project is loaded.

* Copy project data to temporary dir before opening the projects.
  This avoids creating *.user files in the Qt Creator source tree and
  annoying pop ups on test start.

Change-Id: I1a57441ca2099beb6bb96cf620390d669fb47601
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-19 10:24:48 +01:00
hjk
a439483d70 Use QFileInfo::exist(f) instead of QFileInfo(f).exists() if possible
Faster.

Change-Id: I91aa67462e11ff3258600d7f158de79942d0dc81
Reviewed-by: Marc Reilly <marc.reilly@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-11-03 09:31:28 +01: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
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
hjk
953cdb971f TextEditor: More BaseText* -> Text* renamings
*Document* and *Layout* classes, all basetext* files

Change-Id: I1c6e376733a434fcb5c7f19c6210dfa031eeafde
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-09-26 10:12:51 +02:00
Nikolai Kosjar
af34a5b9b4 CppTools: Tests: Fix leaking IAssistProposal and SymbolSearcher
Change-Id: Ic81a5df88d17375cf0087213d84443845bfd38cc
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2014-09-22 10:49:17 +02:00
hjk
b26a17f30d CppTools: Change CppModelManager implementation pattern
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>
2014-09-19 13:17:55 +02:00
Erik Verbruggen
cc70b603d3 C++: Change QStringList to QSet<QString> to prevent conversions.
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>
2014-09-04 15:59:40 +02:00
Nikolai Kosjar
cfe3c0be34 CppTools: Remove test file after test
In test_includeGroups_detectIncludeGroupsByIncludeType the test file was
not removed and thus subsequent and isolated executions of this test
failed.

Change-Id: I5eeb4f004f5b146ac794ca913b4092629131fca3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-06-16 14:44:24 +02:00
Nikolai Kosjar
cadc4b42ba Cpp{Tools,Editor}: Tests: Use QString instead of QByteArray
This is necessary in order to add tests with multi-byte UTF-8 code
points. Otherwise the initial and target source code marker positions
will be calculated on the QByteArray (test code) but used with a QString
(editor document).

Change-Id: I108961b13d32912a4d3193cf26eb59f65d296f57
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-05-23 14:24:10 +02:00
Nikolai Kosjar
c2803b00be CppTools: Avoid self-include
...in CPlusPlus::Document due to cyclic includes.

Task-number: QTCREATORBUG-11457
Change-Id: I1ca19c901c26d9984d795a61879dd6b41c57096c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-02-24 14:08:11 +01:00
Robert Loehning
5292748bf2 Incremented year in copyright info
Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-09 09:41:23 +01:00
Nikolai Kosjar
746da71527 CppEditor/CppTools: Avoid triggering garbage collector on editor close in tests
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>
2014-01-07 14:19:43 +01:00
Nikolai Kosjar
0bd5917867 CppEditor/CppTools: Don't continue in test function on failure
QVERIFY/QCOMPARE are meant to be called in the test function so that on
failure they just can "return" and thus skip subsequent code. Since we
use reusable test code in the test functions (the *TestCase classes), we
need to ensure that on failure no further test code is executed.

This mostly inlines the run function of the test classes into the
constructor.

Change-Id: I320ee032bdde0174ddfe3fdf3f9e18e19abf1d7f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-07 14:19:33 +01:00
Nikolai Kosjar
5c8df5fa4e CppEditor/CppTools: Introduce Test{Case,Document}
Move common functionality of the 12 test classes into base classes.

Change-Id: If64d3cec876807ac6f991151189860a99b8ff4ca
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2014-01-07 14:19:13 +01:00