Commit Graph

44349 Commits

Author SHA1 Message Date
Nikolai Kosjar
1948481390 Clang: Do not print AliveMessage by default
In 99% of the time this is annoying.

Change-Id: I14749eec6180472221193577aa14b1e396f34ba7
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-23 09:14:30 +00:00
Jarek Kobus
c1b6685d50 Reuse existing controller when requesting existing diff editor
Change-Id: I01d54f0bd131b8ae7daee74533375920fa544adf
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-11-22 13:36:36 +00:00
Filipe Azevedo
27d155636a Export currentPerspective() from debugger window
Change-Id: Icef2b21e86f678bdd9f10dc26197db97bba6ade9
Reviewed-by: hjk <hjk@qt.io>
2016-11-22 13:25:28 +00:00
Tim Jenssen
8a7f21195a QmlDesigner: improve resetModelSelection code
Change-Id: I09e1fb64b2d3aadcec43beae52d8440ed920c54d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-22 12:33:05 +00:00
Nikolai Kosjar
2b9e9ebbfc Clang: Work around libclang not accepting not existing unsaved files
Feeding libclang with unsaved files (e.g. in-memory generated ui_*.h)
that do not exist on disk leads to regeneration of the preamble on every
parse/reparse/completion and thus renders the clang code model useless.

We could check the existence in the file system for every unsaved file
just before every parse/reparse/completion. Obviously this does not
scale (e.g. qtcreator.pro generates about 200 unsaves files) and would
also slow down the responsiveness of the completion, especially for the
dot-to-arrow correction case.

We could also set up a file system watcher. However, implementing the
"file got created" case is not trivial because QFileSystemWatcher does
not support it out of the box.

Instead, set up a custom include directory and create empty files in it
that represent the unsaved files and pass that include directory to
libclang as the last one. While this fixes the performance problems, it
also comes with at least two problems:

  * Because ui_*.h files are "relocated" to the same directory, two or
    more "foo.ui" in the same session will be problematic.

  * Because of the custom include directory, problems might arise for
    projects that include the ui_*.h as "some/relative/path/ui_foo.h"
    instead of "ui_foo.h". This should be the less common case.

Task-number: QTCREATORBUG-17245
Change-Id: I6e40e87c3ef095086eb22c972dd8c1a6459a8245
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2016-11-22 12:21:14 +00:00
Nikolai Kosjar
b4d6884c25 CppTools: Fix propagating unsaved files
On project loading ExtraCompiler objects are created that might read the
already existing ui_*.h files in the build directory. In this case,
ExtraCompiler::setContent() is called, which will emit a signal about
the modified content.

Now GeneratedCodeModelSupport is a client of this signal and it forwards
the changed contents to the clang code model. However,
GeneratedCodeModelSupport objects might be created later and miss the
initial signal emission, thus leaving the code model unaware of some
unsaved files.

Fix by notifying the code model at construction time of
GeneratedCodeModelSupport.

Change-Id: I7311867ad7f534920357801647bd2d0c82bb4edb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-22 12:21:07 +00:00
Orgad Shaneh
374c0774e1 QmakePM: Fix Build from context menu on subproject node
Change-Id: I80a840c1003e7ff198b8ce1cba7dec86823fedf0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-22 09:11:24 +00:00
Jake Petroules
d7e0708d1a Let qmake handle asset catalog compilation on macOS
Change-Id: I9451a0cd7b15bb6c84147298a4f1fde5d67ddf4d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-21 22:40:53 +00:00
Thomas Hartmann
20c0c381ae QmlDesigner: Enforce Qt Quick import
Not having a QtQuick import does not make much sense and
will lead to undefined behavior.

Change-Id: I1b103b088db1bedc191b9a3dbdeb1e45c87dab85
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-21 18:06:30 +00:00
Eike Ziller
cfaf5735a8 Merge "Merge remote-tracking branch 'origin/4.1' into 4.2" into 4.2 2016-11-21 16:01:38 +00:00
Eike Ziller
0596699dbd Merge remote-tracking branch 'origin/4.1' into 4.2
Conflicts:
	src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp
	src/plugins/qbsprojectmanager/qbsconstants.h

