Commit Graph

120 Commits

Author SHA1 Message Date
Eike Ziller
a3880c4916 Merge remote-tracking branch 'origin/4.0'
Change-Id: If0ba896a083392a532f76bb26bec3540a7c17667
2016-04-25 13:27:14 +02:00
Alessandro Portale
fdad4bf7b0 New file overlay icons
Change-Id: Icba67a1404b6e4604aef56def00bfe2098b8c8fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-04-25 08:07:19 +00:00
Vikas Pachdha
d3dd0265b3 ProjectExplorer: Added duplicate file action.
Task-number: QTCREATORBUG-15952
Change-Id: Idab6f120e8324b21db261ad4f0db54dd73cda16e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-04-08 15:28:00 +00:00
Leena Miettinen
2706348040 QMake: Write "state charts" as two words
Change-Id: I6b0473c6f1029a9a0b99ce5e1a97e84e102d7218
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
2016-04-05 09:55:31 +00:00
Tobias Hunger
dd9d69f09e Qmake: Unify cleanup of readers in nodes
Change-Id: I2387342667d143235e2b147ba1c0971954b0beb7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-04-04 12:52:16 +00:00
Orgad Shaneh
a5a4f02ced Core: Make IDocument concrete
Change-Id: I8290943614ea4a2060cf09a71fb4f957852ab705
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-17 07:43:55 +00:00
Orgad Shaneh
925492a1b3 QmakePM: Avoid multiple loads of the same standard icon
Loading a standard icon is expensive.

Change-Id: Ic6bae20c9d0bdcb07fda48309bebcc3a959bc031
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-01 10:06:50 +00:00
Ulf Hermann
2b48a4fa27 QtSupport: Support qscxmlc as extra compiler
Change-Id: Ief4810abe46ce4654f518781ce377e10a8e38ad4
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 12:53:15 +00:00
Ulf Hermann
2e3e060520 Generalize support for extra compilers
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>
2016-02-16 12:53:05 +00:00
Ulf Hermann
bffaf9cc49 Qmake: Retrieve .h and .cpp extension variables with correct names
We will need them for more things than ui_*.h.

Change-Id: I394aa8646095cdafb426c15746243b27c1c1ab1b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-16 09:27:04 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Ulf Hermann
4a5213926b Add support for qscxmlc and state chart files to project managers
Change-Id: Ic0ac337ea90310239a2b1e681083f2201a76afe8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-09 12:53:42 +00:00
Eike Ziller
67e952e888 QMakeProjectManager: Reduce priority of parsing threads.
Task-number: QTCREATORBUG-14640
Change-Id: I32b47888ecf3627bc21649a0c922216fb9e714a6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-28 13:50:14 +00:00
Eike Ziller
2a83564d62 QMakeProjectManager: Avoid usage of global thread pool.
Using a global thread pool does not really make sense, since we do not
want to block any completely unrelated task. But the qmake project
manager still wants to limit the number of simultaneous threads without
managing that itself. A shared thread pool in project explorer sounds
like a sensible middle ground.

Change-Id: Ide6fd546a56e8f4896c387168513b608dfe7e3e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-28 12:55:38 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Eike Ziller
fc485e6b86 Add default implementation for IDocument::fallbackSaveAs(Path|FileName)
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>
2016-01-19 07:55:56 +00:00
Eike Ziller
cfc89a685e IDocument: Rename defaultPath and suggestedFileName
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>
2016-01-14 14:40:45 +00:00
Tobias Hunger
d144ea58e0 Project: Add setRootProjectNode method
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>
2016-01-11 15:33:26 +00:00
Tobias Hunger
21d204ad5c Project: Add setProjectManager method
Implement default projectManager method in Project and use
these two everywhere.

Change-Id: I27e011e6fdc17b36aff1b8b931527307320e347c
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2016-01-11 15:31:04 +00:00
Eike Ziller
ad6c0f9bc6 Merge remote-tracking branch 'origin/3.6'
Change-Id: I8f034f91de04e319dd5ba24b8837f1daca54d918
2016-01-07 11:01:14 +01:00
Oswald Buddenhagen
68f5420093 report errors from projects included by cumulative evaluation
so far, we would suppress any errors which occur during the (exact)
evaluation of projects which were included only by cumulative evaluation
of a parent project (see f53d37d48). this makes sense, as excluded
projects are likely to fail, producing unsettling noise on the way.
however, having no indication at all why a subproject failed to load is
not helpful, either. so print these errors, but tag them with a prefix.

