Commit Graph

44349 Commits

Author SHA1 Message Date
Ulf Hermann
fc80a5afb4 Debugger: Implement QmlEngine::doUpdateLocals
This allows us to sort the locals by name immediately when the action
is triggered.

Task-number: QTCREATORBUG-16645
Change-Id: Ifd24f49e66523af5e988065c9a33aae00e7fb290
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 15:38:07 +00:00
Ulf Hermann
f94bb76eac QmlInspector: Refresh the view when SortStructMembers changes
This has the effect of sorting the members immediately, rather than
the next time something else changes.

Change-Id: I3f3cb261f1fb69b6b36914b811a431b045bb49ae
Task-number: QTCREATORBUG-16645
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 15:13:27 +00:00
Ulf Hermann
4317546faf Fix QnxDebugSupport::startExecution()
Under the assumption that the QNX debug support should work similar
to the RemoteLinux debug support we have to:

a, use the Runnable provided with the run control
b, not recycle the arguments from the run control start parameters
c, prepend a new set of QML debugger arguments when QML debugging

There seems to be some mechanism that allows us to do C++ debugging
by simply starting a process "pdebug <n>" for some port number <n> on
the target. We don't touch this here.

Task-number: QTCREATORBUG-17208
Change-Id: I0f4541968e1d20940617e8ff6d16a8ad86ea22c9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2016-11-03 15:11:11 +00:00
Tobias Hunger
6486cc8127 ProjectExplorer: Fix possible use-after-free in Project combobox
Make sure the combobox values are set to null. Otherwise the ComboBoxItem
might try to read from that value while it is being removed from the model.

Task-number: QTCREATORBUG-17223
Change-Id: I6588aaddf39736846878593a8e6844dab96de408
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 14:34:22 +00:00
Leena Miettinen
290743fdd6 Doc: Describe synchronizing diagrams and Structure view
Change the UI text to use the name of the Structure view
instead of "Browser", which is a term not used in the documentation
or the model editor UI.

Change-Id: Id5654bc7f5c4a9c7147315333f60c88a9e667bbc
Reviewed-by: Jochen Becher <jochen_becher@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-11-03 14:32:14 +00:00
Alessandro Portale
68115440f0 Utils: Move the breakpoint icon mask from Debugger to Utils
A filled circle can be used for other icons as-well.

Change-Id: Ifed0dda111ccb92fa5bb44d63f1c23af1137121a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-03 14:07:47 +00:00
Kai Koehne
b081c2f7b1 Preserve non-ASCII characters in MSVC environment
For the MSVC compiler we parse the environment variables from the
output of a 'set' call. So far we didn't enforce any encoding, which
means that the current code page is used. Then we tried to parse this
with QTextCodec::codecForLocale, which is not necessarily the same.

Avoid this by forcing UTF-8 as output (code page 65001),
and parse as UTF-8.

Task-number: QTCREATORBUG-17219
Change-Id: Ia1a6fa56e5c3e1599bf545795c655bf9376bae5c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-03 12:44:27 +00:00
Przemyslaw Gorszkowski
39d85833b5 GitGrep: fixed substitution of regexp
Task-number: QTCREATORBUG-17193
Change-Id: I7e11a5a55f373dce98a9e203bb3bcb5e929174fc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-03 10:35:59 +00:00
Tobias Hunger
9b0b6aad2e QmakeProjectManager: Remove dead code
Change-Id: I279fb21a8da8789b19e4319b804afafdeb6a630d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-03 09:44:35 +00:00
Ulf Hermann
2acedc82c5 iOS: Don't initialize invalid ports with 0
The invalid port is -1, and Utils::Port does not need an explicit
initialization.

Change-Id: Id545fb98677d26541aa89611ddd50b735e08530a
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2016-11-03 08:31:35 +00:00
Michael Dönnebrink
ed6abae46d QmlJSEditor: Add option to automatically format QML/JS file on save
Change-Id: Ide1810efdef98595705daa32c83fecc2ad367a49
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-02 19:38:38 +00:00
Christian Kandeler
2b7615548d iostool: Fix warning in qbs build
The bundle.infoPlistFile property does not exist anymore. A file tag
based approach is being used these days.

Change-Id: I5b73facb5397a28c0c40f1745c82225c24ffba9d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-02 15:57:22 +00:00
Orgad Shaneh
410211e090 Merge remote-tracking branch 'origin/4.2'
Change-Id: Ibb932efece05a5f5613823fbc79c5b7601c73905
2016-11-02 16:52:58 +02:00
Alessandro Portale
63bed77178 VxWorks: Themable and HighDPI-able icons
Change-Id: I3d4d98bad3e00c0b34009595e9a449c7897d59e2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-02 14:13:01 +00:00
Oswald Buddenhagen
cd30304685 fix cumulative qmake evaluation in debug_and_release configs
don't fail to make the build pass evaluator cumulative as well.

