Commit Graph

43121 Commits

Author SHA1 Message Date
Tobias Hunger
14eafd5dca Wizards: Use C++11 in all qmake projects created by the JSON wizard
Change-Id: Idbe9053514ec94880df2d89a10ebe9bd4d9393b6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-20 15:46:48 +00:00
Ulf Hermann
bd22de47e7 QmlProfiler: Prevent interaction with buttons while loading data
You could trigger invalid states by pressing the recording button
while the profiler was waiting for data to be loaded from the
application or by pressing the "stop" button twice. Now the buttons
are disabled when they don't make any sense. In particular you cannot
clear, change features, filter the display while recording and you
cannot toggle the recording while loading. Pressing the "stop" button
twice will cancel the loading now, similar to what happens if you
first disable recording and then stop while the data is loaded.

Change-Id: Ie5133f4bed76593dedc9763b778a2c5c17187543
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-20 11:43:14 +00:00
Orgad Shaneh
88c5b47e53 CppTools: Minor cleanup in completion tests
* Remove superfluous dot from test file name
* Reuse an existing member

Change-Id: I735dee09ae7ceef4509a4bda87118baaf4d11b01
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-10-20 08:52:20 +00:00
Eike Ziller
7fa6d51942 Fix deployment of qml2puppet
The move to LIBEXEC_PATH broke running the puppet from the packages on
Linux and OS X, because there it cannot find the platform plugin
anymore.
We need to add a qt.conf for it, and because Qt Creator.app/Contents/
Resources already contains the qt.conf for Qt Creator itself, the puppet
must also move to its own subdirectory on OS X.

Change-Id: I8e8cc48c49a01e10c7d7d3cc4c73020195cd5ca9
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2015-10-19 15:07:36 +00:00
Marco Bubke
51ed0da5a9 TextEditor: Add fine control over the color scheme settings
You have seen always all setting but some settings had no meaning
because
only the foreground color is used. Now you can disable this settings so
it
is more clear what you can change.

Change-Id: I0fdd2ac6f40e27b5160a2c54a512289457674dae
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-19 13:10:44 +00:00
hjk
b8ae9fd46d Debugger: Adjust native mixed debugging after upstream changes
Change-Id: I4d137fadd0de2aa346f2f49932faac4ee9ed41e7
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-19 12:40:29 +00:00
Nikolai Kosjar
be1e0f7ec0 Clang: De-duplicate in Messages::registerMessages()
Change-Id: Id3c73249f562abd89de8e76290ea712c2fe7fae1
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-19 09:21:21 +00:00
Nikolai Kosjar
ebce521ef9 Clang: Polish tool tip text for diagnostic
* Set the category apart.
* Show only the disable option and only in debug mode.

Change-Id: If5f65f9bd04c8e37e376a9862035005f4456394a
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-19 09:21:13 +00:00
Davide Pesavento
d3583883a8 Tests: add missing column to tst_fileutils::parentDir testcase
The third column was accidentally removed from one data row in
commit 271794fbc9

Fixes the following fatal error:
QFETCH: Requested testdata 'expectFailMessage' not available, check your _data function.

Change-Id: I4a09df2e044b4dcee1ed2ffc589082a3e2601232
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-10-19 09:00:31 +00:00
Orgad Shaneh
5f0e4e4f76 ProjectExplorer: Remove unused local variable
Change-Id: Ic098ba98864cc1211358d975e4d14829d92d2ac0
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-19 08:44:13 +00:00
Tobias Hunger
0cda81a99c Snippets: Add license snippets
Change-Id: If3b3d9b4f602848ffe39c72a90d4b0f1275eb828
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-19 08:43:27 +00:00
Eike Ziller
e3f770a50c iOS: Refactor iOS tool chain and kit auto detection
It was all done in one huge, unreadable method.
The refactoring along-side fixes the following:

- iOS tool chains were demoted to manual at start up because there
  was no tool chain factory that would auto detect them
- a QTC_CHECK failed because single Qt Versions could appear multiple
  times in the architecture->Qt version map, because each architecture
  is present in two abis (32-bit and 64-bit)

The refactoring also removes unneeded automatic conversion
from non-iOS Qt version to iOS Qt version, and removes considering GCC
toolchains (which were not handled anyhow, because only Clang
"platforms" were considered).

Change-Id: Ic9ae797646f159ed45959fc797990aa98f2136fb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-19 07:20:53 +00:00
Tobias Hunger
09bc8af645 ToolChainManager: Fix autodetected toolchains going manual
The recent optimization to avoid running toolchains during startup
has broken the registration of tool chains with the manager, resulting
in auto-detected toolchains being demoted to manual in one run and
then getting removed in the next (at which point a new set of toolchains
got auto-detected).

Change-Id: I175c7344238df1bcb36a8b4949f0f0faf8828116
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-16 14:20:40 +00:00
Niels Weber
52e35e7e9d Fix compilation
Was broken after bdb0f264d2

