Commit Graph

44349 Commits

Author SHA1 Message Date
Orgad Shaneh
b14d9c00ff GenericPM: Use Qt5-style connects
Change-Id: Ia94373846f0125a42686d6ed69b3111762b00c04
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-29 11:46:07 +00:00
Orgad Shaneh
b6bc52065c QmlJSEditor: Minor cleanup
Remove unneeded variable, and connect directly to member functions.

Change-Id: I2c5077676fc8d3f975d03a71b3e566b692e6b7c6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-29 09:05:28 +00:00
Orgad Shaneh
943c76f4ab AutoTest: De-slot and complete Qt5-style connects
Change-Id: I013b42523f163e123a0cee85f9d232815ad284e3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-29 09:01:28 +00:00
hjk
2a104dcfe7 Debugger: Consolidate icon storage handling
We settled now on global objects being fine for the purpose
in Core and ProjectExplorer, so there's no point in using
something more fancy in the debugger.

Change-Id: I72e45f398c09d22894419c274dfbea77da0fc153
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 14:28:01 +00:00
hjk
5199f84f60 Debugger: Clean up debuggerengine.cpp
Some leftover stringfreeze workaround, plus QLatin1*.

Change-Id: I5e143af5cda64cb29b7769174187fc86185a89cb
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-28 14:07:09 +00:00
Tobias Hunger
a721a6f0c9 Qmake: Add Qt:QMAKE_SPEC and Qt:QMAKE_XSPEC expandos
Change-Id: Ice7e751609503a55ebcd8a488e42feecd0a293c0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 14:03:41 +00:00
Tobias Hunger
031bfa6711 Qmake: Update description of Qt:QMAKE_MKSPECS expando
Change-Id: Id955967e57c12839dec5a54511662ec92f1e43e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 14:03:24 +00:00
Thomas Hartmann
8e1e987dd5 QmlJS: Do not try the canonical file path
This is a real bottle neck on Windows
and I do not know of a case where it is required.

Change-Id: I99ebf3bfdd22cfb0ed82d6d39eeb83f079f654d6
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-06-28 13:23:26 +00:00
Thomas Hartmann
2ac7300f0e QmlDesigner: Fix crash in tests
In the tests we have cases with no rewriter attached.
We warn in these cases.

Change-Id: Ibc89ff501bf6d48ed3a2f230ee6e1afda5d4d06c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 13:23:16 +00:00
hjk
4d9f79964d Debugger: Make RegisterModel a LeveledTreeModel
Change-Id: I59e7df86e24f4be5c2c69313883fdc182f3071d2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 12:10:34 +00:00
hjk
c487217771 Debugger: Use a typed root item in ThreadModel
... and remove casts where possible.

Change-Id: I10305efbe336de7aa5efdb73a52c5f89cd2d089e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 12:09:41 +00:00
Eike Ziller
ccc46bbe46 Fix crashes with (Runnable|Connection)::is<T>()
Another regression of 3f11ef9216
Default constructed Runnables/Connections have zero d pointer.

Task-number: QTCREATORBUG-16507
Change-Id: I230b661eba4c408a353a711f93f3163160980793
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-28 11:56:10 +00:00
Christian Stenger
06b2df0e27 QmlJSEditor: Fix compile with Qt5.5
Avoid using functionality introduced with Qt5.6.

Change-Id: Icfa4eeb547b651a19aa745b5de1cb413f9b6b4ef
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-28 11:53:04 +00:00
Thomas Hartmann
0a3f596599 QmlDesigner: Fix regression caused by semantic check
States can of course contain PropertyChanges.

Change-Id: Ie78be1db58c6820a49356b1cd70102e10211030b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-28 11:49:16 +00:00
Nikolai Kosjar
46840046df Clang: Honor fixits own locations
...when showing the refactoring marker and generating the quick fix
operations.

Opening main.cpp

  main.cpp:
   #include "file.h"
   void f(char *s) { foo(s); }

  file.h:
    // significant line 1
    // significant line 2
    // significant line 3
    bool foo(int fd);

led to

    SOFT ASSERT: "textBlock.isValid()" in file
    clangdiagnosticmanager.cpp, line 205

and a misbehavior when applying the fixit from the tooltip.

