Commit Graph

55184 Commits

Author SHA1 Message Date
Eike Ziller
4cdb9b26cf Enable Clang code model by default
It has been around for a long time now, many e.g. windows specific
issues have been fixed, and we concentrate our development effort on it.
Many bugs in the built-in model stay unfixed, and we'll definitely not
support modern C++ there, which leads to many bug reports that are
closed with "works in clang code model".
Let's switch that around.

Task-number: QTCREATORBUG-19297
Change-Id: I59ec9621ad76590db8ec33f9658af6d103c9da93
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-16 13:15:09 +00:00
hjk
cd1534a646 CMake: Some cosmetics to move closer to default style
Change-Id: If2c36eda6157e5dd78abf4f25029ecfd153e228a
Reviewed-by: pawelrutka <prutka13@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 12:32:47 +00:00
hjk
07d8b7bfa4 Qmake: Remove now-unused QmakeProject::hasApplicationProFile
Change-Id: Ie309468a124497c0aafa3911b5bd6939a9adcb3d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 12:32:14 +00:00
hjk
300b953ba4 CMake: Compile fix
Change-Id: I3f9d07490ab98ec1f5e0d0acd9def2d02010ea12
Reviewed-by: pawelrutka <prutka13@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 12:27:18 +00:00
Eike Ziller
f4b13dc77c Version bump to 4.6.0
Change-Id: Ibf3dd86a654080cb9b5ab2a4fd790f8f59879787
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-16 12:19:01 +00:00
Tobias Hunger
49c910c7ab TargetSetupPage: Work for projects without BuildConfiguration
Change-Id: Ie145bc3c87f01326a25e75f5c80a4d05da58bf6b
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 11:25:48 +00:00
Pawel Rutka
c8f1da095d AutoTest: Add possibility to trigger test run from source
Change-Id: Iceed69747de64d76f34451d41f719c8dbdd81e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-16 10:50:21 +00:00
Pawel Rutka
190c5083b7 Add Specific settings page to CMakePLugin and create checkable dialog box for user after add new file action
Change-Id: If5702764fa81f2fdda3ef59780b217e47643b030
Reviewed-by: pawelrutka <prutka13@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 10:49:45 +00:00
Eike Ziller
278a5f1e33 Merge "Merge remote-tracking branch 'origin/4.6'" 2018-03-16 10:29:37 +00:00
Tobias Hunger
41df91ece8 TargetSetupWidget: Replace a range of lists with a list of struct
Simpler to make sure all the data is in place at all times that way.

Change-Id: I73d88f4c31d8447547ccf6de808ea00066db4f37
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 10:13:54 +00:00
Orgad Shaneh
a23615e41c Callgrind: Use nullptr
Change-Id: I07c23d8bc48815e44ad340a6e37ee3b229866dbf
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 10:11:24 +00:00
hjk
60ac5f3103 Qmake: Remove hidden dysfunctional option to run on QVFb
Change-Id: I31c2895135f4ebd0a7cb0de898309676a8f98f37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-16 10:02:40 +00:00
hjk
55961a367d QMake: Adapt DesktopQMakeRunConfiguration to applicationTargets() use
Change-Id: I2844e2e97ca78c12c4abdb1538c37e77b841918e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:58:02 +00:00
hjk
e20d620043 ProjectExplorer: Let RunConfiguration declare what nodes it belongs to
This feature in question is the availability of the "Run" button in the
context menu of certain project nodes in the project tree to run
something presumably related to/build from that (sub)project.

Previously, the decision was made for certain qmake based projects
(those targeting Desktop, iOS and VxWorks) by some indirection
through the corresponding RunConfigurationFactories.

The patch lets the RunConfigurations decide themselves directly
and removes the indirection, potentially opening the feature for
other qmake based RCs, as well as other combinations (e.g.
PythonRunConfiguration could be associated with its .py file,
without the need to have a dummy project)

Change-Id: Ic489bd1dfa25fcd9102ffa4fa30125565dd2e40e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:55:03 +00:00
Eike Ziller
6e7540988e Fix scrolling in file system view
The style can set the scroll bar to scroll by item, which breaks
the automatic scrolling that adapts for size changes of the bread crumbs.
Force the tree view to allow pixel-exact scrolling.

Task-number: QTCREATORBUG-19800
Change-Id: If61640a1b6e3b4a777269fb129bdc2689bad19c2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-03-16 09:47:11 +00:00
Nikita Baryshnikov
e3918b563f Git: show commit given as command line parameter in diff editor
ex: qtcreator -client -git-show d3eb585db9 from qt-creator source dir.