Change-Id: I3800e580faaccdc1dd08da851956ba677d33df51
2016-11-21 17:01:15 +01:00
Thomas Hartmann
c18d3cecf0 QmlDesigner: Setting the current path does not make sense
This should improve the sitation for QTCREATORBUG-17306,
but will not fix it.

Change-Id: I28da773da4f4a4e438e959d44a924ea90b1e73fb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-21 15:57:54 +00:00
Tim Jenssen
bb4b0c8af8 QmlDesigner: hide tabwidget for one central widget
Change-Id: Icafd8cffec042b09993aeea40a86ddd7eb349b0b
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-21 15:43:51 +00:00
Jarek Kobus
2144fb5949 Move diff calculation to the separate thread
It doesn't freeze creator anymore.

Task-number: QTCREATORBUG-14255
Change-Id: I3d06ea7a848e321c6072e00a73b96e9ea9770b6a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-21 15:43:03 +00:00
Friedemann Kleint
4c29f5fc8f Add support for Visual Studio 15.0 (MSVC2017)
Extend ABI by flavor and add look-up.

As with each major update, rewrite the the MSVC toolchain
autodetection.
Previously, the detection looped over the entries in "VC" registry
section and checked in the "VS" section whether a valid installation
belonged to the entry. MSVC2017 no longer has an entry in the "VC"
section.
Introduce a struct describing the installation including version
number and rewrite the loop to run over the "VS" section and retrieve
the VC path from the "VC" section only for versions <= 14.0.
Also, the various .bat files for the target architecture are
now in a single folder instead of spread around various bin/XXX
subfolders. Introduce an array of structs for the platform that
has the prefix and .bat name and uses the prefix only for
versions <= 14.0.

Task-number: QTBUG-57086
Change-Id: I947edd885c0a379f196440041c07d60cd4244d9c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-21 13:42:49 +00:00
hjk
e7d6f8e514 Debugger: Compile fix after previous change
Change-Id: Ie9b871a7dee7bf886474ff87306ed934c1a67b6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 13:40:46 +00:00
hjk
6de88f7fae Debugger: Add a way to notify perspective about their activation
Change-Id: I5a6189e835aa293341f357c08f1d4b8ca4dd8326
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2016-11-21 13:10:26 +00:00
David Schulz
a33b9317b8 Debugger: Exclude special types containing '<' or '>'...
... when looking for template arguments.

Change-Id: Id4500d92bd9773e09d592c2afefaad415ca92bcf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:48:31 +00:00
David Schulz
edf7ceb790 Debugger: Add public pointer size function
Change-Id: I5f60d1b7eca1c036a00dea92887f37687337627e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:48:24 +00:00
David Schulz
057c07f5b7 Debugger: Adding debug messages to the pycdbext module
Change-Id: Id06c385c999b6d9faf8005e4b8b72d64f1b07f26
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:48:20 +00:00
David Schulz
3943185c25 Debugger: Don't return NULL from cdb python interface
Returning a None type will result in a nicely formated traceback.
Returning Null will just result in an exception that has
to be debugged.

Change-Id: I09ff90923fe0fef25a96c3110156f706f73e8913
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:48:15 +00:00
David Schulz
499bd09615 Debugger: Add symbol name convenience function
Change-Id: I0a922fbc2d9c594026815d81498348106881fb4c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:48:10 +00:00
David Schulz
3f1a7a93bb Debugger: Use type name from symbol
Type names generated from module and type id are sometimes incorrect.

Change-Id: I4bbd4db029e7952703efe09f9beb92f703e400d9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:47:59 +00:00
David Schulz
1ac24ecbca Debugger: Reduce transfer of pointer ownership
Change-Id: Ia3e727e6a16b4242b2bb89c202c9a82c79480598
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:47:54 +00:00
David Schulz
ecb9b2f31a Debugger: Add function to cdbbridge returning the bitsize of a value
Change-Id: I51936f2dd84f451b46afe60b33352dc3c714cc83
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:47:50 +00:00
David Schulz
bc8cfcbc10 Debugger: Remove SymbolGroup dependency...
... by directly accessing the IDebugSymbolGroup.

