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>
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>
Centralize the handling inside a new class ProjectTree.
React to moving focus and remove most special handling.
This properly fixes the linked task.
Task-number: QTCREATORBUG-13357
Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
We compared the display name to the unique product name to look up
the product to build, but these two are typically not the same.
Change-Id: I82d1433c5c830a38c55f6b8827a5137ff31fd859
Task-number: QBS-705
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Creator derives its qbs profiles from the kits and overwrites
them as it sees fit, which means users cannot set custom properties
by editing the respective settings files or using the normal
qbs command-line tools. Therefore, we need to provide them with
a way to do this from Creator itself. For this purpose, we
introduce a settings page where a user can add or override
qbs properties per kit. The resulting "diff" is then applied
whenever the profiles are written, so qbs will take the
custom properties into account.
Change-Id: I909f5243c65647f62c91a2afa242fd531ddaf915
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
- Identify products by the name/profile tuple instead of just the name.
- If the product's profile differs from that of the overall
project, add it to the visual representation.
Change-Id: I4a89db60911277977458370157e435472bbe428f
Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
Get rid of IFeatureProviders that are only telling the wizard factory
that a plugin was loaded.
Change-Id: Id12c669974a6ab98036f070e1adcae35b34ca376
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This differentiation complicates the code and duplicates checks
already done in qbs.
Just let the library reparse the project; if it turns out that nothing
has to be done, then the operation will be fast.
Change-Id: Ib6406f254e51541c69c948f275fff7877b65b4bd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
While it is true that additional information about target
artifacts can appear during a build, this data is already
present in the qbs::Project object and can simply be retrieved.
No reparsing is necessary.
The exception is when reparsing was requested while the build
was going on. In that case, we really need to do it after
the build has finished.
Change-Id: Ief3797782ad0ca5651974d4b5d3d64e1199ca9a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
After doing this once, the active file tags were not reset, so
building everything was no longer possible.
Change-Id: I98df5f55e129cc4a72921aff51201e1860ba939a
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Use m_editorProject and m_editorNode where possible instead of going through
the current editor, its document and the nodes.
Change-Id: I252cedccf71a3c9884d0202aae394c42a5e96014
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
... into a part that sets the internal state and one that updates the
actions.
Change-Id: I78b6b948d2a15aecaeba078d8770a0c52e8ef40d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
... into a part that actually updates the context actions and a part
that does the setup of the internal state.
Change-Id: If6b90df98d56b1546e3d0211998d027db27fdf1d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This was just plain wrong before...
Add m_currentProject, keep it up-to-date and use it for the reparse Qbs
action. Trigger update on the action when appropriate.
Change-Id: I6d9d82d5c5fbdfbd5d28690e16587c66e5c13d06
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Changing the build configuration triggers a reparsing of Qbs nowadays,
so that is update is already covered.
Change-Id: I8415fe8e1da71e2c7b044cbf7623362b6cdf4ed3
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
These are the nodes selected in the project tree, not the current/startup
project or things related to that.
Change-Id: I5860ccf9cc3a088a1bc047f4a2b6a909c72d4eca
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
... even if Qt Creator thinks all is well.
Change-Id: I40fa61d51c8e18a389bedf7d8afb927bbb88acd5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
For example, C++ source files will be compiled but the build
stops before linking.
Task-number: QBS-283
Change-Id: If0573ea58b9a047980aab0fd8e4828f3d0c315b8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>