Commit Graph

61 Commits

Author SHA1 Message Date
Artem Sokolovskii
5790905d6e ProjectExplorer: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I9a7b21643393852d2904ed25abb876998c543172
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-09 09:08:33 +00:00
Artem Sokolovskii
4d4abc8578 ProjectExplorer: Fix build
Change-Id: I75b2b2860d3b8050bf84205d5d8fff8f0737db81
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-11-02 09:33:41 +00:00
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11:14 +00:00
hjk
9b250ea2c0 ProjectExplorer: Use FilePath in ProjectExplorer::openProject{,s}()
Change-Id: Ibfb7ab5ef7226b85452bd37b840408708935453b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 11:35:47 +00:00
hjk
76db1e3746 Core: Add FilePath based overloads to EditorManager::openEditor{,at}
Part of the overall FilePath migration. Keep the original version for
a while to allow using code to catch up.

Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-05-25 09:55:50 +00:00
Eike Ziller
41b0f60bc9 ProjectExplorer: Use new message manager API
Bring general messages pane to front when showing requested wizard
debugging information, otherwise flash.

Task-number: QTCREATORBUG-24430
Change-Id: Icb59542ca37bfe8b8e644e08464fe17abb1c5d93
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-12-07 13:05:59 +00:00
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
Courtesy of readability-static-accessed-through-instance

Amends: b2a766a79a

Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py

Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-11-27 13:26:07 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
David Schulz
398930d3cf ProjectExplorer: Set temporary flag on scratch buffer document
Task-number: QTCREATORBUG-23509
Change-Id: Ieb3922030cb1dd4984b91ac24d0396bb19a4a711
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-03-24 12:55:44 +00:00
Leena Miettinen
77f1a5963d Project Explorer: Fix UI text
Use book-style capitalization for dialog and button labels.

Change-Id: I2c074d83d6a95ad348daacabd561c758e0a493f8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-06-25 11:58:23 +00:00
Christian Kandeler
77c90f0856 Project wizards: Fix project node assertion
Change-Id: I864139747ee6b5e7cb1ac4d59d2b11219750ddde
Reviewed-by: hjk <hjk@qt.io>
2019-06-19 13:38:07 +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
Eike Ziller
e0d38ae414 Export Wizard values to JavaScript macro
Registers a new function "value('name')", available to the wizard json
files, which returns the value of the variable "name" as a JavaScript
object. So, variables with a string value are actual JavaScript strings,
booleans are booleans, lists are lists, and dictionaries are
dictionaries.

The patch also makes it actually possible to assign JSON lists and
dictionaries to values.

This removes some hacks involving creating complex JavaScript objects
through string substitution.

Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-09 11:19:43 +00:00
Christian Kandeler
31517f00bb Wizards: Let user decide which project file to use
When importing projects, it can happen that several files are
encountered that could serve as the main project file. Until now, we
basically opened a random one, which was less than ideal. Now the user
can choose.

Fixes: QTCREATORBUG-17828
Change-Id: Iec08c942d0f9ff349c9752503c8157556f07b416
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-04-15 14:58:52 +00:00
hjk
5ad66f6442 ProjectExplorer: Fix initial top level expansion of projects
For freshly created projects using the json wizard, this
expands the outermost level of that project's entry in
the project tree.

This intentionally does not trigger when reloading from existing
sessions do honor a user's choice after collapsing that
item manually.

Fixes: QTCREATORBUG-17800
Change-Id: I101efaea84e68a4e769c803918652a1447805b2b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-12-13 14:22:01 +00:00
Robert Loehning
4032f6383a Fix frequent typo
can not -> cannot

Change-Id: Ie872ada1bc9b4ed64bffb667c2e44dbb13b4ad11
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-10-23 09:30:20 +00:00
Eike Ziller
5bc38589d8 Fix crash when adding file to sub folder in generic project
The moment the file is added to the project, a reparse is triggered,
which invalidates the tree sub-nodes.
So we need to check if the context node (on which the wizard was opened)
still exists before trying to access it, similar to how we do that in
JsonSummaryPage::findWizardContextNode.