Change-Id: Ice62f062d431d2ab74e3d6832dfc8b0b555dfa19
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-03-16 09:45:45 +00:00
Eike Ziller
957e860dda Merge remote-tracking branch 'origin/4.5' into 4.6
Change-Id: I40a17204340e6fab18b720c3c3306a6a239abf99
2018-03-16 10:16:19 +01:00
Eike Ziller
cb84ae1a21 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
	src/plugins/qmakeprojectmanager/wizards/testwizard.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/gettingstartedwelcomepage.cpp

Change-Id: I126823f5f60613509520c07f52be7bc9d4f4367c
2018-03-16 09:28:08 +01:00
Robert Loehning
fad75a3d56 Squish: Update tst_rename_file
Creator only selects the filename now, the
extension will be left unchanged by default.

Task-number: QTCREATORBUG-20057
Change-Id: I66bbbb5b95e1d487c2087efa596a87a240721e44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 14:09:50 +00:00
Tobias Hunger
f044e69f67 ProjectExplorer: Remove obsolete functionality
Change-Id: Iea9b50c0bf9d855fb039a30062e26f8d6f3bc321
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-15 14:04:16 +00:00
Tobias Hunger
3ef6f35cf6 PointerAlgorithm: Fix take and takeDefault
Fix take unit tests to actually test the correct template instance,
add more unit tests for takeDefault.

Change-Id: I51f5b17b6478a8c1388a91840edfb9c702697b28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-15 14:04:10 +00:00
Eike Ziller
454c7f83ff Fix image border for examples browser
It was made smaller for the tutorials to fit the new aspect ratio for
their images, but we may not do that for the examples.

Fixup for 7d83472906

Task-number: QTCREATORBUG-20078
Change-Id: I556536a7e299e8f675332cd7450ece5fca6fab0a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 13:54:08 +00:00
hjk
805b28b8b7 ProjectExplorer: Simplify DeployConfigurationFactory interface
Following the RunConfigurationFactory lead this replaces
f = Foo::find(); f->do() by static Foo::do() stanzas.

Also protect DeployConfigurationFactory::canCreate()

Change-Id: I80fa491f836c3b9186f6ce6dccac4d52d4b80fc8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 13:09:27 +00:00
Jarek Kobus
da2c66b1d0 Move git specific stuff out of diff editor plugin
Move it to the git plugin.

Change-Id: I8151573ed50df70776f7ebf0475dd41fb84fae83
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 11:21:01 +00:00
Robert Loehning
24db24734d Squish: Open example from Qt 5.6 in tst_qml_editor
Change-Id: Ibd5bd516d8409fa5389da3e330d6723ba772f135
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 11:19:35 +00:00
Christian Kandeler
6d5e1f508d Update qbs submodule
To HEAD of 1.11 branch.

Change-Id: I12a6938563f7c7b109146123137aa7d278310fcb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-15 09:54:39 +00:00
hjk
02dacc27eb RunConfiguration: Remove some unused prototype and functions
Change-Id: Iebe9a46e5c1effd56a561dda381403b0e2123cb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 09:23:13 +00:00
Tim Jenssen
710b459e35 QmlPuppet: enable reset the default puppet button
Also fix the logic that empty means that it should use the
default fallback puppet.

Task-number: QTCREATORBUG-19511
Change-Id: Ia36907523281386a1ed56362a76e37aaa9ee16b2
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-03-15 08:45:58 +00:00
Christian Stenger
1f3a106025 Tests: Fix Qbs build
Change-Id: I5bc5ec98994ce83137ac1599682251db35e26663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-15 07:44:49 +00:00
Ulf Hermann
af99c3fe7d Fix width calculations in flamegraph and timeline
Relying on the index of a detail entry in the children array is
dangerous as the repeater may create the children in any order. Rather,
use the isLabel property to find out if an item is a label.

Also, recognize that the drag handle sits in the outer margin.
Therefore, as the minimumWidth includes margins, we have to subtract one
margin in order to get the x value of the handle.

Task-number: QTCREATORBUG-20012
Change-Id: I828b116c2c52d5aa7f8e3e726f59e3fa9f9095ec
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-15 07:25:00 +00:00
Tasuku Suzuki
ff155a2e42 Improve "Import Existing Build..." in project pane
The action is for active project. The button should be under active
project.

