The special ctor wasn't used anywhere, the default ctor can be replaced
by inline initialization, maybeAddPath is only meaningful in the model
manager and the language compatibility check should definitely not
pretend to be a general rule either.
Change-Id: I11cf25fe1c696550d33b56ce57316100321d564b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The Environment class is supposed to support values with references to
other variables, but we failed to actually expand them in most places.
Fixes: QTCREATORBUG-22687
Change-Id: I108cb59d3b4571471423455240f6f4f1cf64bf05
Reviewed-by: hjk <hjk@qt.io>
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.
Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The name "KitInformation" does not properly convey the fact that it
represents a certain *aspect* of a kit. The same goes for
"KitConfigWidget", which in addition was inconsistent with
"KitInformation".
We now use "KitAspect" and "KitAspectWidget".
Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97
Reviewed-by: hjk <hjk@qt.io>
QT_INSTALL_IMPORTS and the used ProjectInfo.qtImportsPath variable
were only used for QtQuick1.
Change-Id: I34da0cfc77effa84f3a7578e7f91fed0768a9bf4
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Pimpl, remove use of global object pool, cosmetics, ...
Change-Id: I9e1415b07d7ff8e95db0998c87ce7d75ca638a8e
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
... by additionally keeping local (currently non-owning) pools per
"interesting" type.
Current situation:
- The global object pool does not scale well for looking up
objects, as iteration plus qobject_cast typically iterates
over all pooled objects.
- User code that can use typed results from the object
pool need to have access to the full type definition anyway,
i.e. depend on the plugin of the target class anyway.
The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.
This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.
Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".
Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make Project::files take a standard function to match files with instead
of an enum (and a std::function).
Change-Id: I6a24e40dba0e972ff96c0a57e775d2377e2545e0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We check that qmake property in many different places.
Change-Id: Ifd5efe4ad2831385493bd3afe8538929578e8fb4
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Add a setter/getter for listInProject to Node and make the project
list all nodes with this property set in Project::files.
Task-number: QTCREATORBUG-18132
Change-Id: I334e627856d1bc0d033e13c5d629f6657d8d7fee
Reviewed-by: hjk <hjk@qt.io>
This speeds up processing of a cmake project without any QML files by a
factor of 16 on my machine.
Task-number: QTCREATORBUG-17884
Change-Id: I823d4a051451adbca10a8b73c17d288e03387378
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra
all over the place.
Change-Id: I4bfef62e73275a991455141671d6071162788e9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We don't need two IDs for C++ and the QmlJS ID should look the same as
as the others.
Change-Id: Ib9747f6b36a90bb652951d85eec69666615670c4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Pass the complete kit to QmlDumpTool::pathAndEnvironment instead
of just the Qt Version. That removes the need to guess at the toolchain
used and makes sure we have a better environment set up.
This also removes the need for BaseQtVersion::qmlToolsEnvironment() which
played the toolchain guessing game.
Change-Id: I4f4b9bb14b3ceb3892652901b459b53fcc4cb1ac
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This improves performance of MIME type resolving on project loading.
When the MIME type cannot be resolved uniquely by extension to >50 weight,
the file preamble is read in order to match against magic values in the
MIME database.
In 3953e2b447862576902abef11ffb4efc56d7a625 the weight of the standard
file extensions was increased to 70, to at least avoid expensive matching
when the answer is obvious.
Qml types only have glob patterns anyway, so this shouldn't break
anything.
Change-Id: If3add50809a4361f877ea261fba6d6f333b2b740
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This patch removes infrastructure and ui for DebuggingHelpers
and specifically qmldumptool.
The qmldumptool was the last relevant DebuggingHelper and is only required
for Qt < 4.8.
Change-Id: I3767be0858e5eba16a33a3ab8436e95fc06a9e99
Reviewed-by: hjk <hjk@theqtcompany.com>
We want to distinguish between source files and generated files. So
let's call them by their names.
Change-Id: I324c4b82ca7fb7d8d0e175ea6c4f14f1306ec929
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
The problem is that, if you check e.g. a .pro file against all C/C++ mime
types, and these define magic matchers, it would find that .pro doesn't
match C/C++ mime types by extension, so it would open the file to find a
magic match. Even though the extension .pro would identify it already as
a qmake .pro file when checking for the mime type globally.
Change-Id: I3341187e88e2263bf38169c3c99e5d2161e2a9ee
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.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: I492792bb9e5655c55795e938031efc557c9a462f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
ProjectTree::currentProject is not the right project to track.
Change-Id: Ia9da32a24e73565c4b9a3739c4000c13b803375f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@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>
updateProjectInfo did reset the ProjectInfo to the default one.
As now currentProjectChanged calls it at a different time, it did
give several issues.
Change-Id: Ia1eabc0ea83e89038a8f7d10cc6cda0544abfaea
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
First step of some more 'Base' removal in TextEditor.
s/Core::TextDocument/Core::BaseTextDocument/
s/TextEditor::BaseTextDocument/TextEditor::TextDocument/
Change-Id: I71ba325a2f0ad72ec9dae0d96846cbae72d326f7
Reviewed-by: hjk <hjk121@nokiamail.com>
Replace the CppModelManagerInterface/derived CppModelManager
combo by a more common CppModelManager/CppModelManagerPrivate
pimpl pattern.
Change-Id: Ia4582845ed94d5ef60b8571bab9b2260c6290287
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>