Change-Id: I9154e000a31ea8d5d4ebc66c25528d422c377b94
Fixes: QTCREATORBUG-21342
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-10-18 12:29:44 +00:00
Christian Stenger
964476983e ProjectExplorer: Avoid soft assert when creating new project
Remove soft assert and do a pre-check before calling the function.

Change-Id: I9882e841a47a5b7bc566f1b3a4b156df4229f051
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 12:57:48 +00:00
Pawel Rutka
4aced20a21 Implement support for project file open after AddFile action
Change-Id: I5f5372498a34760976cea5b7d6f5f49dd04558db
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-02-23 15:15:22 +00:00
Tim Jenssen
5c5bac67a4 Wizards: add basic tests
Change-Id: I647227d458540b0271070cc56106165058929d29
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-10-30 11:53:48 +00:00
Montel Laurent
5d27bc747b Use QFileInfo::exists(...) which is faster that QFileInfo(..).exists
Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-04-14 13:18:28 +00:00
Tobias Hunger
95ac4edfd4 Projectexplorer: Modernize codebase
Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
2016-04-15 09:40:53 +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
Tobias Hunger
56a9b93a28 JsonWizard: Add option to put evaluated expressions into options
This is necessary to allow for constants that are not re-evaluated all
the time.

Change-Id: I4aec9d71aeae1a25ffa97eac177dd9c6fc6a90ca
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-14 14:26:24 +00:00
Tobias Hunger
480f40c038 JSONWizard: Unify "options" handling
Code was duplicated between the factory of the wizard and the file
generator.

Change-Id: Ied2ba99218a5f06e8a0dce0fbc12f277195de8ad
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-12-14 14:26:17 +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
Tobias Hunger
cb0128846b JsonWizard: Make template processing more widely available
Change-Id: I2c6eecc5d2a3c5429ce3a6a564d65f24ae3d23eb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-09-28 08:32:22 +00:00
Tobias Hunger
39e8a3abf3 MacroExpander: Fix variable descriptions
Task-number: QTCREATORBUG-15072
Change-Id: I176f2404509fd6be87dd8db98f5f1f5ef5e34dd6
Reviewed-by: hjk <hjk@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-09-21 11:08:59 +00:00
Eike Ziller
054ed354e0 Merge remote-tracking branch 'origin/3.5'
Change-Id: I30148c16cbb66ef670caaf1c74dccff47069bf68
2015-09-15 07:41:02 +02:00
Eike Ziller
9b8f713bc8 Wizards: Respect cancel button when asking about overwriting files
Change-Id: Ica567fd53aedf074976165401b98558e75e3bb56
Task-number: QTCREATORBUG-15022
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-10 14:18:30 +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
Alessandro Portale
d8c012e29b JsonWizard: Remove homebrew QValue(bool).toString()
QValue(bool).toString() does return "true":"false".

Change-Id: I01021eeb6be8a6e65b2fdd61c5adfee1766dbf31
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 17:44:59 +00:00
Tobias Hunger
33a1220019 JsonWizard: Fix expansion of complex macros
Fix expansion of bool macros and empty string macros embedded into
other macros.

Change-Id: I7d65a4692c48c6299956cc8c4c2c28efb1c8e149
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-04 15:26:32 +00:00
Tobias Hunger
32bcc3dc5f Wizards: Add dialog to investigate wizard state
Add an action to trigger it (not bound to any key sequence
by default).

Change-Id: I52ed9107fcbcb8c6b5ae1e4c4768250e405e141a
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-06-04 12:10:56 +00:00
Tobias Hunger
f09a87e5ba JsonWizard: Add helper to deal with string lists
Change-Id: I5d30f22367b365a71417c473cba3ce7125567a77
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-28 15:34:30 +00:00
Tobias Hunger
52d6c09183 JsonWizard: Allow to delegate accept/reject to the current page
Change-Id: I1d2826159ce1cd4f531a576720b9ba6f204d15fb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 12:07:45 +00:00
Tobias Hunger
162c36dbdf JsonWizard: Move code for opening files into JsonWizard
Move code opening files and projects directly into the JsonWizard.
It makes no sense to keep reimplementing this functionality in
generators.