Task-number: QTCREATORBUG-17214
Change-Id: I217578b7d29d0dcf9ef63c954ec403412812c70c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-02 13:59:52 +00:00
Alessandro Portale
d47c0e52c0 Boot2Qt: Themable and HighDPI-able icons
For Emulator, Hardware and "Start VM"

Change-Id: I7244f6a56c62767aacdb19b818865359bfe91191
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-02 12:53:14 +00:00
Tim Jenssen
7b70c30750 Utils: fix that utils can be used in tests
Change-Id: I1f530f3f63e22719de6faed7f55c66282d4044e8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-02 12:25:20 +00:00
Tim Jenssen
0e7103ede6 Revert "Clang: Replace macro usage with HostOsInfo"
This reverts commit cbdf673696.

It introduce a dependency to utils for a couple of lines,
so it is not worth.

Change-Id: I2f53ff3f63322719de6faed7f55c66282d1044e8
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-02 12:25:12 +00:00
hjk
4af72f0b5f Debugger: Make core file name publicly accessible
Task-number: QTCREATORBUG-17158
Change-Id: I528dcd2540479aa34e04d057db1636dbe75c21b6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-02 12:23:21 +00:00
Tobias Hunger
49f2d760e3 ProjectExplorer: Either a API is worth having or it is not
Get rid of "test-only" markup.

Change-Id: Ic0fdfa0c863f22d4422b416d295e2953f7daa860
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-02 11:17:58 +00:00
Eike Ziller
583d8ced5a Theme Settings: Fix that options page switched back to current theme
- Changing the theme settings and reopening options page switched back
  to current theme
- When passing a theme on the command line, closing the options dialog
  would state that the theme change takes effect after restart, even if
  theme was not changed

Fix these issues by showing the current theme setting in the options
page, ignoring the currently active theme, and showing a label telling
the currently active theme instead.

Task-number: QTCREATORBUG-15852
Change-Id: I343fc729c33f17fcb15a8e9facd7a49076d0e0d1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-11-02 11:10:26 +00:00
Eike Ziller
05bf915c03 Core: Refactor argument handling
Split up getting the data from the arguments list and actually applying
the values, and move the details of theme creation and application to
better places.

This gets rid of ugly control flow details like that
CorePlugin::initialize created the action manager before calling
parseArguments, because that is needed to apply the presentation mode
argument setting, and parseArguments created the main window because
that needs to be created _after_ setting the theme (which can be
overridden by command line argument), but _before_ applying the override
color argument setting.

Change-Id: I9c99305b6efbfcc4b37cea9e5c70d816a621963b
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-02 11:10:18 +00:00
Nikolai Kosjar
d93963296a Fix compile on macOS
...by not passing in IDE_LIBEXEC_PATH.

While at it, fix the call to CrashHandlerSetup.

Change-Id: Ie4018bf58f286c121bb85951546c4fe4d31e9959
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-02 11:09:10 +00:00
Alessandro Portale
4f8cb8b1ff AppManager: Avoid building the plugin for the 4.2 release
The appman plugin is supposed to add device support for the Qt
Application Manager. This is something which the current state of the
appman plugin does not provide, and which it will most likely do before
the release of Qt Creator 4.2.

Change-Id: I2e73e7270488097eca8cfaac2ba6ff051451f9a7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-02 10:12:14 +00:00
David Schulz
40cb30c83b Debugger: Add function returning type's module name
Currently this function is just used for debugging purposes.

Change-Id: I4058f417235050b5a93e0437f2752921bfecc405
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-02 10:09:41 +00:00
David Schulz
15de32d1cd Debugger: Replace "__int64" with "int64" when looking up types
Change-Id: I110dc294cbe414b770166d9574f53812113d9821
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-02 09:43:35 +00:00
David Schulz
03cb7c720a Debugger: Add code for unresolvable types
Change-Id: Icb70e471a4a18b3f43442c1972c2661baadb23da
Reviewed-by: hjk <hjk@qt.io>
2016-11-02 09:12:59 +00:00
Oswald Buddenhagen
5f17c280ec de-duplicate INSTALLS resolution
don't resolve the source files once for deployment and once for the
project tree.

Change-Id: Ifddf8fc7883bf025d3640de0d6676b5930991088
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:37:17 +00:00
Oswald Buddenhagen
4a59a7d714 remove duplicate resolution of sources from cumulative pass
instead of resolving all sources both in the exact and the cumulative
pass and de-duplicating the joined list in the end, resolve only these
files from the cumulative pass which are unique to it to start with.

