aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor
Commit message (Collapse)AuthorAgeFilesLines
* TextEditor: fix selection highlightDavid Schulz2020-10-191-1/+2
| | | | | | | | | Also compare the anchor when looking for the selection. Otherwise we might get a selection highlight that expands on adjacent extra selections like code model warnings. Change-Id: Ib8460c1089ed69d14b7a408ca70e7ac1f8642f6e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'origin/4.14' into masterEike Ziller2020-10-062-5/+49
|\ | | | | | | Change-Id: I4ea98cc1c14808afe44030a057f9ff289a57ccfe
| * Editor: Select moved text after drag and dropDavid Schulz2020-10-062-5/+49
| | | | | | | | | | | | Fixes: QTCREATORBUG-24245 Change-Id: I9da52424128825f729d5d20e2c7fd095120477c6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | TextEditor: request assist after trigger char insertedDavid Schulz2020-10-051-11/+21
|/ | | | | | | | | | | ... while proposal is shown amends 23d63dcc8bf318a5fc716b440c286b360b52ed50 Fixes: QTCREATORBUG-24225 Change-Id: Ie935c7c1d4786a4fd3cf338d7f1df52ae28de63b Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Revert "CodeAssist: Avoid pointless completion request after accepting item"David Schulz2020-10-021-17/+0
| | | | | | | | | is replaced by 23d63dcc8bf318a5fc716b440c286b360b52ed50 This reverts commit 44b71f7a1669c1021e19bc1b34aea806a60f65a1. Change-Id: Ib5adaab4a962a54495b48e6b88ab164046526c37 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Editor: Make line spacing adjustableDavid Schulz2020-10-016-85/+196
| | | | | | Fixes: QTCREATORBUG-13727 Change-Id: I3dbc3277795b339bced81dc6c5a048c828183cb6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* EditorManager: Small API clean-upEike Ziller2020-09-302-5/+5
| | | | | | | | | - Move private enum to private header - Add missing parameter to openEditorAtSearchResult - Remove convenience singular close* methods, we have {} nowadays Change-Id: Ic5b6d831a9f506ffee09b89b3358874433d62998 Reviewed-by: David Schulz <david.schulz@qt.io>
* Editor: Skip auto inserted characters with tabDavid Schulz2020-09-292-1/+16
| | | | | | | Fixes: QTCREATORBUG-12641 Change-Id: I9800b939118d1e46d202454a66729cd81d2c08b3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Qt6: Various include, QPrinter, and QFlags adaptationsEike Ziller2020-09-281-4/+4
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: I7aca7d25a063c84d6eec14c2c5789357ce56a7b3 Reviewed-by: hjk <hjk@qt.io>
* Editor: Highlight cmake configure_file input filesDavid Schulz2020-09-281-7/+17
| | | | | | | | | | Usually cmake configure input files have the *.in suffix, so if we can not find highlight definitions for a filename and it has the .in suffix try again without that suffix. Fixes: QTCREATORBUG-24465 Change-Id: I7a132eb407c299eb1670e89e2d043a924aed1ede Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* TextEditor: Add a mechanism to provide dynamic icons and tooltipshjk2020-09-242-10/+49
| | | | | | | | ... to TextMarks more easily by allowing callbacks in addition to fixed values. Change-Id: Ica9e7d54dd1a53a59dc11812857402d0b7594d6c Reviewed-by: David Schulz <david.schulz@qt.io>
* Remove bool return value from IEditor::restoreState()Eike Ziller2020-09-242-8/+7
| | | | | | | | It's never used, and actually there wouldn't be any sensible thing to do with it. Change-Id: Id8a8df18c7db4b98e5abbc034240bb90dc1dcaa9 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-09-232-4/+7
|\ | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/mcusupport/mcusupportoptions.cpp Change-Id: I3fd0d0a6a3ff30bb990da3dc0f78e69f9e1247ef
| * Editor: fix hanging when using invalid printer page rectDavid Schulz2020-09-211-1/+4
| | | | | | | | | | | | | | | | | | | | Some printer seem to return an empty page rect for some configuration which results in an invalide page count and a freezing ui. Do not print anything and return in that case. Fixes: QTCREATORBUG-24110 Change-Id: I42349bc97734e3f6a67502482d2b02959e865665 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
| * TextEditor: allow highlightings in selectionsDavid Schulz2020-09-211-2/+1
| | | | | | | | | | | | | | | | | | If the selection foregound color is undefined do not overwrite the already applied highlighting. Fixes: QTCREATORBUG-24656 Change-Id: Ia125e8e6b9efba73d5a13facc2446a793d59f5c3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
| * Editor: set deleteStartOfLine default shortcut on macDavid Schulz2020-09-171-1/+2
| | | | | | | | | | | | Fixes: QTCREATORBUG-9219 Change-Id: I26f991641efbc914d848591931756666e34c26b7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Snippet: show mangled replacements in snippets tooltipDavid Schulz2020-09-211-25/+53
| | | | | | | | | | | | Fixes: QTCREATORBUG-24317 Change-Id: Ibaeacc13f49a933836ccf9c906309219e3533564 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Core: Allow different highlight colors in search result windowChristian Kandeler2020-09-186-6/+29
| | | | | | | | | | | | | | | | | | ... and make use of that in CppTool's "Find Usages" by assigning different colors to read and write accesses. Fixes: QTCREATORBUG-12734 Change-Id: I067db2c8d693bb2c5be44249931ee4f0269f7e52 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-09-171-1/+5
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmakeprojectmanager/qmakeproject.cpp Change-Id: Ieb1c3e946f11d3c4fa1ee6b5afdf83cc532d8aed
| * Editor: Calculate annotation color based on editor color schemeDavid Schulz2020-09-161-1/+5
| | | | | | | | | | | | | | | | Amends 9182d4eda75033bbbebf50e87e518adc33d499f6 Fixes: QTCREATORBUG-24644 Change-Id: Id34bfbc4ea3d1102835c7c1cf3afa1580dff01d8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-09-143-14/+23
|\| | | | | | | | | | | | | Conflicts: src/plugins/languageclient/languageclientcompletionassist.cpp Change-Id: If12e1c532e5623ef063681309a918e7b51117b1c
| * TextEditor: Use selection format from the settingDavid Schulz2020-09-111-3/+10
| | | | | | | | | | | | | | | | | | | | Overwrites the format generated by QPlainTextEdit::getPaintContext() Amends 9182d4eda75033bbbebf50e87e518adc33d499f6. Fixes: QTCREATORBUG-24479 Change-Id: Ia226a74442dbbdbae42e8da5dee9e4d7399b677c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| * TextEditor: Fix clean whitespace actionDavid Schulz2020-09-082-11/+13
| | | | | | | | | | | | | | | | This is a partial revert of: e7f784ca7393bddb60cbb111d3bdb7cd0e6d122e Fixes: QTCREATORBUG-24565 Change-Id: Iffa149e0f97c315355f211f6ae3856fad08f4f3d Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | TextEditor: Do not invoke auto-completion recursivelyChristian Kandeler2020-09-111-2/+0
| | | | | | | | | | | | | | | | | | It's unclear why that was done, and it threw off the clang code model by introducing an unexpected sequence of events. Fixes: QTCREATORBUG-18676 Change-Id: I4dabb56eb97e18141080c22be324c826202977ce Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: fix text prefix checkDavid Schulz2020-09-081-1/+1
| | | | | | | | | | Change-Id: Ib4b2039fe126fd10e8a5cb8961ccec08c1d1ea7b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | TextEditor: Fix build with Qt6Eike Ziller2020-09-085-10/+9
| | | | | | | | | | | | | | | | Adapt to QStringRef and QAbstractItemView::viewOptions() removal Task-number: QTCREATORBUG-24098 Change-Id: Ia2d446312f68bd60143796284d31f5bba56aa0ed Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: make TextEditorWidget constructor explicitDavid Schulz2020-09-041-1/+1
| | | | | | | | | | Change-Id: I0b2e5b8c09706697efa4c2fbc3bc7483d02f68d3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | TextEditor: use Utils::FilePath as file member in AssistInterfaceDavid Schulz2020-09-044-8/+10
| | | | | | | | | | Change-Id: I3bf9b013b9350411f918efdb9d1a36a2c22bf972 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Core: replace QString with Utils::FilePath to get documentsDavid Schulz2020-09-042-2/+2
| | | | | | | | | | Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-211-11/+14
|\| | | | | | | | | | | | | Conflicts: CMakeLists.txt Change-Id: I799060da2cb299bb0c49a3da3530fad18427a23c
| * TextEditor: Fix remembering highlight definitionDavid Schulz2020-08-191-11/+14
| | | | | | | | | | | | | | | | | | | | | | Amends 6989c9bbeae1403b8c1733bdae784841369cb8ce Since the change above the filename is checked before the mimetype, so we have to save it in the same order. Fixes: QTCREATORBUG-24505 Change-Id: Ib974dc0f69ca56cfd6ee9e34bec238e62f800598 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-141-0/+10
|\| | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri Change-Id: Ibb60b8a7ac531b239bb9c490da843d5cc1a6300a
| * Editor: add log for printingDavid Schulz2020-08-141-0/+10
| | | | | | | | | | | | Task-number: QTCREATORBUG-24110 Change-Id: Ic4fef2e268cf3adf852a3ce7b229cb98356bbc5e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Editor: Validate trigger from snippets xmlDavid Schulz2020-08-144-16/+27
| | | | | | | | | | | | Fixes: QTCREATORBUG-24415 Change-Id: Ic99355220bf1948af8a17d6ce017924eba3fc3ba Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Prepare for QDesktopWidget removalChristian Stenger2020-08-142-13/+4
| | | | | | | | | | | | | | Change-Id: I9aa2eadea16b5795ee2c4e7b21a24f356cfd3b03 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | TextEditor: Make threshold for automatic completion configurableChristian Kandeler2020-08-136-128/+201
| | | | | | | | | | | | Fixes: QTCREATORBUG-19920 Change-Id: Id6be79485b1fb8c2ab4cce2706816949ae5e217b Reviewed-by: David Schulz <david.schulz@qt.io>
* | Qt6: Adapt to removed QMap functionalityhjk2020-08-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QMap::iterator::operator+() was removed in 14090760a8, necessitating extra code using std::next/prev to workaround. QMap::unite is gone, the replacement QMap::insert was only introduced in 5.15. QMap key values need to have an operator==() available. Task-number: QTCREATORBUG-24098 Change-Id: Ic4cf429ab18cad58b1218180de40eb65586afd77 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* | Merge "Merge remote-tracking branch 'origin/4.13' into master"The Qt Project2020-08-131-0/+2
|\ \
| * | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-131-0/+2
| |\| | | | | | | | | | Change-Id: I1c426d95eedd82bd4470a64a9bafd734d23081ac
| | * Editor: Update current argument in function hintDavid Schulz2020-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Notify the codeassistant that something has changed when the function hint widget is visible and a key was released. Fixes: QTCREATORBUG-24449 Change-Id: Iab6c6a13fd91485b077fbd1a812a16e32d558596 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | | Editor: Propose full trigger match snippetsDavid Schulz2020-08-131-1/+2
|/ / | | | | | | | | | | | | | | | | | | Snippets might insert a lot more text than just the completion item text so don't hide a completion if the trigger is typed in completely. But do not show completions when we type in a snippet with a trigger that can be also interpreted as a keyword or ordinary completion item. Change-Id: I25afe5f566e1c8f30621e2f82356c1c5f0af1311 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | TextEditor: After refactoring, do not open the same document againChristian Kandeler2020-08-121-1/+3
| | | | | | | | | | | | | | | | | | ... if it is already visible in a different split view. Activate that one instead. Fixes: QTCREATORBUG-13145 Change-Id: I5facfb23e8e8163d8653c7926d5bf6848f42bd9a Reviewed-by: David Schulz <david.schulz@qt.io>
* | TextEditor: Introduce shortcut for forcing a function hint proposalChristian Kandeler2020-08-114-2/+16
| | | | | | | | | | | | | | | | | | | | ... and support it in the ClangCodeModel. This allows users to get function signature(s) displayed regardless of where exactly the cursor is on the function call. Fixes: QTCREATORBUG-19394 Change-Id: I033e8774db93680bfc3ee52610b817e0ef8ccc76 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Merge remote-tracking branch 'origin/4.13' into masterEike Ziller2020-08-102-2/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/cmakeprojectmanager/cmakebuildstep.cpp src/plugins/cmakeprojectmanager/cmakebuildstep.h tests/auto/debugger/tst_namedemangler.cpp tests/auto/qml/codemodel/check/tst_check.cpp Change-Id: Iefd5f71c03c0078513b76a92af764a4fb22ee4c2
| * Editor: set default text foreground color explicitDavid Schulz2020-07-202-2/+4
| | | | | | | | | | | | | | | | Amends 9182d4eda75033bbbebf50e87e518adc33d499f6. Fixes: QTCREATORBUG-24352 Change-Id: I16171874cf2f2e9fde95b404f7510a502a39f26e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Some Qt6 portinghjk2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | - new ambiguous overloads for mapToGlobal - some functions now return qsizetype instead of int Task-number: QTCREATORBUG-24098 Change-Id: I0020e5689e093653e9e0e6f0d6263720bc2e003b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Utils: Drop Utils::SkipEmptyParts againhjk2020-07-212-2/+2
| | | | | | | | | | | | | | | | We require Qt 5.14 nowadays. Change-Id: Iff245257d3cb19207007c0445ee13814e66152dd Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Core/TextEditor: Replace QTimeline::setCurveShapehjk2020-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | ... by setEasingCurve(). Deprecation for 5.15.1/removal in 6 is looming. Task-number: QTCREATORBUG-24098 Change-Id: Ic116cf78b8468f03f6b01e0b7af56584289589cc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | TextEditor: Remove a compilation error with Qt6hjk2020-07-131-2/+2
| | | | | | | | | | | | | | | | Using forward-declared classes in signals is no longer possible. Task-number: QTCREATORBUG-24098 Change-Id: Ib95e33741fd8e18fa2a1200f4b79690f08ea2d1a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Require GCC 7 and enable C++17Eike Ziller2020-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix MSVC2019 - result type of conditional expression is ambiguous: types 'const char [1]' and 'QByteArray' can be converted to multiple common types Fix MinGW 8.1 - undefined reference to SemanticHighlightNotification::methodName Fix Utils::transform with std::vector for GCC & MSVC Unfortunately we cannot get rid of the special variant and optional implementations, because Apple Clang requires deployment target >= 10.14 for the functions that can throw std::bad_optional_access. Fixes: QTCREATORBUG-20520 Change-Id: I5c36a70f21f8b0215d2f4fc5c0653a022778d928 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>