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>
If the id of an element exists, it will be displayed instead of the normal "..."
Change-Id: I4e6633743b0e2ae014b7fbad3c752ef318c73659
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
They need not to be identical. Additionally:
* Rename ImportInfo::name to path, because that's what it does.
* Add ImportInfo::name, for getting the uri with the names
separated by dots.
* Allow for exportMetaObjectRevisions in qmltypes files.
* Allow for exports with an empty type name, as generated by
qmlRegisterRevision. They are used for associating meta object
revisions with non-exported types.
* Rewrite the Qt 4.7 import to QtQuick 1.0 at an early stage. In
preparation for the Qt 5 type information update, where Qt 4.7
is gone.
Change-Id: Ia287193623d9530a56b9eb8d2481d50aabd94c3e
Reviewed-on: http://codereview.qt-project.org/5309
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Fixes the warning in incrementalApplyExtraAdditionalFormats being
triggered when the document is reduced in size while a highlight is
running.
Change-Id: I60e0c8772d511f52ee433d27cc77ba726030b354
Reviewed-on: http://codereview.qt-project.org/4661
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>