Change-Id: Ie3327799ecd94f8710f8b99bcc46998790ba2c74
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:37:06 +00:00
Oswald Buddenhagen
09b4d9d51b don't use QList for items with sizeof(T) != sizeof(void*)
Change-Id: Ibf6c494dff6700a269f1305c3bdaa4fad63cee98
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:37:00 +00:00
Oswald Buddenhagen
e19fa27601 de-duplicate resolution of exact sources
rather than resolving them once in bulk (for the code model) and once
per pri file (for the project view), resolve them only in bulk, but
"tag" them. then do a cheap filtering pass for the project view.

as a side effect, this fixes the problem that sources that are listed by
a file that is not shown in the project tree (as is the case for qrc
files synthesized by resources.prf) would not be shown at all. instead,
these sources now appear belonging directly to the pro file.

Task-number: QTCREATORBUG-3670
Change-Id: I1a1756d95bd90db4da1274eebcc4dad2a854f43d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:36:41 +00:00
Oswald Buddenhagen
0afcbaa9c8 apply a build pass to retrieve all project variables
so far, we used a build pass only to retrieve accurate target
information from the exact evaluator. however, this is insufficient for
at least two reasons:
- the recently introduced postprocessing of RESOURCES in resources.prf
  is executed only during build passes
- some relevant variables are build pass specific, for example
  INCLUDEPATH when it includes RCC_DIR

an additional upside is that using the build pass' values is consistent
with qmake's vcxproj generation mode.

on the downside, the extra cumulative build pass adds 33% of pure
project evaluation time. however, this isn't as bad, as the pro files
are already loaded and parsed, and the expensive source file resolution
moves completely to the build pass.

the alternative of defeating the build pass logic (as lupdate does) is
not feasible, as we rely on accurate target information from an actual
build pass for the run configurations.

note that this all applies only to windows (and macos when explicitly
configured with -debug-and-release).

Task-number: QTCREATORBUG-16019
Change-Id: I8a97856b3b738aa1a581d24ba24bb3e7199d8078
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:36:11 +00:00
Oswald Buddenhagen
7e86b98836 unify {,obj}c++{source,header} handling in qmake project manager
consistently with Xcode, qmake nowadays knows only one SOURCES list,
which is automatically classified by extension.
to replicate that, we actually copy the objective_c.prf file from qt
5.6.3 and use it to override whatever comes with qt, so we can treat all
qt versions uniformly.

also, the code model throws away the information which files were listed
as sources and which as headers. this is technically incorrect, as a
source may be only included rather than compiled, but there is no point
in extracting information which is not used.

conclusion: lump all c-like sources into one variable as far as project
processing is concerned.

and as far as configuration goes, our code model doesn't differentiate
anyway, so the duplicated setup paths can be eliminated as well.

Change-Id: I24b1bc056f8d9eb579c9378817f602912ab49971
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:35:59 +00:00
Oswald Buddenhagen
4148b05e0a remove some pointless complexity relating to IncludedPriFile
each such object has exactly one associated ProFile if it shall result
in a pri node, and no ProFile if it shall result in a pro node. there is
no point in dealing with lists at various levels.

Change-Id: I930fd8c14fcd6336cd297bacefdd0036f556741b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:35:50 +00:00
Oswald Buddenhagen
a8010b0fff make VFS aware of exact vs. cumulative evaluation
the cumulative evaluation has a good chance to make a mess of the
virtual file contents created by the exact parsing, so better contain it
to its own namespace.

the ProFile cache also needs to keep the files separate. this
specifically addresses the side issue discussed in QTCREATORBUG-10779.
it also fixes attempts to deploy the wrong build when the variant is
selected through a cache file, as in QTCREATORBUG-15815.

in the project explorer, we don't track from which evaluation pass
particular files came from, so we try the cumulative first to get the
most contents, and fall back to the exact one if the former file is
empty (or does not exist at all).

Task-number: QTCREATORBUG-15815
Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:35:22 +00:00
Oswald Buddenhagen
cf82f21080 shave off duplicate stat()ing of source files
ProFileEvaluator::absoluteFileValues() now returns only files, which
allows us to skip the subsequent QFileInfo::isFile() calls at some
call sites.

as a side effect, IoUtils::fileType() does not see anything except
regular files and directories any more. that's not expected to be a
problem, given the function's scope.

Change-Id: I53063ad8cacb3afe5cc1baf6d6d5feba3465e74f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:35:14 +00:00
Oswald Buddenhagen
5ba32e3484 let QMakeVfs::readFile() report ENOFILE explicitly
when the QFile object is already constructed, querying whether the file
exists is actually cheap, so do it right away instead of later on
demand. that makes the calling code a bit cleaner.

