Commit Graph

59 Commits

Author SHA1 Message Date
Thomas Hartmann
a1ce4c9bc7 QmlDesigner: Fix crash
Change-Id: Ia96a163efb6a612861d5cc90e37a121fcb3db646
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-30 09:54:04 +00:00
Miikka Heikkinen
dd1c89aa22 QmlDesigner: Allow using assets from entire project in subfolders
If editing a subcomponent qml, assets tab now lists assets from the
entire project, and url/font choosers list appropriate resources
from entire project with correct relative paths.

Fixes: QDS-3638
Change-Id: I4a066c30d1bd696e8edbd17754bb9df2b7880873
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2021-02-02 09:41:57 +00:00
Marco Bubke
7c8847333b QmlDesigner: Go into components
Task-nubmer: QDS-2696
Change-Id: I2f0ee71deea593da08fa4a754d783b53867473ed
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-16 08:37:53 +00:00
Christian Stenger
0de1668802 Fix qmake build of unittests
This basically continues / amends work done
with e1c88116b3.

Change-Id: Ia8b3a4694e7fea4c15e344839f87c11fbe8fbbf4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-08-27 04:28:52 +00:00
Eike Ziller
5b364de168 Use dialogParent() instead of mainWindow()
There are very few reasons to use mainWindow() directly.
Especially for modal dialogs, using dialogParent() is important, since
that guarantees the stacking order in case of other dialogs currently
being open.

Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6
Reviewed-by: hjk <hjk@qt.io>
2020-06-02 11:44:53 +00:00
Eike Ziller
99cd623fa7 QmlDesigner: Fix crash when selecting ISO icon
On macOS. Never use dynamic_cast over library boundaries - it may or may
not work, depending on compiler/platform.

Fixes: QTCREATORBUG-23773
Change-Id: I889d35f336ff80e2b1ae3cbe921f7de2fe541bd8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-30 06:10:44 +00:00
Thomas Hartmann
5e225f85eb QmlDesigner: Fix Coverity scan defects
Change-Id: I07a61fe4498ae0b28baaa969f0decfa5689b4443
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-10-21 12:13:13 +00:00
hjk
b7366f3cce QmlDesigner: Compile fix: More Java-style iterator removal
We use QT_NO_JAVA_STYLE_ITERATORS, and Qt dev has wrapped more
iterators with that, so without this patch (or undefining
QT_NO_JAVA_STYLE_ITERATORS) creator does not compile.

Change-Id: I7d3ef0ed11db72e07333e21311725cd13136696a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2019-08-01 12:08:53 +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
hjk
020ab0d9ee QmlDesigner: Remove two not-so-important uses of Node::nodeType()
Progress towards removing these flags.

Change-Id: Idc98d8b104c4fe56501a0fed79f4539a8335f755
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-01 09:21:36 +00:00
hjk
ad4e2562fa ProjectExplorer: Replace Node::setNodeType by virtual functions
Not the usual direction of change, but currently there are
several systems to identify or invoke node functionality.

Virtual functions are likely to stay in this context, so this
here attempts to help consolidation by reducing the influence
of the node type flags, hopefully leading to full removal
by making remaining functionality available through the
other mechanisms (virtual functions, asFooNode() 'casts',
less so the FileType flag).

Change-Id: I12a17ce30b3c8883995b29b4720408020ee0fa3e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-03-01 08:32:14 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +00:00
Tim Jenssen
70a78640eb QmlDesigner: take only width and height as auxiliary values
In case the user switched into a component to see what is wrong or right
it is very confusing if the component takes some property which is set
in the parent.

Change-Id: Ib8310bf6b6af029e7aa392bd924c04aa3e982a4d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-09-24 09:00:50 +00:00
Alessandro Portale
859d847769 QmlDesigner: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-default-member-init
modernize-use-equals-default

Change-Id: Ic42b5c59fed5a4a01853138542d8156471e86f58
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-07-25 12:53:26 +00:00
hjk
1bd4d97686 QmlDesigner: Fix compilation before it breaks
Make #includes self-contained, anticipating breakage in the upcoming
removal of projectexplorer/runconfiguration.h in qmakeproject.h

