It was never called with a sensible value anyhow, and only complicates things.
Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Doesn't really make sense to have the additional IDocument *editorDocument()
method.
Change-Id: I0a7420eb1afaa76f63c3f7e9c4b373acf624ffb9
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Moved Document::Language, Import::Type and StaticAnalysis::Severity
enums to qmljsconstants.h and renamed values removing the redundant
part.
Thus the effective length changed little or improved
(Document::QmlLanguage => Language::Qml).
The separate file allows better reuse of enum values without introducing
circular dependencies.
Change-Id: I5186d7c04f5d3f6c289068b919be5ff1ff118326
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
F2 on a virtual function call presents a list of overrides in derived
classes. The function declaration of the static type is shown
immediately at the top.
Task-number: QTCREATORBUG-9611
Change-Id: I80ce906fa06272dc9fbd1662cd17500b8c77067f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Also adjust and streamline using and surrounding code.
Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Introduces ITextEditorDocument. This is part of a more general "use
documents instead of editors whereever possible". It will allow to move
to e.g. ITextEditor::openedTextDocumentContents() instead of
ITextEditor::openedTextEditorsContents().
Change-Id: I5ebceaa257a0d2c3e8ac4ac51b9b08b6faa42487
Reviewed-by: David Schulz <david.schulz@digia.com>
Steps to reproduce the crash:
1. Open some long file, e.g. botan.cpp
2. Trigger completion and close editor immediately
The IDocument pointer was only used to reference the file name. Instead
of passing an IDocument* to the IAssistInterface, pass the file name.
Change-Id: Iafce9b818806a77968a10541114bc9b7c8665f11
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
solve problems depending on the destructor sequence:
- avoid setting code style to a destroyed code style
- avoid hiding a potentially destroyed pane
(which will be cleared in any case)
Task-number: QTCREATORBUG-8818
Change-Id: Idd7817d99bf4ff04c5e152b00857f6e35825fd37
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
...in CppEditor, QmlJSEditor and BinEditor.
Addresses second crash reported at QTCREATORBUG-8775. The first one is
already fixed.
Task-number: QTCREATORBUG-8775
Change-Id: I11c1f030ebeb2b2cbec02503e8e225fc5600a101
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
avoid using extra selections for warnings folding them into the
normal semantic update.
Extra selections impose a relatively large overhead (and need expensive
text cursor operations).
Unlike C++ Qml warnings are continuosly recomputed in the current file
of the editor, but not listed in the issue panel, unless one
explicitly triggers the qml checks.
Using the normal sematic update for warnings avoids QTextCursor
operations, and uses batched applies.
Unfortunately getting the tooltips from the additional formats instead
of using the extra selections requires private API, so Ranges are also
stored separately.
Change-log: [Qml/JS Support] Improved speed of QML/JS Editor for large files with lots of warnings.
Change-Id: I1f996231ef35d7cd77a79af58dbae2098fbbc83e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
Distinguish from const char * one.
QString ctor is yet to be removed
Change-Id: I2da231036c6417353b0566d39666d918ad141c6d
Reviewed-by: hjk <qthjk@ovi.com>
Also removed all <QMainWindow> includes which are not needed
anymore.
Change-Id: I393c9a62a5c6df95d9f35d872e1473a4f13bcdc4
Reviewed-by: hjk <qthjk@ovi.com>
The file structure outline now displays the id and the property
values.
Task-number: QTCREATORBUG-6209
Change-Id: I33efe20aab71647bc863cff5b5434c47e8d452a4
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
Since the object tree is fetched lazily, we might have
objects whose debugIds are not known. In such cases,
objects can be fetched by passing the location info.
Change-Id: I2001460cc14401e011efef9be9194c9f7868d617
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This will allow us to remove the qmljsinspector->qmljseditor
dependency.
Change-Id: I234cf8645edb614e8b1f559a0f9bb6d43e2254c3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Most of editors have "jump to file" or "follow symbol" actions. This
patch reduces amount of related boilerplate code.
New actions are made optional to prevent shortcut clash (both use F2).
Change-Id: I2af580ed9d6789df25f4487ba001f3b83887c504
Reviewed-by: hjk <qthjk@ovi.com>
And adapt the other API respectively.
Change-Id: I1e04e555409be09242db6890f9e013396f83aeed
Reviewed-by: Bill King <bill.king@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Getting the #include directives ready for Qt5. This includes the
new-project wizards.
Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
When a part of the semantic info update (such as a Link) triggers
QmlTextEditorWidget::updateSemanticInfo (for instance by requesting
QML plugin dumps) that update request was ignored because the *old*
semanticInfo revision was compared to the editor revision.
Instead, compare the *future* semantic info revision to check whether
an update would be accepted.
Also, instead of using the same snapshot, get a new one from the model
manager. Otherwise updates to libraryInfos won't be considered.
Change-Id: I0df6197bebce580129292aab5ca8cf24512a0fe7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
* Instead of having SemanticInfoUpdater reparse documents itself, it now
relies on the ModelManager doing that.
* SemanticInfoUpdater now takes a doc and snapshot to generate the
convenience Context / ScopeChain. Could be converted into a future
to avoid having a (99% idle) thread per editor.
* Renamed several functions in QmlJSTextEditorWidget to better indicate
their behavior.
Change-Id: I8af6ccab099130fa7fa227e44864561ca2c3f9e0
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>