In this way we minimize the chance of
generating non-unique id.
Change-Id: Idd177c5a4b44b17a58c2a944ec77b9517e91964e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.
Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Diagnostics are now moved to the clang backend process. Fixits are
supported too.
Change-Id: I20faacf466bbf78dec479220c3d7b336a47bc453
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Splitting the editor would add the warning again. Since the warning is a
document property, handle it in the document instead of the widgets.
Change-Id: Ie20377b05dee14983f7ff46ba04ed2af2b737c96
Task-number: QTCREATORBUG-14923
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
.. of builtIn qml and cpp code over "Inspect API For Element Under
Cursor" action.
Change-Id: I70d5bec2933b682295c5242248a2b0f95dba4e76
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
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: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
... to the editor factories and pass it to the document, not the widget.
Saves some code, puts fewer objects into the object pool.
Change-Id: Iaaf250af74dc4e0c62700873accbb40ba88b7d9e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
The editor factories are already a central place to associate
hover handlers with editors, no need to retrieve them later from
the object pool again. This also allows for easy handling of
more than one active handler per editor.
Change-Id: Ie716b96f5ce6b526ee897468635e03e909d81538
Reviewed-by: David Schulz <david.schulz@digia.com>
... and some of the related implementation details
Change-Id: I1f03aa5acf2d3fb2cfc2a6a7845f3d3578b0408d
Reviewed-by: David Schulz <david.schulz@digia.com>
QmlJSEditor does not depend on QmlDesigner.
There is no reason that the settings for the Qt Quick ToolBar
are stored in the group of QmlDesigner.
This patch removes all includes of qmldesignerconstants.h in QmlJSEditor.
Change-Id: Ie692d9179e0239c3307420001547ba658911d39b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Simplifies the code base by removing one level of unused
and unneeded abstraction.
- Merge {I,Default}AssistInterface to AssistInterface
- Merge {IAssist,Basic}ProposalItem to AssistProposalItem
- Merge {IGenericProposal,BasicProposalItemList}Model to GenericProposalModel
Change-Id: I54ee7b095427383d67a00fc1d87c3808c21d812d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This was already done in all major editors and should not harm
all others.
Change-Id: I7e19d285c4b85419a9a1f9afa961addecf682eaf
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
opt-out now, for all editors created by BaseTextEditorFactories.
Change-Id: I01d0a9ff26320fcd0b84ff90ff22c747cf84b84c
Reviewed-by: hjk <hjk121@nokiamail.com>
It's taken care of by the normal factory based setup now.
Change-Id: Ia53551740cf5ef2998765ea1003ba8e7f9c30e46
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Only used there, and avoids back-links to editors.
Change-Id: I81206057ce89d42aef7febb840cf9e44b869df0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This reduces the use of the 'editor()' "back link" which we'd like
to phase out (and also actually simplifies the user code).
Change-Id: I8aa13e88459d4e9cf44de683e8efd189238cc684
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This removes the ones that were not to be used anymore.
The fallback in the base class is left in for now.
Change-Id: I5e7ab16497a83eff9b11deb9e1feb390757eac0e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Merge editor files, sort #includes, namespaces.
This does not yet use the new editor construction scheme.
Change-Id: Idb1171389858c4470d7a4ec9441fb25e6d157400
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
All editors did that manually, with varying approaches. Connect once
when the document is made known to the EditorWidget instead.
Change-Id: Ib0828b08158539859f6f89c8080435a027aa06ed
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
In most cases, the *Editor constructor does not need to
access the *EditorWidget.
Change-Id: I1f5c076a0f723d5d82b398e8c250c7bd1d47eb17
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
There was document(), textDocument() and baseTextDocument().
Two should be enough...
Change-Id: Id9e41c8d857c5cb3269a9fce5ab594d34448c982
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Lifetime is coupled to the widgets, not the editor.
Change-Id: I01560bbdd6c399376d3a4184f0eb83e4153f830e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Goal is to consolidate "controller" related data in the *Editor hierarchy.
This patch introduces temporary "cross-Private" accessors dd() to
keep the patches small.
First item moved is the AutoCompleter, a glimps at long term benefits
is the simplification in the JavaEditorWidget which is now essentially
a BaseTextEditorWidget, only containing the still-wrong createEditor().
But that can only be move if the *Editors are self-contained, i.e.
keep data themselves, not indirectly through the *EditorWidgets.
Change-Id: Ia0ab90f0322bb17ac20458e6581069eed30acbaf
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
No need for most of the machinery.
Change-Id: I9078174582d83da94c6c7f20282fd3a5f1742911
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
Language::Enum -> QmlDialect
* class instead of enum
* moved Language specific operations to it (from Document)
* nicer handling
QStringList -> PathsAndLanguages
* store language along with path, to perform a correct scan and improve
path handling
Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>