fwiw, that we need to explicitly query the file's existence at all is a
result of QFile's completely useless error "codes" (which merely say
which function failed, as if the caller would not know).

Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:35:08 +00:00
Oswald Buddenhagen
424639ecac make resource file handling able to deal with QMakeProject's VFS
resources.prf may create virtual qrc files when RESOURCES contains
non-qrc files.

Change-Id: If591de9b32b775059d67e94bc3cb06d23ee44b08
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:34:55 +00:00
Oswald Buddenhagen
1589ce3ce8 chuck sysroot handling out of ProFileEvaluator
qmake doesn't do anything with sysroots at this level, so this code
plain does not belong here.

sysrootification is used when resolving INCLUDEPATH, which is emulating
compiler behavior. this is done by higher-level code.

Task-number: QTCREATORBUG-11944
Change-Id: Ia25f0b6ef713e9809d974e3f3e49ba308b8c933f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 17:34:29 +00:00
Oswald Buddenhagen
c42b12c98e introduce ProFileReader::fixifiedValues()
... and use it for PRECOMPILED_HEADER, INCLUDEPATH, and install target
collection, instead of abusing ProFileReader::absoluteFileValues().

specifically, this falls back to a location in the build directory when
the path is relative and the file cannot be found. in qmake, this
somewhat weird behavior ensures that chaining extra compilers actually
works (and also ensures a lot of frustration with non-clean source dirs
...).

this also fixes INSTALLS with .CONFIG no_check_exists.

Task-number: QTCREATORBUG-14848
Change-Id: Iaf9483c0c4586c464bd10a2aea7cbac7e0df1ec5
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2016-11-01 17:33:58 +00:00
Alessandro Portale
5e29347d9d Utils: Improved "File New" and "File Open" icons
This patch adds a slight fill color, which makes these two icons more
conform to the other icons in the menu.

Change-Id: If7ae5a5c4c642c28a33f03f1b45b4bdaa61688da
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 17:18:35 +00:00
Tim Jenssen
b31c3e0dcb Utils: Changeable SmallString stack size
The size of the small string optimization was hard coded. For some use
cases you want a bigger or smaller size. It is now configurable by a
template parameter. For that we changed the name to BasicSmallString and
added an alias of BasicSmallString<31> to SmallString.

Change-Id: I844b4420d260290307a6018bb6cc4cf3ba7bd449
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 16:17:21 +00:00
Marco Bubke
601dc5fc07 Utils: Introduce a conversion constructors for std::vector<std::string>
Change-Id: Ic37bf194240f5b76ec6299374cc7ad785b78a7ed
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:49:40 +00:00
Denis Klychkov
1872cff611 QmlJS: Fix auto-indent after an opening brace placed on a new line
Left brace wasn't handled in the expression_maybe_continuation state
of qml/js code formatter. It led to expression_or_objectdefinition
could not be continued on a new line.

Task-number: QTCREATORBUG-12326
Change-Id: Id8fcaa586000008fce72c7c0c03ed1739b1c7aa1
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-11-01 15:43:42 +00:00
Tobias Hunger
db6b60874d CMake: Make connections in server-mode setup more robust
Change-Id: I1e66b4decd485edac9e3fb5508d5c0bb10d0554a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:42:04 +00:00
Marco Bubke
f0bf6211be Clang: Remove useless namespace usage
Change-Id: Ia153798c3b770ff7c586584d4de2d7cd0cd191cd
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:37:32 +00:00
Marco Bubke
7cc348e048 Utils: Make SmallString(std::string) a template
Normal contructors are called before templated constructors. So it would
call SmallString(std::string("foo)) for SmallString("foo"). To prevent that
we change it to a template constructor.

Change-Id: Ibd249cedd638cbc2e6755c988be41fa5bb6e1ff6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 15:34:11 +00:00
Thomas Hartmann
3673ced26e QmlJS: Get version numbers from components
If we have a pure QML plugin with a qmldir file,
then the code model ends up without a version number.
This is bad, since the version is required for graphical tooling.

What we can do is to take the highest version number from all
components that are defined in the plugin.

Change-Id: Idb4206201efac91250100740e287676031d3016a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-01 14:43:48 +00:00
Leena Miettinen
d550cbdd40 Debugger: Fix UI text grammar and capitalization
Make some tooltips shorter.

Change-Id: Iff61402e3059360417ca0d763dbcae0ed3841e1c
Reviewed-by: hjk <hjk@qt.io>
2016-11-01 14:40:51 +00:00
Leena Miettinen
7b15ae7e05 Project Explorer: Make action names shorter
...and fix their capitalization.

Change-Id: Ie6a39164f5ad7d38b0a645e7507d0797c578bee1
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-01 14:28:32 +00:00