Change-Id: Ie0029bff02f58dbd5cb4c2a17bc086c168a522dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 02:06:24 +00:00
Alessandro Portale
21d3d0a55d QtSupport: Fix loading of tutorial thumbnails
Amends 7d83472906
Used the HighDpi loader in the wrong place.

Change-Id: I5bb7328167c0a9da811db92102feea67ee97c6c4
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
v4.6.0-rc1
2018-03-14 16:53:08 +00:00
Edward Welbourne
912dd8df64 qmake: require a drive in a DOS path for it to be absolute
For Q_OS_WIN, a path is only truly absolute if it includes a drive
letter; merely starting with a slash is not enough.  (We can't support
UNC paths, so don't even try: qmake runs various commands in the
source directory using CMD.exe, which doesn't support UNC as PWD.)
This requires, when resolving a path relative to a root, transcribing
the root's drive to such not-quite-absolute paths.

Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now
use IoUtils::resolvePath() rather than delegating to QDir's absolute
path method, since that doesn't correctly recognize the need for a
drive letter (and qmake did run into problems with some paths, from
splitPathList and a failing test, as a result).

Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
(cherry picked from qtbase/e86f3c018833141776db2d15772ba53995656eac)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:35:34 +00:00
Oswald Buddenhagen
a13776d848 qmake: fix hypothetical raw data leak in $$replace()
the replacement value may well constitute the whole output string - this
is in fact common, given this rather typical usage pattern:

  BAR = $$replace(FOO, -flag, -otherflag)

this must be considered when constructing the return value.
compare e1cee308a.

as of now, this is irrelevant, as QString::replace(QRegExp, QString) will
always memcpy the replacement into a detached copy of the target, but one
never knows.

Change-Id: Ia1f271f45023746040fc28ce6d88a6609e05e5c2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/e8b9a17a3bd770f6bf1bc8f4e0586565acf425e2)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:35:19 +00:00
Oswald Buddenhagen
42e3f980ec qmake: fix hypothetical raw data leaks relating to qt i/o classes
technically, we should not rely on the i/o classes not storing the
strings beyond the instantiated object's life time.

Change-Id: I0990769b3cf86860184869036c096c531160e9be
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/702be65532263bd52ad0b67235c112083120699e)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:35:13 +00:00
Oswald Buddenhagen
c76fc433eb qmake: remove pointless use of raw data in $$[QMAKEFEATURES] access
property values are de-facto guaranteed to be backed by full QStrings,
so there is nothing to be gained from using the raw data optimization,
while doing so risks raw data leaks.

Change-Id: I3d43da9aaadd4d5811c4b1a9d7ac734049da423c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/18533ae2a72aba9ad8c0f1862e1e6ace50655864)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:35:01 +00:00
Oswald Buddenhagen
d5014234f2 optimize operator+ ProString vs. char*
we have all necessary overloads now.

Change-Id: Ic4472eba15d4234e968fcb9443d0f79011aa43fd
(cherry picked from qtbase/f137957e0887a9321b69b9ba83ed6ccaedee57bb)
(cherry picked from qtbase/14505bbfea220a39c2158480db8ba788707ff332)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:47 +00:00
Oswald Buddenhagen
c86ea1c8ce qmake: make more use of ProString built-ins
saves some noisy toQString() uses.

Change-Id: I62a9e2725c4baabac311124d19c7d8b40f54c8f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/ce5e6876d4a191087969134e489db99cf167ca69)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:36 +00:00
Oswald Buddenhagen
10f5676cab qmake: fix raw data detach avoidance
the m_tmp array is a member, so the index toggle for accessing it also
needs to be one - otherwise, odd iteration counts will defeat the
mechanism.

Change-Id: If7a800ed5a4b4168625daf1ebbd5d2d164569d8e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/ccb8afcda752093bfb6bc32f560131a91bd826a1)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:25 +00:00
Oswald Buddenhagen
11753bfd9d qmake: fix excessive detaching of raw data
... in $$basename(), $$dirname(), and contains(). the latter case is
marginal, as it only applies to mutuals which are regexes, which i don't
remember ever seeing used.

QRegExp saves a copy of the matched string, so it's necessary to
alternate between two temporaries to avoid detaching. we already
did that in most places.

Change-Id: I97b8294585c17c76d1756f83971f42cb88353af0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/5131bb9bed3af7a2ecfce27af3940ff11ed219c2)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:20 +00:00
Oswald Buddenhagen
2053a5710a qmake: make yet more use of ProString::toQStringRef()
in most cases, the main advantage is not using toQString(m_tmp), which
reduces the possibility of raw data leaks. in cases where we used
toQString() without temporary, this is a slight optimization.

