aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
Commit message (Collapse)AuthorAgeFilesLines
* Fix reference on temperary valueTim Jenssen2018-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old code at Context::lookupReference took via Context::ptr() a temporary QSharedPointer as an argument into a reference member which is deleted just after ReferenceContext is constructed - changing that to a general member copies this temporary QSharedPointer and fixes the problem which was there since always and that this was not crashing before was just luck. class ReferenceContext { public: ReferenceContext(const ContextPtr &context); private: const ContextPtr &m_context; }; QWeakPointer<const Context> _ptr; ContextPtr Context::ptr() const { return _ptr.toStrongRef(); } const Value *Context::lookupReference(const Value *value) const { ReferenceContext refContext(ptr()); return refContext.lookupReference(value); } Task-number: QTCREATORBUG-21510 Change-Id: Ic49a0597763fb8be65feca6f24fec105d531d6ab Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> (cherry picked from commit 4d74cbb945d53991ae844922b532987b513e14e6) Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Cdb: fix std vector dumper in non python dumperDavid Schulz2018-10-111-1/+1
| | | | | | | Task-number: QTCREATORBUG-21074 Change-Id: Iae78195b5bed1a6baa4515bf578d4f0b004eddae Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Fix file saver for delete locked filesDavid Schulz2018-09-261-7/+20
| | | | | | | | | If we can not delete a file via the ReplaceFile operation, because we ca not get the DELETE access right we still can try to replace it contents. Task-number: QTCREATORBUG-7668 Change-Id: I8804133a0e118518307f33976b821d5b2fdc9b8d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Fix incorrect grammar in 'does not exists'Kai Koehne2018-09-212-3/+3
| | | | | | Change-Id: I790d9bbdfc170808ff66e70be0f81d1c292c0bcb Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* qmljs: fix bug in reformattingMarco Benelli2018-09-111-1/+4
| | | | | | | | | Reformatting multi-line comments caused, in some cases, the deletion of the preceding line. Task-number: QTCREATORBUG-21036 Change-Id: I9bf9627e5992e9821c0dd62a13601a3ca6367e65 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Tracing: Properly signal destruction of non-owned propertiesUlf Hermann2018-08-301-10/+44
| | | | | | | | | | | | | When the zoomer, model, or notes properties for TimelineAbstractRenderer are destroyed, the QPointers become null, and therefore the change signals need to be emitted, and an update to the widget should be scheduled. If this is not done, clients using the property might keep a dangling pointer in some cache and dereference it later. Change-Id: I63fb657afb8138e9ac54c7d839d4a52271f8f3e8 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Tracing: Wrap pointers we don't own in QPointerUlf Hermann2018-08-281-3/+5
| | | | | | | The notes model might get deleted before the renderer. Change-Id: Ic7b0ee73bd96e63b19e05b1a374baaf28c6f47fc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Tracing: Make notes in TimelineModelAggregator mutableUlf Hermann2018-08-282-6/+27
| | | | | | | | When the notes model is deleted, it becomes null. The notes model belongs to TimelineTraceManager, not to TimelineModelAggregator. Change-Id: I0ef9312620e08c06d31bc65976a887af0ca90c33 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix editing of custom executable pathEike Ziller2018-08-281-2/+11
| | | | | | | | | | | | | | | | When editing the path for a custom executable run configuration, the text cursor would jump to the end every time anything is typed. This makes changing a part inside the text very cumbersome. This happens because the executable aspect registers a "display filter" that transforms the input to native separators. Solve that issue generically for the path chooser by resetting its text cursor position after the path has been set, if the input field has focus. Change-Id: Ic0a178e942da8df1e53b5d90c78a5bf1675865c2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Botan: forward QMAKE_CXX_FLAGS from mkspec to configureJürgen Hunold2018-08-271-1/+1
| | | | | Change-Id: Ibc3922a1aa6f09cca0fd7b4360cf283363cda87d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Botan: Fix build with MSVC from Visual Studio 2017 15.8Christian Kandeler2018-08-172-2/+3
| | | | | | Task-number: QTCREATORBUG-20955 Change-Id: I7413e73137248bb880fad9b369e05e09101987fd Reviewed-by: David Schulz <david.schulz@qt.io>
* Botan: Fix build with compiler wrapperOrgad Shaneh2018-08-171-1/+1
| | | | | | | When using QMAKE_CXX='ccache g++' the build failed. Change-Id: Ic580d4d6561711d4d871ea242151628ad2678f99 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Botan: Fix passing sysroot on macOSChristian Stenger2018-08-171-1/+1
| | | | | Change-Id: I6c55947a637b975950edc93ecf6357369e22a13b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* MimeProvider: Add #include <QtGlobal> for version checkOrgad Shaneh2018-08-161-0/+1
| | | | | | | | It is required with Qt 5.11. Task-number: QTCREATORBUG-20912 Change-Id: I172caf605a95d560d730d8007f2cf623abc90957 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix Botan build on macOSEike Ziller2018-08-132-2/+6
| | | | | | | | | | | Since some Xcode version, running clang directly from the Toolchains directory requires explicitly passing the sysroot to use. If that is not done, inclusion of some standard headers like string.h fails. Change-Id: I640eca41d4132354f1091a7514586cb582e5d05c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Botan: Fix compile if documentation tools are presentChristian Stenger2018-08-132-2/+3
| | | | | | Change-Id: If5adae5840cca75e3a1429922f48ea25b9903dc3 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* SSH: Use Botan2Christian Kandeler2018-08-10499-65031/+75444
| | | | | | | | | | | | | | | | Botan 1.10 will be completely unsupported by the end of this year, so we now target API version 2 instead. Also upgrade our bundled Botan to the latest version 2.7. We no longer check in pre-processed files, but use the upstream sources directly (with unneeded parts removed), employing Botan's own configure script for building. This will make future upgrades much simpler. A script to automate this process is also provided. Task-number: QTCREATORBUG-18802 Task-number: QTCREATORBUG-8107 Change-Id: I5a5ea62cfd30d720b556217142e8b7e06bf49f7e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Environment: Do not leave stray ':' in LD_LIBRARY_PATHTobias Hunger2018-07-261-2/+4
| | | | | | | | | | | A empty path segment in LD_LIBRARY_PATH is *not* ignored and treated as '.' IIRC. So make sure to not leave a ':' in first place of LD_LIBRARY_PATH or set an empty LD_LIBRARY_PATH on Linux. Change-Id: I99ec2e333c6c0205334daf14ac6a2373c6e465ad Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Tracing: Don't rebuild flame graph if there is nothing to seeUlf Hermann2018-07-121-5/+7
| | | | | | | | | | If the root size is 0, none of the nodes will be visible. Don't create them in the first place. Task-number: QTCREATORBUG-20772 Change-Id: I9595daece2d17fe8202b322ffafd361d6fa422fa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Follow symlinks in Environment::isSameExecutableOrgad Shaneh2018-07-111-1/+5
| | | | | | | | | If qmake uses /usr/bin/gcc and the kit is configured to use /usr/bin/gcc-7, and both reference the same executable, there is no reason to warn. Change-Id: Ida79fccb97cffb682c1d85d7fa8888d85bf7d6a4 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Clang: Don't show template type parameters in Class View and Current ↵Ivan Donchevskii2018-07-093-1/+12
| | | | | | | | | | Document filter They do not bring any value. Task-number: QTCREATORBUG-20716 Change-Id: I2876f0e1e3918cb33d133b4a65ccaefd9bd30ac8 Reviewed-by: David Schulz <david.schulz@qt.io>
* Fix issues with saving files on network drives on WindowsEike Ziller2018-06-291-1/+1
| | | | | | | | | | | In these cases the user might not have sufficient rights for ReplaceFile to merge all file attributes and ACLs. Make ReplaceFile ignore these errors. Task-number: QTCREATORBUG-20560 Change-Id: I6980d8af66cb7200c39726f0e7273df83c99bf5c Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Utils: Separate the filter icon from the expand arrowAlessandro Portale2018-06-276-1/+4
| | | | | | | ...so that the filter funnel can be used stand-alone Change-Id: Ic8675954edd4234f84de8caffedd1a67b67b2edd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* VcsCommand: Block auto reload while a command is runningOrgad Shaneh2018-06-272-0/+2
| | | | | | | | | | | | | Git rebase is executed in the background, and it can change a file multiple times in a short period. If we reparse a file while this happens on Windows, Git fails to replace it, the rebase action fails and the repository becomes unstable (remains with a modified file). See discussion at https://github.com/git-for-windows/git/pull/1666 Task-number: QTCREATORBUG-15449 Change-Id: Iba40a770a1df2dfff0dd1c874c491dfbe1cceb58 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use C++11’s override and remove virtual where applicableAlessandro Portale2018-06-276-13/+13
| | | | | | | | Fixes warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I4b8b8ecce028dfd051fe14984b40115e92057a40 Reviewed-by: hjk <hjk@qt.io>
* qmljs: Use C++11’s override and remove virtual where applicableAlessandro Portale2018-06-264-121/+121
| | | | | | | | Fixes warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I17955fd0fdb052678228f1bda32cd8d3b4298998 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Fix Qt Creator build with ClangIvan Donchevskii2018-06-202-8/+15
| | | | | Change-Id: Id607170961db5b1919b316293a96ae3330216377 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* QmlDebug: Robustify packet protocolUlf Hermann2018-06-192-20/+39
| | | | | | | | | | | | | | The packet sizes need to be explicitly little endian. So far the protocol would fail if the endpoints have different endianness. Furthermore short reads or writes from the device should not crash the application. We translate them to a protocol error now. It's disturbing that no client cares about protocol errors right now, but that is material for a different change. Change-Id: Ibcbb170150042cc15a0c3d5d65d5df8365d7fdf9 Task-number: QTBUG-68721 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* QmlDebug/QmlProfiler: Fix integer range checksUlf Hermann2018-06-191-7/+3
| | | | | | | | | | | | | The packet protocol should check if the number of bytes to be read is positive. The check in QmlTypedEvent is supposed to happen before we cast the number to the more restrictive type. Furthermore, if subtype doesn't fit the range constraint, we don't have to do anything at all as the default rangeType is already set before. Change-Id: I45006f8dd752787d59960948b222148d78509aba Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Utils: Move common positionInText function to Utils::TextIvan Donchevskii2018-06-192-0/+10
| | | | | Change-Id: I5d74a73058ca457b0fb3f13eaf945f224d5699fb Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Tracing: Handle mouse events in FlameGraph QQuickItemUlf Hermann2018-06-183-27/+65
| | | | | | | | | | | | Having an additional MouseArea as child of a ScrollView or a Flickable is not well defined and leads to inconsistent behavior on different systems. We can easily catch the relevant events in the FlameGraph item itself. Also, don't redirect the typeSelected() signals through the model. They don't belong there. Change-Id: I77c17977b5a51d57ccd2ef880d3d6c6a604b7f78 Task-number: QTCREATORBUG-20573 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove a few redundant occurrences of 'virtual' and 'override'Alessandro Portale2018-06-181-5/+6
| | | | | | | | | | | warning: 'virtual' is redundant since the function is already declared 'override' [modernize-use-override] warning: 'override' is redundant since the function is already declared 'final' [modernize-use-override] Change-Id: I9036a0dc88ed70c4f6e37b916bb24ff65074863d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangSupport: Refix GCC warningOrgad Shaneh2018-06-151-1/+1
| | | | | | | | | Was fixed in 351f355b69632038f996d2d7039903d10f82c003, refined in 956e6f3a97217acc8f4630e3e681fde1d0cccc51 and re-introduced in 9c4bfbe20a14cd671c9a9200055807c09ad89f3d. Change-Id: I38621524ea650625c5636471463d394d0f6f0fa1 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use built-in follow symbol for virtual methodsIvan Donchevskii2018-06-152-7/+7
| | | | | | | | | | ClangCodeModel currently does not provide a list of overrides. Therefore it makes sense to use ClangCodeModel result for virtual method only if built-in code model does not find anything. Task-number: QTCREATORBUG-20584 Change-Id: I5b4fac7974f990e741d3438ab61827670a8ce8d8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Fix painting of clear buttons in history completer popupEike Ziller2018-06-141-15/+42
| | | | | | | | | | | We did set our own delegate, but QCompleter overrode that with its own when setting the popup widget. So we have to override it after setting the popup widget. Also fix the icon painting on HiDPI screens. Task-number: QTCREATORBUG-16037 Change-Id: Ibd06e945c75f2bceb02c0b5a23a9810d83b4b5e1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* GlslEditor: Fix crash in function hint proposalChristian Stenger2018-06-082-7/+3
| | | | | | | | | | | | | | | | | | | The function hint proposal gets filled with pointers it does not own. It does not notice when these pointers will get deleted or modified, but as long the hint is displayed it tries to access them. If the document gets modified and the gls parser tries to update the document's AST these pointers might vanish. Only use the needed information on the proposal's side to avoid null pointer access. Trade off: updating the proposal hint of declarations and definitions when document changes does not work on the fly Task-number: QTCREATORBUG-20570 Change-Id: I20253e92e1ca9822b1fc1f327c5c5e16b4fd91be Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Clang: Do not duplicate operator entriesIvan Donchevskii2018-06-061-0/+8
| | | | | | | | | | Do not show the same operator twice in symbol outline and current document filter. Extract common checks to TokenInfoContainer class. Change-Id: I3b48aa949d678564c952a71f650b7ba601570fa2 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* QmlProfiler: When retrying to connect, double the timeoutUlf Hermann2018-06-062-8/+7
| | | | | | | | | | | | | | | | If you are retrying, then probably you want it to be more patient this time. Also, tell the user how long we have waited and how long we are going to wait when retrying. In turn, reduce the number of "internal" retries. Retrying 10 times should be enough to determine if the given timeout is too short. This will give us an initial waiting time of 2s, and make the second try 4s. Change-Id: Ibdfe02d041550eb16cadc59cec1b78ce97289b30 Task-number: QTCREATORBUG-20529 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* CDB: Fix compilationOrgad Shaneh2018-06-061-1/+1
| | | | | | | This amends commit f8e88e8ce45a462f27d274c654e31a67032da757. Change-Id: Iec2e553c1e63fa6e25301d04eba0c7ad42f14d66 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Properly name withNtfsPermissions()Andre Hartmann2018-06-052-5/+5
| | | | | Change-Id: I759e702b63f8bed9384ccbfae6345f858e50830b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix compilation issues with C++17Eike Ziller2018-06-058-10/+8
| | | | | | | | | | | | | | | | | | Testable on Linux/macOS by changing c++14 to c++1z in qtcreator.pri. Testable with latest MSVC2017 by setting _CL_=/std:c++17. unary_function, binary_function, and a few other things that were deprecated are removed in C++17. std::string got a non-const overload for its "data" member function, so we cannot create a function pointer on it without specifying its type. Use std::declval instead (though it requires a default constructor for the type). MSVC seems to have an issue with Utils::transform for std::vector (used in Nim plugin), but that looks like a compiler issue. Change-Id: I94f9a93d591d55b610f86fabfc618158927d6221 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Clang: Disable crash recovery in libclangNikolai Kosjar2018-06-051-0/+1
| | | | | | | | | | | | | | | | | ...because 1. We already run in a separate process. 2. It's not entirely clear in which state we end up after a crash, except for: 3. A "crashed" translation unit won't be freed, even when calling clang_disposeTranslationUnit(). This avoids undefined behavior within clangbackend and accumulated leaking memory in the long run. On the other side, crashes within libclang will crash clangbackend now, too. Change-Id: I0789c52db08ace2f7e181e3b7bdfc9f595f75e8d Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Disable internal threads in libclangNikolai Kosjar2018-06-053-0/+17
| | | | | | | | | | | | | | | | We already run all operations in threads to avoid blocking, there is no need to start more threads within libclang. Before this change, a reparse would trigger 3 threads to start: 1. clangbackend: Utils::runAsync() for the job 2. libclang-internal: thread for reparse 3. libclang-internal: thread for annotating tokens (highlighting) Ensure that we use the same stack size for our threads as libclang was doing internally. C++ parsers usually have higher stack size requirements. Change-Id: I2f67602ddfbf77ea2c69144b56acf64ba08041f6 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* RunExtensions: Support specifying thread stack sizeNikolai Kosjar2018-06-041-14/+78
| | | | | | | | | | | | ...with runAsync(). The stack size cannot be changed after starting a thread, so specifying the stack size with a pool does not make sense. However, starting with Qt 5.10 a stack size can be specified for the whole thread pool, if needed. Change-Id: I09eded606321388c779f762b77de6223081609fe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clang: Clean up some IPC namesNikolai Kosjar2018-06-0448-342/+362
| | | | | | | | | | | | | | | | | This is long overdue since some names were simply wrong and/or misleading. Also, some of the old names were long enough to almost get crazy. The renaming starts from ClangCodeModelServerInterface and ClangCodeModelClientInterface and affects usages and related functions. For the ClangCodeModelServerInterface, categorize the messages in - messages that require a response (request*) - notification messages (the remaining ones) Change-Id: I5342ed8e0d87404ee72f3c3766fd8ef7505defb1 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
* Clang: Use follow symbol result from clang when global failsIvan Donchevskii2018-06-042-7/+57
| | | | | | | | | When built-in code model fails to follow symbol under cursor fall back to the clang result even if it only follows to the decalration. Change-Id: I22d8c5fee6ab7594b1d1b7ce8104414db28383c7 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* CppTools: Use cursor range for better outline navigationIvan Donchevskii2018-06-041-0/+5
| | | | | | | | | | | | | | Clang provides cursor range for each declaration in symbol outline. Use that information to search for more accurate correspondence between a cursor position in editor and an entry in symbol outline. For example skip indexes with not matching ranges to prevent pure declarations from automatically become parents of everything coming after them. Change-Id: I0ef95c26772050cd6655e830288c46118aba38bb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* QmlProfiler: stop trying to connect when the application quitsUlf Hermann2018-06-042-0/+6
| | | | | | Change-Id: I3b33ced218320a19fd4e4e834093c0f3b67a8cba Task-number: QTCREATORBUG-20499 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Tracing: Fix layout of RangeDetailsUlf Hermann2018-05-312-5/+7
| | | | | | | | | Only calculate the minimum width once all the children have been positioned, round up the label width, and disable elision on labels. Change-Id: Ia0ff6d5a08af2a5ceefd825fbe487a1d9969967d Task-number: QTCREATORBUG-20502 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Tracing: Don't change visible features on clearing and replayingUlf Hermann2018-05-311-2/+0
| | | | | | | | | | | | | | This used to be important for the mockup in the Timeline, but as the mockup looks just fine with all available features visible, we can drop it. As TimelineModel::clear() clears the "hidden" flag, we have to restore that one on initialize(), though. As a side effect the visibility settings are retained across profiling sessions now. Task-number: QTCREATORBUG-20503 Change-Id: I1512ab7e494ed79d20e2097d68f8494990cfecbb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>