Change-Id: Ib4686a262fa9b2c78028146d138c5bba5d5b604a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-05-12 06:09:00 +00:00
Tobias Hunger
8211e6a084 JsonWizard: Simplify handling of bools via JS
Change-Id: I5381e83f6714886b7bf8cbcb859e1dd3b115a6c3
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-05-11 13:33:10 +00:00
Leena Miettinen
d9e11e8d40 JSON wizard: fix capitalization of message box title
Use book-style capitalization for titles.

Change-Id: I7912f63aeaa87ae5d562839edfafa584140b88e4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-30 08:47:23 +00:00
Tobias Hunger
35aafdcdd9 JsonWizard: Add a polish phase
Add a signal/method to polish the generated files: This phase happens after all files
are written to disk and are ready. It is intended for tasks not directly related to
the project setup: E.g. generation of config files, etc.

Use this to generate our config files.

Change-Id: I9bb5d296bec19f163b70c5ec8d43d5b8e3a52d79
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-23 15:51:33 +00:00
Tobias Hunger
0ff8b9e283 Json Wizard: Fix unsetting of attributes
This did trigger all kinds of side-effects, one of them was

Task-number: QTCREATORBUG-14294
Change-Id: If39f827828e9c5a2559bd6b3b5392ac819fbd931
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-20 11:50:01 +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
Tobias Hunger
b848ade48d JsonWizard: Report runtime errors from pages
Change-Id: Ia96ac950ec209fcbc82c7b49b72d0b6417b99906
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-21 09:27:17 +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
Tobias Hunger
fa223ab65b JsonWizard: Add separate method to get stringified values
Have value(...) return a QVariant that is never mangeled and add
a stringValue(...) method to retrieve stringified values. It is
way easier to see who needs what now.

Use this consistently in the JsonWizard and fix one place where
a QVariant was expected but a stringified version was returned.

Task-number: QTCREATORBUG-13486
Change-Id: I2c4e9188280940e529f0f60bcc18b9b7330865d1
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2014-11-21 17:25:12 +01:00
Tobias Hunger
de34e0e30b FormWizard: Fix newlines being escaped in generated output
Export the form contents as a list of lines and join them when
needed instead of hoping to unescape '\\n' in all places where
it is necessary.

This approach should be a bit saver since it will cause parse
errors in the wizard, which are more visible than broken output
in the generated files.

Task-number: QTCREATORBUG-13456
Change-Id: I434a9227082f92be3c2ce75006f61ac79a2b6fd6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-20 18:11:47 +01:00
Tobias Hunger
7db9c37b2d JsonWizard: Allow the summary page to change to the file list
Change the JsonWizard interface:
* generateFileList now does no longer change the state of the JsonWizard
* commitToFileList added which is used to commit the wizard to a final
  list of files.
* Trigger generateFileList when version control is changed in the
  SummaryPage
* Commit to the file list once the SummaryPage is done

Change-Id: Ieb7b7abbf428d96596526c01946ecf0852f65744
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2014-11-10 16:29:03 +01:00
Tobias Hunger
b360e73f6a JsonWizard: Use up-to-date file information
This avoids a new project being opened if you are trying to add a new
subproject to some existing project.

Change-Id: Ic5a2f4b0dedbfd6994c59e4944fc32b11d648871
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-11-03 09:44:20 +01:00
Tobias Hunger
7dde68996e JsonWizard: Force minimum size to something sensible
Change-Id: I8d6b6b1519dc711710ad4d28148d3e86291bae58
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-10-30 16:47:18 +01:00
Tobias Hunger
e8d02209e8 JsonWizard: Add a way to check for existence of a variable
Change-Id: Ia1368334156c33ca270b5cc7d946efcdb7b635a8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-10-30 16:46:39 +01:00