Change-Id: I3581da9d27f9609c2b3e4f74443ee59feef739dc
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-16 11:17:20 +00:00
Montel Laurent
bdb0f264d2 Allow to clear search string
Change-Id: If88d74755e9f95d2aabd2aa770c9bdbb5bd98309
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-16 10:41:17 +00:00
Orgad Shaneh
72246866c3 SearchResultWidget: Style cleanup
* Use Qt5-style connect
* Fix spacing around braces
* Remove empty destructor

Change-Id: I38373aaa45e84e8d8219aea2d672df0f817d8d65
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-16 08:26:48 +00:00
Nikita Baryshnikov
bab7c80976 SearchResultWidget: unclutter namespaces
replace Q_ASSERT with QTC_ASSERT and be more consistent with asserts

Change-Id: I81161a1ee82218ef23f62cc90e52587c342e2e22
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-16 08:26:42 +00:00
Niels Weber
9dd457a678 Debugger: Fix a warning
Followup to 01006580c1

Change-Id: I4acd54472df03c019493426303d5a52a9902f9fd
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 08:17:49 +00:00
Tobias Hunger
92b34380fb ToolChainManager: Use Qt5-style connects
Change-Id: I68bebe6f1554e48513f130537434a1f7e22a0197
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-10-16 07:16:58 +00:00
David Schulz
3f181280ed cdbext: adjust GDMI item names according to the ...
change 525c33f999

Change-Id: I778ef6893de24748d1d515e43937368cbe033683
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 07:03:50 +00:00
hjk
e696b6af08 Debugger: Work around libstd++ crash
Task-number: QTCREATORBUG-15183
Change-Id: I7f0d00c984bb19f025b5e2f576017e0a982ed79a
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 05:59:26 +00:00
hjk
01006580c1 Debugger: Go back to QVector in GdbMi
We are overstretching std::vector implementations in some
cases of partial self-assignment.

Task-number: QTCREATORBUG-15183
Change-Id: I144e9e34df117286a7eef6403e29054d530cacbe
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-10-16 05:59:04 +00:00
Nikolai Kosjar
a065f45664 Clang: Process diagnostics as soon as possible
...on editor open.

Change-Id: I02eb7092facedef9be5bf7b523ad840ebf1ecca9
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 16:28:32 +00:00
Daniel Teske
a027cbcd70 Fix infinite QWaitCondition:wait() in discardFile*()
The original idea was that we would passively wait for another thread to
clean up the locker, hence the check-sleep-loop. This was all dandy,
except for *also* using the wait condition: this was a) mostly pointless
(it would just avoid a few iterations of the wait loop) and b) buggy (if
there were no other waiting threads, the actual reader thread wouldn't
know that it needs to wake somebody up).
As the passive waiting is ugly, we instead fix the use of the wait
condition, and do away with the loop.

Task-number: QTCREATORBUG-15181
Change-Id: I477dbe7cda49ceca9aa387910d94ad763a43012b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-14 16:00:21 +00:00
Eike Ziller
7c2761f1f0 Windows: Also deploy clang.exe
We need both clang.exe and clang-cl.exe for mingw and msvc

Change-Id: I2f8883f2ac42636699d4326d4d5f044b34b7d9ba
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 15:47:21 +00:00
Orgad Shaneh
63d543055e MingwToolChain: Avoid double call of hostAbi()
Change-Id: Ie10bf134841b747b219756f6b986fe49eb443f52
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 14:22:32 +00:00
Nikolai Kosjar
f18bc981d5 Clang: Fix reloading documents
Fix the following use case:
 * Open foo.h
 * Open foo.cpp
 * Change both files externally (e.g. git checkout) e.g. by adding a
   function (declaration + definition)
 * Confirm the reload dialog in Qt Creator
 * The added function in foo.cpp gets a diagnostic that it's out of line
   although foo.h is also reloaded.

TextDocument::contentsChangedWithPosition() is also emitted during a
reload. However, the revision of the document at that point is not yet
updated. This led to an out-dated copy of the unsaved files in the clang
backend.

Change-Id: I70580d32bb7a34dc43356dc05019cc18addf950e
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 13:30:11 +00:00
Tobias Hunger
48e4b82e1a MingwToolChain: Do not use uninitialized value
Change-Id: I0b57382e75b5cc71018009907e1b8e9bfdd5e238
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 13:12:06 +00:00
Tobias Hunger
18c8fefc8d MiniProjectTargetSelector: Merge palette setup code
Change-Id: I899ba5e7b7d2a128580f302937274e617c084cf6
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-14 12:44:10 +00:00
Tobias Hunger
23ab77bfa8 KitInformation: Improve handling of styling
Make the styling work better, especially when the kit information
is displayed in the MiniProjectTargetSelector.

Change-Id: I562c1c92942afbfec1b960740a326c4dd002864f
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-14 12:44:06 +00:00
Eike Ziller
9b52d193a3 Add Utils::filtered as a wrapper around std::copy_if
Change-Id: I4a189581a4a7f42f880c47b91372d7e96d50655e
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-14 12:25:34 +00:00
Tobias Hunger
a447645422 AbstractEditorSupport: Simplify licenseheader handling
Change-Id: I6bad3870b14066716fff5adc2a03b18f1840b6c7
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-14 12:05:30 +00:00
Tobias Hunger
fe8e14eb4c Snippets: Make it possible again to escape $fields$
Update the unit tests while at it. Add some new tests, rearrange
existing ones.