Change-Id: Ia166ccb3c830c3cc6f50181690ba281d4a705de8
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-03-19 15:35:17 +00:00
Thomas Hartmann
ca6d4a8877 QmlDesigner: Add static helper functions
Change-Id: If89619a7fe75b09afa53e2b33464364deccfcaee
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-02-13 13:27:24 +00:00
Thomas Hartmann
a7515d25a9 QmlDesigner: Avoid detachs
The non const overloads of first() and last() do detach
if the reference count is higher than 1.
Therefore we use constFirst() and constLast() instead.

Change-Id: I737cfc428f1c21f16185b9b51175e181c0ec7068
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-01-23 10:14:12 +00:00
Tobias Hunger
7c35a38100 Session: Move all functionality related to Nodes into ProjectTree
Do no longer expose Nodes from the SessionManager's API. These are now
exclusively handled by the ProjectTree.

Change-Id: I585c2ac919462073870363436e767640775d9045
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-12 13:44:09 +00:00
Orgad Shaneh
8430da3bf7 Merge remote-tracking branch 'origin/4.3' into master
Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
2017-05-23 23:41:40 +03:00
Thomas Hartmann
7482d8a152 QmlDesigner: Fix resolving of source
Using the QUrl:resolve() does not work with Qt 5.9.
Since the file url is a local file and not directory this was
weird usage of QUrl anyway.

Change-Id: I2d709bc40a404b61ea3c3edbbfd1727a6ee2111c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-05-22 15:22:11 +00:00
Tim Jenssen
0de18abbc2 QmlDesigner: use initializer lists
Change-Id: Ibdc46d30ad3f2b703d4cbdd796a1032030bd17cd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-04-26 14:18:48 +00:00
hjk
bd5e2faa75 ProjectNodes: Handle supported actions one-by-one
Getting the full list for a node can get quite expensive e.g. in
cases of recursive calls of QMakeProjectManager::findPriFile.

However, the FlatModel needs to decide quickly on whether an item
is editable to potentially allow renaming.

So split up QList<Actions> supportedActions() into individual
bool supportsAction(action) calls and make sure Rename is not
on the critical path.

Task-number: QTCREATORBUG-17953
Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-04-05 12:47:03 +00:00
Robert Loehning
00bb2425f5 QmlDesigner: Really prevent possible nullptr access
c163240611 added the check for
!projectNode but then used the pointer anyway

Change-Id: Ied63fd0991b0de1dab3d19cd57c00acd596bf752
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-03-22 13:39:28 +00:00
Tobias Hunger
f9eab73dad qmake: move over from QmakeProjectNodes to QmakeParserNodes
Change-Id: Iab87e0c248b0f651a1774336c3bddf83baa9d057
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-22 16:00:49 +00:00
Tobias Hunger
b697fd0db4 qmake: Use Variable enum consistently
Change-Id: I89588f12600f0698de764c05c1930b13b53a2588
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-02-14 15:40:16 +00:00
Tobias Hunger
c163240611 QmlDesigner: Prevent possible nullptr access
Change-Id: I90f131526f97fa879cf9e6428547e6e8ed9aa936
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-12-05 18:59:15 +00:00
Tobias Hunger
ad003363b7 ProjectExplorer: Rename Node::projectNode to Node::parentProjectNode
Change-Id: I47fa794a0bd8456ae23271934a957d9667d2d7bb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:14 +00:00
Tobias Hunger
67e011ba5f ProjectExplorer: Make naming of methods on Nodes more consistent
Change-Id: I5050a020f0fc0ef4556db1d2020afeadfcd51585
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-10 15:24:02 +00:00
Tobias Hunger
c9ee7ee378 ProjectExplorer: Shorten NodeType enum
Use a class enum with a type quint16 for the NodeType. Frees 2 bytes
per node that can be used for better things now.

Change-Id: Ib84bf8629e9f4a5fb0793355eff0f0d6302167dd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-03 15:55:13 +00:00
Tim Jenssen
183395831a QmlDesigner: cleanup DocumentManager
- move get origin properties out of the static methods
  to reduce the code

hopefully no behavior change