note that we continue to suppress messages from the cumulative
evaluation of all projects, including from the exact evaluation of .prf
files done even in this mode. this is done because this output is
expected to be quite noisy and unhelpful. however, it can be argued that
this isn't a wise choice for projects which are known to likely fail for
reasons which would not impact our ability to show (an approximation of)
the project in the project explorer. for the time being, we assume that
the expected errors occur later on (typically during the .prf evaluation
phase due to unknown QT entries), so an unexpected error which would
also affect the cumulative evaluation is displayed nonetheless.

Change-Id: Idc2675744169b7cb52c0542a80075850e2b9317c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-04 14:28:09 +00:00
Tobias Hunger
a08cb7d52e FolderNodes: Specify filter for Add Existing Directory
Allow foldernodes to specify which files they care for when doing
"Add Existing Directory". Before we used a fixed list with C++ header
and source files, which does make no sense for e.g. adding to resources.

Task-number: QTCREATORBUG-15278
Change-Id: I15dad133391485c2bcebd2d864623304b31b5f8f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
2015-11-09 10:35:30 +00:00
Tobias Hunger
e1ed5e4804 FileUtils: Replace FileNameList with an alias
The functionality in that class is covered by initializers and
Utils::unique, so there is no need to keep a custom class.

This way FileNameList plays way nicer with utils/algorithm.h.

Change-Id: I8eeae6aca0558ecd998920c4fdfc5ea56bf75501
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-04 09:10:01 +00:00
Tobias Hunger
5d7f5a2a32 ProjectNode: Rename path() to filePath()
Change-Id: I78bb73f8c9457fd74c470eacbf54eb9195ac9681
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-03 11:01:50 +00:00
Tobias Hunger
1323956f59 QmakeNodes: Fix renaming of files
We need to re-parse the file after removing the old filename. Otherwise
we only hit the right spot by accident when adding the new filename.

Task-number: QTCREATORBUG-15241
Change-Id: I2e72da9f14033cc757a8b51d2ce1f5c2a5e5b557
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-29 12:00:46 +00:00
Daniel Teske
798fa669bf ProjectExplorer: Check if the project can rename a specific file
before renaming the file.

This adds a new api:
FolderNode::canRename(oldFileName, newFileName) that asks the
project manager if a specific file renaming could be applied to
the project file.

Change-Id: I77bae56db06d81fd03e590285d6079abea2c514b
Task-number: QTCREATORBUG-14521
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-16 09:58:56 +00:00
Alessandro Portale
d7a373ef26 QmakeProjectManager: native separators in FolderNodes
Folder nodes with separators should be native.
They are native in the tooltip, as-well.

Change-Id: Iae56f352df3a58fe0eb75130c9171fa70d8b0204
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-09-02 14:10:42 +00:00
Daniel Teske
8cbe009cc4 QmakeProject: Use QMAKE_PROJECT_NAME to set the display name
Of both nodes and run configurations.

Change-Id: I04cae590561f3c7b355a3385856dca13ebcd7acf
Task-number: QTCREATORBUG-13950
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-09-02 10:52:24 +00:00
Daniel Teske
b56b1b1fa2 QmakeProject: Use QMAKE_EXT_H to generate correct ui_h paths
So that the code model can find the right files for ui files
that haven't been build.

Change-Id: I438a3ab9806c8ff6c47e5e188228a31ffb917bdf
Task-number: QTCREATORBUG-14910
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-08-21 11:49:04 +00:00
Daniel Teske
51ba32bccc QmakeProject: Show project hierarchy of .pri files
For a reason that seems lost in time, all .pri files that are
(directly or indirectly) included in a .pro file are listed
in a flat list.

Change that to properly show a tree.

For example a.pro including b.pri, which includes c.pri is
now shown like this:
a.pro
|-> b.pri
    |-> c.pri

Task-number: QTCREATORBUG-487
Change-Id: I1bc29a512fb27e6fe9b399738f2a37f2a95ce10f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-08-18 13:32:45 +00:00
Daniel Teske
518720e06e Speed up opening .pro files on windows for some users
If the build directory is empty, which can happen if we are parsing
a completely unconfigured project, then UIDIR might end up being '/'.

The uiHeaderFile function appeneded /ui_XXX.h to that, leading to
a network path.

Fix that by ensuring in various places that we handle this case.