We take the line of a diagnostic to display the fixit marker if it has
any fixits. But the (child) diagnostic might be issued for an other file
(that's what happening here), so better take the line of the location
where the fixit is meant to be applied.

Same applies for generation of the quick fix entries.

Change-Id: I48d38420b285d2d2f86e3faa2319513aa8b47848
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-28 11:08:08 +00:00
Eike Ziller
9cf3e30307 Merge remote-tracking branch 'origin/4.1'
Change-Id: Ic8d82172a97bdf1dbf3d047157cc2c8d853f35cc
2016-06-28 12:13:39 +02:00
Eike Ziller
69fa7a8ffb Merge remote-tracking branch 'origin/4.0' into 4.1
Conflicts:
	src/plugins/projectexplorer/runconfiguration.h
	tests/unit/unittest/unittest.pro

Change-Id: I3d327b1198df2a7e9268916af9624ce5d21195df
2016-06-28 11:42:03 +02:00
Tobias Hunger
8777f4b9b9 Qmake: Add a macro expander to get the currently configured mkspec of a kit
Change-Id: I97cd6f47c20867277ed7612a0cf5a179dedd7501
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-28 09:17:41 +00:00
Tobias Hunger
703c410085 CMake: Only start parsing when creator gets focus again
Rip out QFileSystemWatcher and use Qt Creators IDocument for file
watching instead. The latter properly delays any action till creator
gets focus again.

Task-number: QTCREATORBUG-16354
Change-Id: Ibb71963416b09712a80ee95347425550453b7fd4
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-28 09:10:02 +00:00
Tobias Hunger
d8ed91c44f CMake: Add per-cmake option to not automatically run cmake
Task-number: QTCREATORBUG-15934
Change-Id: I54fdb505a451fb269c3747a370c8dfd7043c6c9d
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-28 09:09:10 +00:00
Orgad Shaneh
7609e56ee3 QmlJS[|Editor|Tools]: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I56550546b341d486d321329e9a90b9369d56af40
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-06-28 08:47:26 +00:00
Eike Ziller
090c106929 Fix Ctrl+M (bookmark) in editor when help mode is visible
For external windows we need to separate the contexts in which help
mode's "add bookmark" and editor's "toggle bookmark" are present.

Task-number: QTCREATORBUG-16286
Change-Id: I2a7a28c75dc53e1dd0b21c0a8833bd4594d5afad
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-28 07:52:03 +00:00
Nikolai Kosjar
d63e27d877 CppTools/Clang: Announce only removed project parts
...and not all projects parts of a project if it is closed.

Re-produce with:
  open a project A with subdirs (e.g. qtcreator.pro)
  open a subdir project from project A (e.g. cppeditor.pro)
  close project A
  --> The project part representing the subdir is announced as removed
      although it is still open.

The clang code model was the only affected user - affected translation
units were not parsed/updated anymore
("ERROR: ProjectPartDoesNotExistMessage").

Change-Id: Ia79341ce201e3b4aefff9f597920dbc6f7d67634
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-06-28 07:48:18 +00:00
Orgad Shaneh
7d31cb0e18 Debugger: De-slot
Most Qt4 connects are gone.

Change-Id: Ie74cfb11fc4b4c531f9e22c95a4d18336e1c29e8
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-28 06:20:21 +00:00
Orgad Shaneh
fc59423f2f Debugger: Mark handleResponse as Q_INVOKABLE
It is used in invokeMethod

Change-Id: Ic4c1d69efefc41069f36be4cf94b06efdc265b11
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-28 06:20:09 +00:00
hjk
cd7886a7b3 Debugger: Remove string freeze workaround
Change-Id: Ifd9f89c0d3b5c060af28bdb29e93a5b95f6dc9cd
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-06-28 06:16:12 +00:00
Marco Bubke
01316c28f2 Clang: Print message if message is lost
If there is a message counter mismatch it is very helpful to get message
content.

Change-Id: I4ea2526bd4b72010627e99de08ff9a8e64ca3d02
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-27 14:55:01 +00:00
Tobias Hunger
0d4150bda9 Qmake: Do not turn a CONFIG variable with spaces into several
When e.g. examining 'CONFIG+=foo bar' Creator would turn that into
CONFIG+=foo and 'CONFIG+=foo bar', which seems wrong to me.

Task-number: QTCREATORBUG-16492
Change-Id: I37b83f1e8415d421abb2df7a9466651bff502d17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-27 14:05:20 +00:00
Tim Jenssen
fccd50d32b QmlDesigner: small code cleanup
Change-Id: I4cbfa65c5b8481c859081f43893431c0b93b3cd7
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-27 13:31:08 +00:00
Tim Jenssen
b9f699f957 QmlDesigner: take the setting into account
This was a regression after the merge of error/warning
dialog.

Change-Id: I6bd9d2e81d118018a40745a98e67b1bff8f84d4f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
2016-06-27 13:30:50 +00:00
Thomas Hartmann
e1f5fd202a QmlDesigner: Propose to open a .ui.qml file instead of .qml
If the project contains .ui.qml files the designer proposes to
open .ui.qml files instead of opening a .qml file.

This encourages to not open the .qml files in the designer.

This feature can be disabled.

Change-Id: I47a877ea72fafb07ebee485b8f22509f6162993c
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-27 13:27:35 +00:00
Tim Jenssen
e12949a38a QmlDesigner: adding openuiqmlfiledialog files to qbs file
Change-Id: Ie652f1bc8b04163befc012e4abd7432d71f4d92c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-27 10:31:41 +00:00
Thomas Hartmann
953ec9867f QmlDesigner: Improve performance of item library
If there are manu components (e.g. 200) in the same directory,
the model was updated for each component.

This patch compresses the signal and therefore reduced the updates.

Change-Id: I80b38df59952dda7e67e258ecd6e5f29d6a036e6
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-06-27 10:20:04 +00:00
Tobias Hunger
8ea167892f RunConfigurationAspects: Clean up includes
Change-Id: Ic838f141956f3aa1f32d90e977dd1e59d22df016
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 09:58:57 +00:00
Tobias Hunger
8501ffbb36 WorkingDirectoryAspect: Expand macros first, then expand variables
Expanding variables includes calling cleanPath on the input. At that
point macros like %{buildDir} need to be expanded already or working
directories like "%{buildDir}/../test" will get turned into "test",
which is not what a user expects to happen.

Change-Id: I61e6604a621f632ddee87766d38ab3c863bdb9dc
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 09:58:33 +00:00
Tobias Hunger
9db6897e55 RunConfigurationAspect: Re-enable macro substitution
Re-enable macro substitution in work directory of run configurations.

This makes it possible to do %{sourceDir} or %{buildDir} again.

Task-number: QTCREATORBUG-16338
Change-Id: Ifff7831bf3aa0078d13185da5f5e7c6a3be2f852
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 09:45:35 +00:00
Eike Ziller
ab30724b00 Merge "Merge remote-tracking branch 'origin/master' into 4.1" into 4.1 2016-06-27 09:44:05 +00:00
Jochen Becher
4b01c6eb69 ModelEditor: Synchronize browser and diagram selection
Change-Id: Idfbf2db98123e00bc3cef13869a0535a35e41f42
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 09:41:34 +00:00
Jochen Becher
3e776dde5e ModelEditor: Zoom with Ctrl + mouse wheel
Change-Id: I2e703345a882f0dbd80a0957d5f28bd203f4f26b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 09:41:24 +00:00
Eike Ziller
07fccfe9f1 Merge remote-tracking branch 'origin/master' into 4.1
Change-Id: I56399e6938a5f5096c0b1a1561a54d34a5c96330
2016-06-27 11:40:35 +02:00
Tobias Hunger
ff66f5c62f PathChooser: Make path/rawPath and fileName/rawFileName more consistent
This moves the fromUserInput that used to be in rawFileName to fileName,
so that fileName produces the same output it used to produce.

Change-Id: Ifb209af3f60d959c3f7119ebfa20f999c5d5f0ca
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 09:22:37 +00:00
Christian Stenger
891899dcd4 Utils: Fix compile for Qt5.5
Change-Id: I4294fb7dd448e74236e085f7a1884ecedd5a5b90
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-27 08:58:56 +00:00
hjk
0ec8fdda5c Debugger: Use TypedTreeItems in RegisterHandler
Saves a couple of static_casts on the user side.

Change-Id: Ib8f70046ae40539813c01e3ff7d790bf7a170bee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2016-06-27 08:56:15 +00:00
hjk
0cfd569038 TreeModel: Add an optional ParentType parameter for TypedTreeItem
... and use it to add a ParentType *parent() function.

Also, de-virtualize the TreeModel::parent(), this flexibility has not
been needed so far.

Change-Id: I0bcf930a0d6b05d5621753a5a8a1f8c3e5017386
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-06-27 08:55:49 +00:00
Tobias Hunger
1b5c46660c PathChooser: Handle things like %{buildDir}/../something
Do not call cleanPath on rawFileName as that sanitizes %{buildDir}/.. to '.',
which is not what is expected for a rawFileName.

Change-Id: I4bb95b33f4c12c79ed0029d5fbf539e113a3774c
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 08:35:58 +00:00
Tobias Hunger
21ef857c7a WorkingDirectoryAspect: Do not reset directory when setting default
Do not reset the working directory when setting the default working
directory.

That update was triggered by setting the PathChooser filename.

Task-number: QTCREATORBUG-16330
Change-Id: I5db846c8cf2a6cadad812e775a8424645b15c7c5
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 08:35:47 +00:00
Tobias Hunger
8e20454158 RunConfigurationAspect: Remove needless initialization
Change-Id: I31be0f58eb376b6ef6085995b11bb513897023c4
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 08:32:28 +00:00
Orgad Shaneh
94e08b9adc Utils: Fix runBlocking
* result is initialized to StartFailed, so after executing, we should
  always set the result, unless previously set to Hang.
  If the process really fails to start, we return earlier.
* Setting m_maxHangTimerCount to INT_MAX is bad, since it is later
  multiplied by 1000 (the original value is in seconds), but still
  remains an int, so we get -1000...

Change-Id: Ie990105894fe223a93ece29df4574592a122f94b
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2016-06-27 08:09:44 +00:00
Orgad Shaneh
9d74b995fb BinEditor: Export BinEditorWidget
Change-Id: I62bfaccc15447118591697fc67d85963388e3978
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 06:46:58 +00:00
Orgad Shaneh
6d6f30285a BinEditor: Rename bineditor files to bineditorwidget
Change-Id: Iaa94238cd6a53db1da8dd28c4bc4b6552a7b493f
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-06-27 06:46:47 +00:00