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>
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>
No need for the third construction way if that's not
really used by the factories anyway.
Change-Id: Id3b34da5b0320babae9bef96a79bbaa52e0db06d
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Remove usage of the Q_EXPORT_PLUGIN macros, which do not exist in Qt 5.
Change-Id: I678c3cf10b9c5d5c1b9f252b0ecd1c97dc810a47
Reviewed-by: hjk <hjk121@nokiamail.com>
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>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Start at splitting up the wizard functionality a bit. Currently
it is a factory but also contains a lot of logic that is invoked by
the real wizard dialogs.
This change renames/moves a couple of things only.
Change-Id: I1fa114ee3ee262f7c0690841f361bbf09e674725
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
The action handler implicitly passed ownership to ICore, which is non-
to the action handler. We now consistently create the action handler in
the editor factory, give ownership to the editor factory, and don't hold
a reference to it.
Change-Id: I4372f8de966e3ceff87c06c5528c6b54522c1d57
Reviewed-by: David Schulz <david.schulz@digia.com>
The action handler already knows which editors to handle through the
context. It only needs to receive signals for updating the actions from
the current editor. So there is no need to tell the action handler about
every individual editor. This also removes some noise from the text
editor implementations.
Change-Id: I76dc5b1559cc8cf54ff313e6cdba4e789a3108aa
Reviewed-by: David Schulz <david.schulz@digia.com>
In the majority of cases we were doing that anyways, having two
ways is just needlessly confusing.
Change-Id: Ied362a702c23beee528368d74df1f2aabe5807f8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
All Qt Creator's main highlighters are used in the first place,
for other mimetypes generic highlighter is used as a fallback.
Task-number: QTCREATORBUG-9580
Change-Id: I863b9085520e5bdda142ce88f2074afeacee0531
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Make methods static and add a instance() method for Signals/Slots.
Remove ProjectExplorerPlugin::taskHub() method and use the new
ones instead.
Change-Id: Ifae24ff19579fc524cbd61bddc826095c443adfa
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This reduces uneeded dependencies for modules that need the types
like the qbs module.
Change-Id: I59a6067a4c24a6d0401bf57fdfa8f5dc1f03595c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Have two file wizards, one "QML File (Qt Quick 1)", and one
"QML File (Qt Quick 2)".
Task-number: QTCREATORBUG-8236
Change-Id: Ibcbf7e6a13b47b1971afdde460a62bed52537f72
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* TaskHub does not pop up itself because it is not a widget.
* popup(true) is never used and may lead to bad user experience.
* use boolean flag goes agains Qt API design guidelines.
Change-Id: Idf28a8d4af66022961d94f1d1cdeeaf155b67c52
Reviewed-by: Daniel Teske <daniel.teske@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>