Change-Id: Icf903f5bcaf48ab35a9db1a779c6d9e5abcf0f80
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-20 12:44:57 +00:00
Tim Jenssen
1dccd25794 QmlDesigner: qDeleteAll does the same
Change-Id: I5ccb9279cfcc38455347badf61ab6ddd2ad047ca
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-12 12:26:35 +00:00
Tim Jenssen
50f5b6b5e3 QmlDesigner: no need to copy the list
Change-Id: Ie6d5c1e7a0baaec9f6065854e451bb5d767619e6
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-10-12 12:26:23 +00:00
Tim Jenssen
a29dcac4cf QmlDesigner: modernize code style
- no behavior changes
 - using nullptr
 - renaming data -> d
 - transform single used small slot function to lambdas

Change-Id: Ifae389b8a865b0b6a501b6f3d60597a66d9febe8
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-04-29 08:07:09 +00:00
Tim Jenssen
1553eb04b4 QmlDesigner: use default values at isSubclassOf
Change-Id: Ia31d698635a9b29a023f4d919f3741ac912923b7
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-04-06 10:04:55 +00:00
Friedemann Kleint
ea0c23771c DocumentManager::setCurrentDesignDocument(): Check m_currentDesignDocument.
Fix a crash occurring when dropping a .js file onto the Widget Designer.

Task-number: QTCREATORBUG-15903
Change-Id: I3e952df1483c5683fa7daa3a1f2fb8ebbbc1b491
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-21 12:13:47 +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
5d7f5a2a32 ProjectNode: Rename path() to filePath()
Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-03 11:01:50 +00:00
Alessandro Portale
374f84acc7 Qt Quick Designer: License change to Qt Commercial + GPLv3
Change-Id: I7f7aecd02892b6c616cd148fa5d845e7bc0d3b4f
Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-09-18 12:12:57 +00:00
Thomas Hartmann
366e89e9cf QmlDesigner: Adding helper function for icon browser
Change-Id: I6f333c897802c8bf1d93b168f5d108b77bfa33c2
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2015-09-16 08:55:09 +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
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Marco Bubke
771f47c0da QmlDesigner: Use Core::AsynchronousMessageBox
Warning which needs return value should be asynchronous because the event
loop of the blocking dialog leads to crashes.

Change-Id: Ie49c95d63ec3f2183378013c726c3b99680dc7b0
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2014-11-25 15:24:49 +01:00
Marco Bubke
cd5a6c4bdf QmlDesigner: Use Utils::AsynchronousMessageBox::warning
Warning which needs return value should be asynchronous because the event
loop of the blocking dialog leads to crashes.

Change-Id: I2e348f9351611dfd053cd3fbacfb6696401ee427
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-11-24 14:45:58 +01: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
Thomas Hartmann
0b74df58a5 QmlDesigner.DocumentManager: Fix goIntoComponent for Loader
We have have to check and handle sourceComponent and component (Tab).

Change-Id: I736648fc09fe4ee3333c4524666e3acea500804a
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-08-04 18:48:08 +02:00
Thomas Hartmann
703a3153ed QmlDesigner.TabViewContextMenu: Remove direct dependencies
The code for creating new files and addFileToVersionControl can be moved
to the DocumentManager.

Change-Id: I222a32f245da24d7308289a9bb6d30574da55387
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-06-18 14:17:19 +02:00
Marco Bubke
64f3a4dc3d QmlDesigner: Cleanup openFileComponent
Change-Id: I740bed6dd5b7069c0ebae37a88546bd9d8e94ccc
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-16 19:44:01 +02:00
Marco Bubke
a4a17121fb QmlDesigner: Add Loader source property handling
You can know go into a component.

Change-Id: I5120e70164a112b277981fda7e603c3d327f2561
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-16 19:43:57 +02:00
Marco Bubke
fd7c110c04 QmlDesigner: Refactor component handling
Change-Id: Iba591f255f3d9504b4613e5f712bb94b5ce7c19a
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-06-16 19:43:49 +02:00
Thomas Hartmann
d97ef903a1 QmlDesigner.DocumentManager: Support component property of Tab
Change-Id: Iaf2d1160904023db3c66c6e536c5cf812a71e3fb
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-06-12 18:27:22 +02:00