Task-number: QTCREATORBUG-10733
Change-Id: Ib848ed4efbeacc6ee7ff862bef861a58f6d3ea34
Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-07-22 12:16:21 +00:00
Jarek Kobus
a73ad816a3 QMakeProjectManager: Introduce member initialization.
Change-Id: I69df0c22a215b2df12f63fdc47082e9797fc02ac
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-06-23 21:03:41 +00:00
Daniel Teske
f53d37d488 QMakePM: Less output from exact parser of cumulatively found SUBDIRS
Change-Id: I58766cc9e1916741dc0a33fc69e4e58470241073
Task-number: QTCREATORBUG-10779
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-04-23 10:32:38 +00:00
BogDan Vatra
7481bff2b4 Don't allow to run static libs.
Static libs can't be run on Android and on iOS, so we need to filter
them out.

Change-Id: I90b778ffaa5e7d6267cc0e8d753be56bf93007a7
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-23 10:48:58 +00:00
Daniel Teske
4dc36974a8 Android: Adding libraries to subdirs projects
Task-number: QTCREATORBUG-11625

Change-Id: I1017546463e819fc05846af74582cb9f5739ff08
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-03-17 10:36:27 +00:00
Leena Miettinen
51513afa61 QMakeProjectManager: add full stop to end of message
Change-Id: Ie7e8ed6ba3f42e357e2443e7c107aa37d2f23d6d
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-16 15:11:33 +00:00
Daniel Teske
c874e1dd73 QmakeProjectManager: Fix node addition order
First add the nodes, then add the subnodes. This is the correct
fix for

Change-Id: I50834ba7e0221623abe2954c88c47322677c142d
Task-number: QTCREATORBUG-14134
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-16 10:41:41 +00:00
Orgad Shaneh
7a9a1b04b1 ProjectExplorer: Use FileName in NodesVisitor
Change-Id: Ia02b4dc64b343664b5d47fe3743fbdd0782da121
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-03-02 11:43:14 +00:00
Daniel Teske
2ffd0e2d0d ProjectExplorer Nodes: Replace dynamic_cast with as* functions
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>
2015-02-25 14:57:18 +00:00
Orgad Shaneh
538af8ba17 QmakePM: Fix case-only rename on Windows
ProjectExplorer::compareSortedLists detects added and removed files
by comparing the "old" and "new" lists using the provided sorter.

If the sorter ignores case, then the file is neither added nor removed.

Task-number: QTCREATORBUG-13981
Change-Id: If91c18cfa58bd8f00acfc453779750248bb77c01
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-02-18 10:56:13 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +00:00
Orgad Shaneh
88e7f935f4 ProjectExplorer: Use FileName for Node::path
Change-Id: I4a41cfb629be8bb06b4b0616cd4475525e617a51
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-13 13:14:03 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Nikolai Kosjar
e9b94c131c QmakeProjectManager: Shell-interpret project defines
...since they are meant to end up in Makefiles.

A define like

    DEFINES += SRCDIR=\\\"$$PWD\\\"

was passed on to the code model as

    #define SRCDIR \"/tmp/dir\"

instead of

    #define SRCDIR "/tmp/dir"

Change-Id: I7af5c8d82b3b937ca9db70f6580bab3419fb4550
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2015-02-12 10:38:06 +00:00
Orgad Shaneh
98723e4557 De-noise some ProjectExplorer/Utils qualifications
Change-Id: Iaec01ca0e7a43592528bcaf4252540561e109919
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-02 13:04:03 +00:00
Orgad Shaneh
8b5dcc13c5 Replace QFileInfo::fileName() with FileName::fileName()
Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 11:15:43 +00:00
Mitch Curtis
dd2bf5d602 Add IsoIconsVar to QmakeProjectManager::QmakeVariable.
It uses "ISO_ICONS" as its variable name.

This is necessary for the ISO Icon Browser Plugin. A previous attempt
at adding a more generic API to QmakeProFileNode that would allow for
reading and writing custom qmake variables was not sufficient. This is
because qtquickdesigner plugins do not get created until design mode
is entered, meaning that it was too late to register custom qmake
variables via static functions in QmakeProFileNode.

Change-Id: I2c8e0d944a1b9f07d1a7a70bd5e02ea371cf7680
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-01-23 12:55:03 +01:00
Daniel Teske
955ce2169f QmakeProject: Use file list even in the EvalPartial case
EvalPartial is if the exact parse didn't work out at all, but the
cumulative did.

Task-number: QTCREATORBUG-13871
Change-Id: I98f6389783d15b156e56dc8be7d388b2951d9bdf
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-23 12:23:58 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Daniel Teske
70c9c51e5e Refactor ProjectExplorer::Node and remove NodesWatcher
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>
2015-01-14 11:48:12 +01:00