Move ownership of the ProjectImporter to the Project.
Task-number: QTCREATORBUG-16744
Change-Id: I7fc217ce8058287c5435b259bdc5300a926f8098
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
The existing solution with the special-style horizontal
kit selector comes from a time when there was typically
one, at most four targets. Today's setup can easily
reach half a dozen targets with several toolchain versions
each and can't be sensibly handled with the overflowing
horizontal bar.
This here replaces the horizontal kit selector bar as
well as the top level project "tab bar" with a normal
tree view. All targets are visible (but possibly disabled)
at once, and can be enabled/disabled using the context
menu on the tree items.
Change-Id: I1ce7401ca96109bf34bc8c0ae19d265e5845aa88
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Handle buildsystems with imperfect knowledge about what they
build more gracefully.
Leave RunConfigurations around if the build system can not tell
whether or not the relevant target was configured out of the
current build or completely removed from the build system.
This patch should not change the observable behavior of the code.
Change-Id: I0ddb4bd3966d184a4b5c9818e68adb107047ed1f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
When a project is opened, delayParsing() is called several times:
* activeTargetChanged -> buildConfigurationChanged
* environmentChanged
* startupProjectChanged -> ... -> buildDirectoryChanged
delayParsing starts a 1s timer for aggregating all the relevant changes
before starting the actual parse.
This makes sense also when the user makes changes (like switching build
configurations fast, or editing the build directory).
When the project is opened initially, there's no reason to wait before
parsing.
Change-Id: I4eb0c7d3419465bc01e8f9febc9ee808684adb6e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Allow for different extra compilers which may get called to generate
additional code for the code model. The build system is expected to
know what files are generated from which source file and the extra
compilers know how to generate the content of those files, without
touching the build directory. the uic adapter is refactored to be
the first such extra compiler.
The extra compiler is run when an editor for its source document
loses focus, or after a timeout of 1s when the source document has
been changed.
Change-Id: I13c110c61120c812f02639a3684144daf8979b37
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Add setRootProjectNode method and a default implementation of
rootProjectNode to Project. Use that in all derived classes.
Change-Id: Id28cde04457a20a8963d43020785ef9d77fea57c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Implement default projectManager method in Project and use
these two everywhere.
Change-Id: I27e011e6fdc17b36aff1b8b931527307320e347c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Add setDocument method, implement document method, use this in all
projects.
Change-Id: I5018bf7c2739665c13eee340184ce7c41fd319bb
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Fix fallout of this in KitInformation/Kit/KitManager and the wizards.
Change-Id: I5cb88cc381dc04409401909b810940ab6dccf86a
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This is far from perfect but seems to work. Further work could add more
fine grained control over which projects are affected by the automatic
synchronize. Also there might be a few cases where the switching is
over zealous or missing.
Change-Id: I26ad3d59431251564917e4b408c66695dc454823
Task-number: QTCREATORBUG-5823
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Project::fromMap() does not fail anymore, and thus the errorMessage
parameter is unused.
Change-Id: Icc73a4b5725ea37e5ba14263ac3bd30eedf4cf64
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Use-case:
pro.user has 5 targets, while pro.shared has 6.
It is better to have only 5 targets than not opening the project at all.
Change-Id: Ic169a2180aafd0b1ed60a7f6d8903b47e7f1c34e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Instead of just a bool, return a tristate of: Ok, Error and UserAbort.
Also add a out parameter errorMessgge.
Change-Id: Icb076de49998e9372839d0631c2776e905e4a0f6
Task-number: QTCREATORBUG-13223
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Project::generatedUiHeader was still taking QString instead of FileName
Change-Id: I582ddccd679a35fb2533ff1eb3d3010342cd4edd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Provide Project:Name there by default, and make it accessible
from the target.
Change-Id: I2faa52dc8c0703f3245cac2ca15b942e3006993a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
ProjectExplorerPrivate::m_editorConfiguration has the same lifespan
as the Private itself.
Change-Id: I8037528bec44109b9cf076fa5daafcfab280b459
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This fixes some crashes in the TargetSetupPage and other places.
Also remove isValid method again. It was introduced to fix the same
crash that this patch also addresses, but introduces a bit more
complexity than this approach.
Change-Id: Iee80a2baffb2854b6fad8931d23a1da6d218f919
Reviewed-by: hjk <hjk121@nokiamail.com>
Takes a member (function) pointer and a value and returns a functor,
that takes a instance of the mfp's class and returns whether it's equal
to value. Sounds complicated, but is a common pattern that is easy to
understand.
Change-Id: Iaaeb90488d34ddfd6940dadd4c66705381198fee
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Add Utils::transform and anyOf that take a member function pointer.
Remove bestElementOr it's unused.
Use declval<T> in transform's return type, because msvc does evaluate
T() and for types that don't have simple constructor this fails.
Add std::remove_reference since decltype returns a reference for
lvalues.
Change-Id: I22248b226748eeb27af0d300182d574438d7f756
Reviewed-by: Eike Ziller <eike.ziller@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>
This avoids having .user files when pressing cancel on the Project Mode's
TargetSetupPage.
Change-Id: I09fc8e78c929d6f09a50ee57ef4f59555491c649
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Instead of hardcoding Core::ICore::mainWindow()
Change-Id: Iec7747945cbcb335ae552a0277a1527f598f1ff7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The PersistentSettings::writeFile needs it, and SettingsAccessor
should not hardcode it to Core::ICore::mainWindow()
Change-Id: I6ca99e9cd861fd81337028055fe0ed4d158b152f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
So far only instantiates the .user file specific upgraders.
Change-Id: I9a16dfe4c3c61093ea1231413495eec2e8fe648e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Change the preprocessor popup to a dialog.
Save the additional preprocessor directives to the session instead of the
.pro.user file.
Change-Id: I0d08c5684cfb21e822cde0a965c9cf14e5d6d47d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
Introducing a Widget with a SnippetEditor and a C++ Highlighter which
should provide additional information to the C++ preprocessor for a
specific file.
Change-Id: I27f9498c7e52d1493d6ea92a02a2c6d26130fe07
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>