summaryrefslogtreecommitdiff
path: root/src/plugins/autotoolsprojectmanager
Commit message (Collapse)AuthorAgeFilesLines
* CppTools: set default -std=c++11 for Qt4Ivan Donchevskii2017-09-051-2/+4
| | | | | | | | | | | | qmake from Qt4 does not provide C++ standard and clang can't properly compile Qt4.8.6 and earlier with c++1z. Behavior in this commit mimics qmake from Qt5 which also provides c++11 as a default standard. Task-number: QTCREATORBUG-16441 Change-Id: I3d29891d6e47f2367f2b3b2bf4be4d86661924e9 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Fix more copyright years in pluginsEike Ziller2017-08-291-1/+1
| | | | | | Change-Id: I44845b3cc6f393e76a2f3ff5f166c6170c4eff56 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Autotools: Fix autotools project treeTobias Hunger2017-06-151-16/+17
| | | | | | | | | | All nodes in the autotools project tree were of type Resource, which resulted in strange behavior:-) Get the proper type instead. Apply some no-risk cleanups while visiting the code. Task-number: QTCREATORBUG-18371 Change-Id: I370846100239cca91683dd184a1e5a56d3543732 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Project: Unify handling of displayNameTobias Hunger2017-04-072-6/+1
| | | | | | | | Unify the handling of displayName with a proper changed signal across all projects. Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectNodes: Handle supported actions one-by-onehjk2017-04-052-7/+0
| | | | | | | | | | | | | | | | Getting the full list for a node can get quite expensive e.g. in cases of recursive calls of QMakeProjectManager::findPriFile. However, the FlatModel needs to decide quickly on whether an item is editable to potentially allow renaming. So split up QList<Actions> supportedActions() into individual bool supportsAction(action) calls and make sure Rename is not on the critical path. Task-number: QTCREATORBUG-17953 Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Project: Move ProjectDocument setup into Project classTobias Hunger2017-03-291-1/+1
| | | | | Change-Id: I5c0ec79ddf066e37660fb9a6b24f9d882355d511 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Provide ProjectDocument and use it in all projectsTobias Hunger2017-03-295-101/+1
| | | | | Change-Id: I6e054ebf1043bd1f6748f1567f35c68394bd6528 Reviewed-by: hjk <hjk@qt.io>
* Qmake: Add variable choosers where variables are parsedOrgad Shaneh2017-03-291-1/+1
| | | | | Change-Id: I6203ebadbc934a7ae80ae1c5ca3cfad2471b787e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Handle project file list globallyTobias Hunger2017-03-272-7/+0
| | | | | | | | | | | | | | | Handle the generation of the list of files in a project globally, based on the project tree. Creator now has the concept of TreeManagers which can enrich the project tree with additional data (e.g. the files found in a resource file), which the project does not necessarily know about. So use that tree to find the files that belong to a project instead of implementing similar features in each project. Change-Id: Ia375a914a1f2c0adaa427f9eda834eec2db07f68 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* ProjectExplorer: Add a FolderNode::addNestedNode() functionhjk2017-03-141-9/+5
| | | | | | | | | | | Also, rename buildTree() to addNestedNodes(), it's really adding things, not recompletely (re-)building the subtree. Use it whenever possible to avoid intermediate lists of items to insert. Change-Id: I5fde41e5b164a8a292410bd381a85f5efadf3471 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Create initial project treeTobias Hunger2017-03-102-11/+4
| | | | | | | | | | | Create an initial project tree with a ProjectNode and a FileNode for the project file itself. Fix the Projects to not implement their own tree before they have better data. Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c Reviewed-by: hjk <hjk@qt.io>
* Make all projects generate a fresh project treeTobias Hunger2017-03-101-2/+4
| | | | | | | | Do not update the existing project tree anymore: Start a fresh one and throw the old one away. Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5 Reviewed-by: hjk <hjk@qt.io>
* CppTools: De-duplicate and rename function in ProjectPartNikolai Kosjar2017-03-091-1/+1
| | | | | Change-Id: I675ce4c9059d8ae4046f6a13aa7c04b88141d443 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Follow up on too-much-magic in IProjectManagerhjk2017-03-099-113/+11
| | | | | | | | Use a ProjectManager::registerProjectType<Project>(MimeType) function, removing cryptic IProjectManager object ownership. Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Utils: Wrap MimeDatabase into static functionshjk2017-03-031-2/+1
| | | | | | | | To avoid repeating the 'MimeDatabase mdb; mdb.something(); ' mantra all over the place. Change-Id: I4bfef62e73275a991455141671d6071162788e9d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectManagers: Cleanuphjk2017-02-283-27/+3
| | | | | | | | Remove unused class members, declarations, includes, unneeded ::projectManager overloads etc. Change-Id: I0f4ae87414faca226554722e2a9147cb5512495d Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectManager: Centralize "File not found handling"hjk2017-02-282-16/+2
| | | | | | | | | | | That's the only error that was ever checked for, in all nine project manager. In the hypothetical case that we'll need something else than the name of a file to identify a "project file", we'd probably need to touch the signature anyway. Until then, remove the duplication. Change-Id: Iba00b8f71309a908e2d29c0a58c50b685eca0cae Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Remove Project manager parameter from some constructorshjk2017-02-283-4/+3
| | | | | | | | Can be done generically when creating projects. The only wart is the use from BaseQmakeProjectWizardDialog::writeUserFile. Change-Id: Ie98c9f88ec142e82443e204a0075e3ae9e163752 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Nodes: Do not makeEmpty() as part of buildTree()Tobias Hunger2017-02-241-0/+1
| | | | | | | | Do not call makeEmpty() as part of buildTree(). That makes it impossible to combine buildTree with manual tree setup. Change-Id: If0a0d9432fe39870917a6ba31594e8dcd6d31868 Reviewed-by: hjk <hjk@qt.io>
* Remove spaces in initializer listsTim Jenssen2017-02-225-5/+5
| | | | | | | Format initializer lists code style like. Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013 Reviewed-by: hjk <hjk@qt.io>
* {Auto,Generic}Project: Fix setting ProjectPart::displayNameNikolai Kosjar2017-02-211-0/+1
| | | | | | | | | | | | | Before commit 8c90998fff6ec3cf85ad87b56175e86b6f0a93d0 CppTools/ProjectManagers: Reduce ui blocking when loading projects the displayName was set in the ProjectPartBuilder constructor. Now this needs to be done explicitly. Change-Id: I67655a3a5b8052344084e467bb08efd07ab86ab4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* CppTools/ProjectManagers: Reduce ui blocking when loading projectsNikolai Kosjar2017-02-202-20/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ${AnyProject}::updateCppCodeModel() did two potentially not that cheap operations in the ui thread: (1) Querying the MimeDatabase for the mime type for the source files of the project. In 99.9% of the cases no files need to be read for this as the file extension will resolve the type. The expensiveness comes from the sheer number of files that can occur. (2) Calling compilers with the "(sub)project's compiler command line" to determine the macros. While the caches avoid redundant calls, the number of the unique compiler calls makes this still a ui-freezing experience. These two operations are moved into a worker thread. For this, the expensive compiler calls are encapsulated in thread safe lambdas ("runners") in order to keep the "mutexed" data minimal. The original API calls of the toolchains are implemented in terms of the runners. While adapting the project managers, remove also the calls to setProjectLanguage(). These are redundant because all of the project managers already set a proper value in the constructor. Also, currently there is no need (client) to report back detection of C sources in project parts. This also keeps CppProjectUpdater simple. There is still room for improvement: * Run the compiler calls in parallel instead of sequence. * Ensure that the mime type for a file is determined exactly once. Change-Id: I2efc4e132ee88e3c8f264012ec8fafe3d86c404f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Unify projectexplorer language IDsUlf Hermann2017-01-301-1/+1
| | | | | | | | 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>
* Report better projectFileName to ProjectPartTobias Hunger2017-01-271-0/+2
| | | | | Change-Id: I6ebf030869db7b6ce66eecce313524d8c56df259 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ProjectExplorer: Added support for registering custom languagesFilippo Cucchetto2017-01-231-1/+1
| | | | | Change-Id: I728a2ed1ef7d9f44d7c2b59d27d6e23444cd3bb5 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Give the values of BuildStep::OutputFormat better namesChristian Kandeler2017-01-193-3/+3
| | | | | | | | The old ones did not convey their meaning very well. In particular, NormalOutput and MessageOutput were easily confused. Change-Id: Ia0a8c1b1c366ab3f5c59f751b37b8b1f68f6831d Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* CppTools: Call ProjectInfo::finish when we get itNikolai Kosjar2016-12-061-1/+0
| | | | | | | | No need to require the project managers to do this. Also, it is easy to forget. Change-Id: I96f7a5e5547418678af9653e5753c372f0880e5a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.2'Eike Ziller2016-12-052-18/+8
|\ | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/shared/qbs Change-Id: I5050baa31f4a892d00cd6f7e088d1b597921474d
| * BuildConfiguration: De-virtualize setBuildConfigurationhjk2016-12-052-18/+8
| | | | | | | | | | | | | | ... and adjust users in Nim and Autotoolsplugins. Change-Id: I6133ca933a5a4dc4d7d9ff73c8ca7afaa51ae516 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Remove files not used in the buildTobias Hunger2016-11-251-5/+0
| | | | | | | | | | Change-Id: Ia5410c32bc002b21b63e12709bced4f90fcde61f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | ProjectExplorer: Shorten space needed to store a FileTypeTobias Hunger2016-11-031-2/+3
|/ | | | | | | | Use class enum to shorten the FileType to quint16. This frees up a couple of bytes per FileNode and we can have many of those. Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ClangStaticAnalyzer: Tests: Rely on projects telling when they finished parsingNikolai Kosjar2016-10-311-0/+2
| | | | | | | | | | | | | | | | | We relied on the CppModelManager to tell us whether a project was reparsed after a kit change. While this worked, it was not guaranteed that the project is really finished (and ready for e.g. building) after pushing new ProjectInfos to the CppModelManager. Rely on the projects telling when they are finished with parsing. This is more accurate and future-proof. The introduced signals in Project and SessionManager are (at the moment) only for tests. Change-Id: I1b368ec4585ffa8755eb28fac6d187cce31243ee Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Autotools: Use foldernode helpers to construct project treeTobias Hunger2016-10-054-160/+13
| | | | | Change-Id: Id0eaebb4035e8bd2fb29cc4f0317151ab00dcce6 Reviewed-by: hjk <hjk@qt.io>
* Kits: Save several ToolChains per kitTobias Hunger2016-07-141-7/+7
| | | | | | | | | | BREAKS BACKWARD COMPATIBILITY OF TOOLCHAIN SETTINGS! * Convert old ToolChainKitInformation to new version * Store several toolchains in one kit (one per language) Change-Id: Ia59a2ad067c57971ec34ce9b2e43758344443755 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* ProjectExplorer: De-duplicate code in IBuildStepFactory derived classeshjk2016-06-108-212/+35
| | | | | | | | | | | | | | This removes 900 lines of duplicated code, some duplicated checks at runtime and some (minor) quadratic behavior when gathering display names. canClone(), canRestore() and canCreate() and restore() use the same pattern. Handle that on the core side once. Leave retore() virtual to let the ios code unmodified (which is likely not needed, later...). Introduce 'Unclonable' and 'Uncreatable' flags to keep Android package installation and WinRT deployment (non-)functionality unchanged. Change-Id: I0325479aff818a4038b2f241ca733b8d8cd66f2f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Move CustomExecutableRunConfiguration to ProjectExplorerhjk2016-05-131-1/+0
| | | | | | | There's nothing QtSupport specific in there. Change-Id: I616a37ed56f1853cdbb16f483de5682d5ea63715 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* BuildStep: Remove finished() signal and use FutureInterface to reportTobias Hunger2016-04-256-15/+12
| | | | | | | | | | Remove the finished() signal that is (sometimes) used to report that a buildstep is done and use the FutureInterface for that purpose consistently. Change-Id: Ibe5520b562b91f1a7f4fc73ee898b33b930029ec Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* ProjectExplorer: Add some more functions to buildsteplistTobias Hunger2016-04-201-7/+2
| | | | | | | Use those functions instead of repeating code all over the place. Change-Id: I03161663b4d5c538fb2ea667353ab7846373ad81 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* Set LC_MESSAGES instead of LC_ALL for parsing the error outputJarek Kobus2016-04-111-3/+1
| | | | | | | Task-number: QTCREATORBUG-15855 Change-Id: I05aa83acb356840cfdacc92796b190fb8754ada0 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Remove unnecessary Q_OBJECT from IDocument subclassesOrgad Shaneh2016-03-241-1/+0
| | | | | | | They don't have signals, properties or translatable strings. Change-Id: Id27df47d1fb8d0530fdf0f5f0d33a2e7b70360af Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Core: Make IDocument concreteOrgad Shaneh2016-03-172-37/+4
| | | | | Change-Id: I8290943614ea4a2060cf09a71fb4f957852ab705 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Autotools: Use Qt5 style connectsTobias Hunger2016-02-1012-37/+28
| | | | | | | * Get rid of "slots" from the headers Change-Id: Ie12f5705a2ca92a431992a45f57193a72ea7032a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Autotools: ModernizeTobias Hunger2016-02-0426-198/+83
| | | | | | | | | | * Use pragma once * Make sure overrides are everywhere * Clean up code here and there * Remove useless code from initializer lists Change-Id: I9c285a803ea36cb32d14b3335757fd4b57f27d02 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ProjectExplorer: Sprinkle overrides over the codeTobias Hunger2016-01-295-47/+47
| | | | | | | Sprinkle overrides over code derived from classes in ProjectExplorer Change-Id: Ia4cc25649f7dc00b0ea126d8176a59afbc5ed574 Reviewed-by: hjk <hjk@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-1930-583/+438
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Add default implementation for IDocument::fallbackSaveAs(Path|FileName)Eike Ziller2016-01-192-12/+0
| | | | | | | | | The methods are only relevant for documents without a filePath, and there was a mix of different irrelevant implementations present in subclasses. Change-Id: I4f57d306e5ddd913974cfe6ed0b4db062eb907a1 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* IDocument: Rename defaultPath and suggestedFileNameEike Ziller2016-01-142-4/+4
| | | | | | | | To fallbackSaveAsPath and fallbackSaveAsFileName. That makes it clearer what they are for, and that they actually belong to each other. Change-Id: Ie5b83b9db77d39a7fe9e979cc8f22b7f5b9101a3 Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
* CppTools: Remove cpptools/cppprojects.[h|cpp]Marco Bubke2016-01-131-0/+2
| | | | | Change-Id: Ida0e8552d371972c141cf561b28667f4428c6fff Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Project: Add setRootProjectNode methodTobias Hunger2016-01-112-23/+8
| | | | | | | | | 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>
* Project: Do not save filenames in derived classesTobias Hunger2016-01-112-7/+4
| | | | | | Change-Id: I23960c61676e96c429b59ad8f8247e1b88606b1a Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>