Change-Id: I2d17b8cd3cec2de8192713415826fd982d693d84
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:47:45 +00:00
David Schulz
3f5eb780ee Debugger: Remove Unstable value lookup
Change-Id: I40f15f8d8ffa96e1e34a83ca4d02d1a65d014afa
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-11-21 12:47:41 +00:00
Thomas Hartmann
a1f4ac4277 QmlDesigner: Remove scrollbar
The images do not exist and scroll bar is not required
in the item library.

Task-number: QTCREATORBUG-17307
Change-Id: Id8f493fdcee97a611d38a8ba896af1d53ed340da
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-21 10:40:27 +00:00
Christian Kandeler
8cac2c58f2 Update qbs submodule
To HEAD of 1.7 branch.

Change-Id: Idf6d30689e5a0a142c812d90fc79e6dc6f6445dc
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-21 10:25:48 +00:00
Orgad Shaneh
6d1d1a4416 Merge remote-tracking branch 'origin/4.2'
Change-Id: I957c22020fbacb2f631220b0cdc7fa16a782798b
2016-11-21 10:25:45 +02:00
Friedemann Kleint
97c9213358 qtcreatorcdbext.pro: Fix architecture detection
Previously, the detection relied on the variable CPU which
is no longer set current versions of MSVC.

Use newly introduced variable VSCMD_ARG_TGT_ARCH (MSVC 2017) or
Platform (MSVC 2015) to detect 64bit.

Task-number: QTBUG-57086
Change-Id: Ie71b73a04af597d5b638fd08171ee9bfb3b4ccb8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-21 07:29:34 +00:00
Robert Loehning
e2d142c7cf Don't crash when Help mode uses WebEngine
Task-number: QTCREATORBUG-17296
Change-Id: I8527c340e2b5af1e7f0b0d1f62ff03cd30c06ff2
Reviewed-by: Michael Brüning <michael.bruning@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-11-19 00:25:38 +00:00
Alessandro Portale
3ab464dffd QmlDesigner: Improve the "export unchecked" icon
Change-Id: I1031d21c535d4a710f1f917e13bec30fb310a8c4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-11-18 18:37:34 +00:00
hjk
8f12ade7bd CppEditor: Compile fix after 3b1308bb
Change-Id: I55f8f175e8cd49b455b94872770a7bd02baa7492
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-18 13:41:29 +00:00
Friedemann Kleint
3b1308bb43 TextEditor: Remove exported class QuickFixOperations
Define an operator << that accepts a raw pointer for the list of
QuickFixOperation::Ptr instead.

Fixes MSVC 17 warnings

src/corelib/tools/qlist.h(423): warning C4661: 'QVector<T> QList<T>::toVector(void) const': no suitable definition provided for explicit template instantiation request        ]
src/corelib/tools/qlist.h(389): note: see declaration of 'QList<TextEditor::QuickFixOperation::Ptr>::toVector'
src/corelib/tools/qlist.h(423): warning C4661: 'QSet<T> QList<T>::toSet(void) const': no suitable definition provided for explicit template instantiation request
src/corelib/tools/qlist.h(390): note: see declaration of 'QList<TextEditor::QuickFixOperation::Ptr>::toSet'
src/corelib/tools/qlist.h(423): warning C4661: 'QList<TextEditor::QuickFixOperation::Ptr> QList<TextEditor::QuickFixOperation::Ptr>::fromVector(const QVector<T> &)': no suitable definition provided for explicit template instantiation request
...

Task-number: QTBUG-57086
Change-Id: I879511656c39eb7a3eae54ea7daca3eca8ebe8d7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-18 11:47:59 +00:00
hjk
a8697e4716 Debugger: Don't accumulate return value displays
This fixes a regression introduced with d771ba89.