Change-Id: Icc2db644f8fe9752c1bf8e66b134738c27b0fb25
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-14 12:05:20 +00:00
Tobias Hunger
8641277121 TemplateEngine: Do not append trailing newline
Change-Id: I99731186ae1e14c79728ebc6c74a5b842cf25069
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-14 11:59:24 +00:00
Tobias Hunger
ccd3bf0b19 TemplateEngine: Fix indention
Change-Id: I9eaaac11af938bcd3e96687dec435303448c0749
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-10-14 11:59:18 +00:00
Orgad Shaneh
3389e5f969 ProjectExplorer: Do not resolve symlinks when opening a project
Task-number: QTCREATORBUG-15145
Change-Id: I71ec43fa8cb0073100c988b6aa8a8a59a254af0c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 11:58:46 +00:00
Tobias Hunger
981f7411d3 PathChooser: Add interface to set ok/error color for lineedit
Change-Id: I4fcd72e8b9281d1cdb404ccc268c453417ec35db
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:44:46 +00:00
Tobias Hunger
2e8332088b FancyLineEdit: Remove setTextColor
It is unused now.

Change-Id: I6627754f1f49e18767955a4647270638ec9fad4b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:44:39 +00:00
Tobias Hunger
e9370ccf83 Gerrit: Add ProgressIndicator
Show a nice spinner while waiting for data from Gerrit.

Change-Id: Ia35d7408e6a65126d40e8cff5278a442f4b5c760
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 11:16:08 +00:00
Tobias Hunger
2a014eaee6 Gerrit: No need to subclass FancyLineEdit
Change-Id: I9b25c1e0a72e8a7e5ba268e539cf71f5b28d420b
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 11:08:50 +00:00
Tobias Hunger
0aad5fac70 FindToolBar: Update to FancyLineEdit changes
Change-Id: I2a1b0440e0cbf511f7e73057bb9fe75e3a01a695
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:07:52 +00:00
Tobias Hunger
b0bb2d3422 FancyLineEdit: Allow to set the ok color
... and not just the error color.

Change-Id: I7fabd85404193ca3ee54d27025ca952995a0840f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:04:55 +00:00
Tobias Hunger
1f8b9077ab FancyLineEdit: Use static initializers
Change-Id: Ifd3eee165b03ae6e4868911d039f503d9bbd13b8
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-10-14 11:04:43 +00:00
Orgad Shaneh
941d23a206 ProjectExplorer: Avoid execution of g++ on startup
Change-Id: I53719f58714b3dd0fcf21d8c7b1deb8d86190408
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-10-14 10:47:49 +00:00
Ulf Hermann
f2ca9eb166 Show tool name in warning about wrong build mode
Change-Id: I3fd8daf5ffea9708adf173b4685b2b8235c89e54
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
2015-10-14 10:18:57 +00:00
Nikolai Kosjar
c45f08cdae Clang: Rename isProjectPartValid to isProjectPartLoaded
Change-Id: Ib20700ebb7142cfa9e75edff3b21410fd3bdab05
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 10:12:08 +00:00
Nikolai Kosjar
143983a857 Clang: Tests: Move test data into test/data
Change-Id: Ib33cec849ffd575d8b0bf87c6969170af4cd30d3
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 10:11:26 +00:00
Nikolai Kosjar
08bf761834 Clang: Tests: Clarify test names
Change-Id: Ic27c4f9473fc215aee7aa6acdb0496388be2360d
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 10:11:15 +00:00
Nikolai Kosjar
7b631d484d Clang: Add testUnsavedFilesTrackingByModifyingIncludedFileExternally2
Same test as the first version, but without having the header open in
the editor. This one is also skipped since we can't make it reliable
without adding extra messages.

Follow up changes will improve the names of both tests and will make
them both reliable so that the can be activated again.

Change-Id: Ie3ca52e01aedd612bc07e7429dd64d92eb1a23b5
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 10:11:08 +00:00
Nikolai Kosjar
77270648e8 CppTools: Fix dead lock on project unloading
...with the clang code model.

In updateProjectInfo() we lock the project mutex and emit a signal.
However, the correspondig slot in the clang code model will call back
into a function that needs to lock the mutex, too:

    CppTools::CppModelManager::workingCopy // dead locks here
    CppTools::BaseEditorDocumentParser::InMemoryInfo::InMemoryInfo
    ClangCodeModel::Internal::ClangEditorDocumentProcessor::run
    ClangCodeModel::Internal::ModelManagerSupportClang::unregisterTranslationUnitsWithProjectParts
    ClangCodeModel::Internal::ModelManagerSupportClang::onProjectPartsRemoved
     ...
    CppTools::CppModelManager::projectPartsRemoved
    CppTools::CppModelManager::updateProjectInfo // emits here

Fixed by emitting the signal after releasing the mutex.

Change-Id: Id3f3cd22b0604f343ada56ea13c26f0dc1a75bd6
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-10-14 10:10:47 +00:00