It appears to take 7% of project loading...
Change-Id: I2d20d919cc861a6ee95af359a584fb27a915cf80
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
The OS X linker makes using dynamic_casts across shared object
boundaries fail, so do all casting in the projectexplorer library
and provide functions to do it.
Task-number: QTCREATORBUG-13864
Change-Id: I0e13c0986f8342d83c3b838ffdd2dd7b8312b13c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
The only two cases where it is used, the type can easily be passed to
the constructor. So do that.
Change-Id: I1658a377aac56b5332992c445fba39b00620a74b
Reviewed-by: Tobias Hunger <tobias.hunger@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: I1d05d48b23f44e3d589cc2a790803714786b57d2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
The code that invalidates m_currentNode folder nodes on removing wasn't
run due to a typo.
Change-Id: Ib7d545da4078275b2875c9a4c6246909234c8073
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
The Generic Project Manager builds the tree from the bottom to the
top. Previously no signals were emitted while doing that since
the watchers were added on adding the top level node at the end.
With the new ProjectTree that leads to lots of signals, and leaves
the FlatModel confussed, as that expects the nodes to be already
in the hierarchy and crashes otherwise.
Restore this behavior by checking if the affected nodes are in
the hierarchy.
Change-Id: I832b348867a8abad2afef11297b44f058592cb1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
The idea behind NodesWatcher was that it was the central place
to catch node related signals, so that users didn't need to
connect to each individual node and the nodes didn't need to
be QObjects. Somehow Nodes ended up being QObjects anyway.
Both the recently added ProjectTree and the FlatModels consume
the signals the NodesWatcher sends. Unfortunately there's a
ordering dependency between the ProjectTree and the FlatModels.
This patch removes all NodesWatcher and instead makes the
ProjectTree singleton the emitter of various project tree
related signals. The ProjectTree also ensures that the ordering
between the FlatModel and itself is taken into account.
And it makes Node not derive from QObject, saving some memory
in that process.
Task-number: QTCREATORBUG-13756
Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Root cause is trying to set the display name on a FolderNode that
is not in the tree yet.
Allow setting the displayname in the constructor and use that new
constructor where it makes sense.
Task-number: QTCREATORBUG-12897
Change-Id: I907e48cac837966e38524bfe88a87ef17d93f0b2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The only project manager that actually sometimes changes the displayname
is the cmake project manager. And that one failed to emit the right
signal. And since the signal was never emitted a few places handled the
signal wrongly.
Change-Id: I4aa75dc3032efe49263143dbadb7585a378b9be9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Actually return the value of the m_line member varibale instead of -1.
Change-Id: I23ee47638e9b35cafcedca827790b4c2e0a02462
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Rename to runConfigurations() and remove the node argument which is
available as 'this'. Adjust const-ness of node argument in
RunConfigurationFactory::runConfigurationsForNode
Change-Id: Icb63e96a305152f90135a2656536de2581faafaf
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
So that the resource node can override it.
Task-number: QTCREATORBUG-11678
Change-Id: Id30d1b99ee23cc18fc29fc99cf0ad7ca919ed527
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
So that the resourcenode can steal from it's parent
Change-Id: I97a21d94c0ddb0d217c48fd69dc808446763837b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
There may be more than one matching node, so these methods provided
a false sense of reliability.
Change-Id: I6471b74a1d2dd4e8afc7e836fec45355696a0741
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The ResoureceNode will be a folder node, this enables that to work for
add new file.
Change-Id: Ifb4827d0900ce550be164c44979c5b72ab947c42
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The reason they were on ProjectNode is that the signals are emitted
on the projectnode, but since I moved addFiles and others to FolderNode,
this makes more sense.
Change-Id: I918ca4d93dab78c8bb93dff03f53d1a6fbe21340
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
By default this simply calls the parent's supportedActions.
Most changes are due to the enum moving.
Change-Id: I25bf21b712cca48450014dbb0f748ac0c461e029
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Changing it must emit the same signals as does setting path, since the
sorting might change.
Change-Id: Iaf29c0775387d623d2e611e202b63ab52e812140
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
Fix grammar, punctuation, and style issues. Use standard wording for
QDoc commands. Remove \brief commands from function descriptions.
Move some function descriptions directly above the functions, so
that the \fn command can be removed.
Change-Id: Iedf4f0041af24541a982241f99bd4906e86af916
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The filetype is only relevant for Qt4 projects. But even for Qt4 projects
the file type is insufficient to decide where the file should be added.
So remove the file type from the interface and let the projectmanagers
themselves figure out what they want to do.
Also fix
Task-number: QTCREATORBUG-9688
Change-Id: I02f7b1cd2e05efaf76e36fb9af34b109d4482f88
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Both can lead to a change in ordering. This adds the necessary
QAbstractItemModel signals that need to be emitted and the necessary
updates to the internal data structures.
Change-Id: I23824d839ddd4a615eb5bc3bdfe68ab42ed89a9e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Also allow for the path to be set. Qbs can move products from one
file to the next, so that is needed there.
Change-Id: Iebaf3be40fdb0e5e462d45b00cf46d58f985a163
Reviewed-by: hjk <hjk121@nokiamail.com>
Previously virtual folders, that is the "Sources", "Headers" folders used a
hack. This patch removes that hack, by introducing the following changes
- The FlatModel and the ProjectExplorer::Nodes now don't require path() to
be unique. Thus allowing the virtual folders to all return the same for
path(). [1]
- Introducing a new node type "VirtualFolder" which is sorted according to
a priority.
- Introducing a few new virtuals for displayName and toolip(), which can
be overriden.
[1] Note that all the project managers do require path() to be unique for
some types of nodes.
That also fixes:
Task-number: QTCREATORBUG-7100
Change-Id: I76b730f4c4254e2894467603bbe9a30e356a0bcc
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>