Change-Id: Icc44ef9ad41f9e5cdb3848fae7a1ba8af2626344
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2016-11-18 11:14:49 +00:00
Christian Stenger
1eafa1540e Debugger: Lower kit restrictions for debugging
In some cases it can be useful to be able to debug although not
having a complete functional kit present. (e.g. debugging a
core file having an ABI for which you have a debugger but having
no respective compiler)

Change-Id: Ia2567c8e2dd6783e612802cc08f7767399aaf33f
Reviewed-by: hjk <hjk@qt.io>
2016-11-18 07:12:51 +00:00
hjk
61b408d110 Debugger: Force flushing of GDB output
... after continue and step. Otherwise there would be no reaction
after the inferior gets an external SIGKILL while stopped.

Task-number: QTCREATORBUG-17280
Change-Id: I57933e92194a3320d7aba81055755477f34af382
Reviewed-by: David Schulz <david.schulz@qt.io>
2016-11-18 07:07:39 +00:00
Thiago Macieira
6a061b2a35 Add QDataStream operator<< and >> for Utf8StringVector
It's just a QVector, but let's be explicit.

Change-Id: Ic46ff326a6ba46bc877cfffd148325c9c1354fa5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2016-11-17 22:38:06 +00:00
Marco Bubke
89b3d53b27 Utils: Improve print function for SmallStringVector
Change-Id: I9dc66ddddf380d8e2af057719005f4d14a592396
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 15:07:55 +00:00
Marco Bubke
f11b746e60 Utils: Improve debug output of SmallString
Change-Id: I738ac9d139271b7d154dd39f30ae3c08b5e5b921
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 15:06:58 +00:00
Marco Bubke
19a00f418f Utils: Add const reverse iterators to SmallString
Change-Id: Iefd9d6abafbe38dcb7d3ed9ea200ac3244902433
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 15:06:46 +00:00
Tobias Hunger
591d693d0d CMake: Move code to read CMakeCache.txt into CMakeItem class
Change-Id: Ie5d76a2b50007c80d68b2e97d3339a582afce469
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 13:10:47 +00:00
Jarek Kobus
77c3cbd4f0 Fix updating ui resources after creating new form
Before we have tried to update resources, however
it was done too early and ui file, which
has been created, was not inserted to any project yet.
We were connected to ProjectTree::filesAdded signal
and apparently whenever it is sent the added ui file
is still not inserted to the project, thought
the signal informs about that fact.

Now we connect to every project's fileListChanged() signal instead.

Task-number: QTCREATORBUG-15560
Change-Id: I11883a0d87fdc7c46897cef68466c1038dbaefb8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-17 13:05:14 +00:00
Tobias Hunger
3422e5cded CMake: Clean up more paths in server-mode
Change-Id: Ifd578cbc7516f66ad52cc13faca0ee733dbc7512
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 10:57:23 +00:00
Tobias Hunger
a7aeec22ce CMake: Unify names for important directories in server-mode
Unify names for important directories in the project tree of
server-mode cmake projects.

Change-Id: I6354e0a1cfb71f9038d9110438622c824deedebe
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 10:57:16 +00:00
Thomas Hartmann
6890e4e131 QmlJSCheck: Allow Math. function in ui.qml files
The Math. function like Math.max() are quite useful
to define more complex layouts. Therefore we allow them.

Change-Id: Ia95dcbcc1b8e96c117650dc8643da4a9de0ecdba
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-11-17 10:34:56 +00:00
Thomas Hartmann
85d288e3c3 QmlDesigner: Disable disk cache in puppet
The disk cache time stamp is only accurate up to a second
and there might be .qmlc files from the actual application.

Change-Id: I6ec9cfdda8eb7aba5a630ac577d2cef999a8132c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2016-11-17 10:34:20 +00:00
Jarek Kobus
fd460a11dc Add some missing consts
Change-Id: I1c5122b893e7255237310562fcad16bc53f15fd7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-17 10:31:27 +00:00
Jarek Kobus
8c36249ffa Add missing overrides
Change-Id: I7e27a273044542537423c8f4b9ab5235c3fabc22
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-11-17 10:31:18 +00:00