Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
readability-static-accessed-through-instance fixes the places where
the originally non-static, now static functions were called through
instance.
Change-Id: I8cf16c01f7988a7c9d073b5f8ede6a9706b94fb0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
The intermediate "category" nodes where never filtered out.
CategorySortFilterModel was changed to use filterRegularExpression() and
setFilterFixedString does not set that (it only affects filterRegExp()
which we need to get rid off).
Set a regular expression directly instead of a fixed string.
Amends 47e576528e
Change-Id: I6f844027b83d66ca2d5088d83e6e84b01b9eda45
Reviewed-by: hjk <hjk@qt.io>
Turned out it was easy to overlook and didn't reduce the list of
visible plugins to a degree that makes a difference.
Change-Id: Ib261066b215b66ffb683a87b8592570d895917ac
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Qt 6 API will move away from it.
Use QVector for API and some std container for internal things.
Change-Id: Iff14d48a47d5ac52ade875d9c8c84ad8a4f577d8
Reviewed-by: hjk <hjk@qt.io>
It provides no real additional value and seems to
be more confusing when Qt Creator gets started with
command line options that load disabled or disable
enabled plugins.
Change-Id: I979f9ee95154af11aedd6100717043adc5e1e7a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Plugins can be hidden in the "About Plugins" view by default. Users can
still make them all visible, but the default view can be made less noisy
by hiding plugins that only exist as a base for other plugins.
Plugins that can not run on the current platform are hidden by default
as well.
Change-Id: Iaf2f751c4ea4b3afc605bbbea6611eea042e62c7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This makes the difference between "experimental" and "disabled" visible
in the UI.
Task-number: QTCREATORBUG-17368
Change-Id: I6a74d27dbad9d35f447fe5687fe26c4eee3a3808
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
There is no reason why it should be more than just a list of plugin
specs. Saves a few symbols. Also simplify some related code.
Change-Id: Ibaff64735e78e1454e1aca0b49cadb9e1030ee3c
Reviewed-by: hjk <hjk@qt.io>
It is only used in the pluginview, and "broken" fits in better with
"ok" and "notloaded" for plugin states. Also, we avoid confusion with
the "error" icon in coreicons.h.
Change-Id: I44159a878f60eacf46780b27b4d9c4f31601a9dc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The LeveledTreeModel case is general enough to cover
the UniformTreeModel case, so merge them and rename to
TreeModel. The former TreeModel is now BaseTreeModel.
BaseTreeModels should not be instantiated directly,
a tree model with non-uniform basic items is available
as TreeModel<>.
Done-with: Eike Ziller <eike.ziller@qt.io>
Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These icons are useful in other situations (e.g. QmlDesigner)
Change-Id: I31751b8ca8fea34c532d54d423e5fef07b370a4a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
LeveledTreeView lately names its RootItem type explicitly, the
PluginView model was not adapted, but still compilable (and not
harmed otherwise) as the types of first level were never used.
Change-Id: If64d609581782be86068d64e5a8f14f4418fb95b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
It was possible to disable required plugins by deselecting the whole
category.
Task-number: QTCREATORBUG-16321
Change-Id: I983a3461ac0cf610f9cd5e4ffcec5e176256eb53
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This adds a templated layer on top of TreeModel that can specify
item types for the top three layers in the model, relieving user
code from some of the previously necessary type casting.
Two common setups get an extra layer with convenience functions
on top: TwoLevelTreeModel for two-level model with a first level
of static headers and a uniform second level, and UniformTreeModel
where all non-root nodes are the same.
"Untyped" plain TreeModels are still possible.
The walkTree() feature and untyped iteration in the base
TreeItem and TreeModel is retained for now to ease transition
in downstream modules, but is planned to be removed soon.
Change-Id: I67d75a1a4e18e8f254dbfb458db03510d8990d8b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Use function objects to apply directly during a depth-first
walk of the tree instead of faking a flat container of tree
nodes. Less code, and allows even some non-const operations.
Change-Id: I804ab11df358fe937b40809cbcb772e6f3ff8dc5
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
A drop shadow and the "punching of edges" are now independantly
settable.
Change-Id: I48bf88944d0cfce504aef0a1c04979ab2dc4cb9f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Instead of implicitly disabling plugins if their dependencies are
disabled, implicitly enable plugins if some enabled plugin needs it.
That will avoid issues if people disable plugins (e.g. QmlJSTools et al)
and we later add one of these as a dependency to another plugin (e.g.
make QmakeProjectManager depend on QmlJSTools), which resulted in the
previously enabled plugin being implicitly disabled.
Enabling a plugin in About Plugins now asks for all required
dependencies to be enabled as well.
Disabling a plugin in About Plugins now asks for disabling all plugins
that require it.
Using the -noload command line option now disables all plugins that
require it in addition.
Using the -load command line option now implicitly enables all plugins
that are required.
Multiple -noload and -load options are handled in the order given on the
command line.
Task-number: QTCREATORBUG-9131
Change-Id: I0956106105060a7898a8992e0629009d5ec3ea4d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Prefer enabled state as a property as opposed to disabled state, and
make setter correspond to getter. Also move setters into private.
Change-Id: I5d002a12f4e540d5b38cc5865490d056ec75f296
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Broke after moving to Utils::TreeModel. Use QSortFilterProxyModel on top
of TreeModel (can later be used for filtering as well).
Additionally we need to make sure to report changes only for the changed
column now, because otherwise QSortFilterProxyModel thinks that the
change could make re-sorting necessary, and does that in a non-stable
way.
Change-Id: I9fd12c55a45aba4c05f8e318ae8ea9a4ab9f3310
Task-number: QTCREATORBUG-14107
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: hjk <hjk@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: I919da493d0629b719d328e5e71c96a29d230dfd1
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
Full separation does not seem possible as QTreeView assumes
all items to have equal column count.
Change-Id: Ia260924fe13ea62789923af8484f9838295355b6
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Replace all* remaining deprecated Qt 4 functions with
their Qt 5 counterparts. This means we no longer need to
define the QT_DISABLE_DEPRECATED_BEFORE macro.
This patch is relatively small because most source-compatible
changes of this kind have been done before.
* The one exception is the QmlDesigner, which uses QWeakPointer
in a deprecated way all over the place.
Change-Id: Id4b839c6685f3b5bdf2b89137f95231758ec53c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>