Change-Id: Ib343acffd383aa2c4fefab75fb52762fb534dfc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/eb0ba90b0af9fa7d5b70c74140f64295f2d05c18)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:13 +00:00
Oswald Buddenhagen
60245e55d7 qmake: Change source identifier type in ProString
The strings remember in which file they were created/assigned.

However, this used a non-counting reference to a ProFile, which could
become dangling. If a subsequent ProFile re-used the exact same address,
a string's source would be mis-identified, which would be fatal in
conjunction with discard_from().

Since we actually need only a unique id for comparison, let's use an
integer for that.

comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the file ids need to be aware of the dual VFS which was
concurrently introduced on the qtc side.

Started-by: Simon Hausmann <simon.hausmann@qt.io>
Change-Id: I395153afaf7c835d0119690ee7f4b915e6f90d4a
(cherry picked from qtbase/190aa94be7f5e146bef44862b974d733755cec85)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:34:01 +00:00
Simon Hausmann
274726efb0 qmake: Preserve last modification timestamps of installed directories
sync-up with qmake; no effect on creator.

Change-Id: Id5931a467196d5cd67acfa0deffc2488af8a3669
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
(cherry picked from qtbase/c12b96daf2195c475c086f8f9be833aa0e28b26c)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:33:41 +00:00
Simon Hausmann
fe70177c17 qmake: Preserve last modification timestamps of installed files
sync-up with qmake; no effect on creator.

Change-Id: I3064d29a2b8c7b009a1efbf8f00b84c079ea5417
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
(cherry picked from qtbase/2ad7f6ddf5042d7442c97a89b083ca2853cf5721)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:33:33 +00:00
Simon Hausmann
6bee0b695d qmake: improve time stamp precision of the touch() function
sync-up with qmake; no effect on creator.

Change-Id: I6928660230d84f8511bf0f58e268906d2e575e04
(cherry picked from qtbase/d83a20af1d05b5958d3559482b715777a57dea7a)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:33:28 +00:00
Marc Mutz
1ccf674e97 QMakeEvaluator: port a QString::split() to a QStringRef::split() loop
Change-Id: I91a65776124f88a7e2e4778dbe9154b597f52212
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
(cherry picked from qtbase/cdbe9d1483b0761c9b5e72cc56dacf09d1b54118)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:33:16 +00:00
Oswald Buddenhagen
d38ffb6b58 qmake: make QMakeEvaluator::isActiveConfig() take a QStringRef argument
saves some more cheap but pointless conversions to QString.

this makes the introduction of the ProStringList::contains(QStringRef)
overload necessary.

Change-Id: Ic61993bd9a4b28fbba1b8e346345fd5f5636c6f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/11d957d04381c7162dd5621c61f9963580ec7041)
(cherry picked from qtbase/9f98935d33cc15c938be2b9295ba2fbe4edb0ee0)
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:33:01 +00:00
Oswald Buddenhagen
bfbe67a255 qmake: add a bunch of complementary options to -after
in particular, -before (just for symmetry, as it's the default), -early
(the actual objective), and -late (for symmetry again).

Change-Id: I274303582a348b052c3e5106ff360ab4fd7d4ee2
(cherry picked from qtbase/4adc1012e19f5e12ab2fb96effc9ea88d2a05eda)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:32:47 +00:00
Oswald Buddenhagen
dd482d681f qmake: don't pass qmake configure arguments to sub-projects
the arguments after '--' are by definition meant only for the top-level
project, as that's where configure is invoked from. passing them to
sub-projects just adds noise to the make output and misleads users.

note that this specifically does not support qmake -r, which will break
if the subprojects rely on the arguments being absent. this isn't a
problem, because the qt build doesn't support qmake -r anyway.

note on cherry-picking: qt creator parses projects like qmake -r would,
so this is hypothetically more of a problem here. we presume that nobody
would actually include configure arguments in their build configuration,
which may or may not be true ...

Change-Id: I7ecff6212ce3137526005fc324a4a7ae45e3345e
(cherry picked from qtbase/34cc41d8a17e6e30f01f22c5d382c28d49ae37e1)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:32:35 +00:00
Oswald Buddenhagen
897305f356 qmake: micro-optimize FOO-=$$BAR for empty FOO
Change-Id: I86c89bf0ad726a5ab7ead990a27ef7cc32caebbf
(cherry picked from qtbase/33c33f6475910bad607abac67eef6c581d6188dd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 15:32:07 +00:00