summaryrefslogtreecommitdiff
path: root/src/plugins/bookmarks
Commit message (Collapse)AuthorAgeFilesLines
* Bookmarks: Convert to Tr::trEike Ziller2022-07-113-33/+35
| | | | | | Change-Id: I3fd7472b731264b4399412ed36b1b9aba9b7d1c3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Add plugintr.h files to all pluginshjk2022-06-273-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except FakeVim, which had it before. for i in [a-eg-z]*/*.json ; do upper=${i##*/} upper=${upper/.json/} lower=${i%/*} trfile=$lower/${lower}tr.h cat << EOT > $lower/${lower}tr.h /**************************************************************************** ** ** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ namespace $upper { struct Tr { Q_DECLARE_TR_FUNCTIONS($upper) }; } // namespace $upper EOT git add $trfile perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs done Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Turn LocatorFilterEntry ofn ILocatorFilter::accept to const &Alessandro Portale2022-02-112-2/+2
| | | | | | | | | In ILocatorFilter::accept and all the overrides. Change-Id: I27cd6babb66d91aad57e85572a1cdc77aef4fd79 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove qmake build filesEike Ziller2022-01-202-22/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Use FilePath in DropSupporthjk2021-08-021-1/+1
| | | | | Change-Id: Id048d0dab4c58be367a081bb8041214abd6dbf98 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Use Utils::Link for openEditorAtDavid Schulz2021-05-251-1/+3
| | | | | | Change-Id: I246e06b11b4f32f46d7f3ec93df81bcc676aebbe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Add FilePath based overloads to EditorManager::openEditor{,at}hjk2021-05-251-2/+1
| | | | | | | | | | Part of the overall FilePath migration. Keep the original version for a while to allow using code to catch up. Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Unify INavigationWidget creation a bithjk2021-05-181-3/+1
| | | | | | | Move toolbutton creation/listing closer to the widget. Change-Id: I0e1342ede40fada1c5c9fb0b11d77852b78cc053 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Bookmark: Add command to edit a bookmarkDavid Schulz2021-05-102-0/+22
| | | | | | | | | | This command opens the edit dialog for the bookmark that is at the current editors text cursor. If there is no bookmark at that position a new bookmark will be added before the edit dialog is opened. Fixes: QTCREATORBUG-25696 Change-Id: I6a63a87cbbfb9d9075fac25b7ed9dd59d135b2c8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Locator: Add longer description to filtersEike Ziller2021-03-231-0/+2
| | | | | | | | | | This is shown as tool tips in the location options, and if any platform supports this also as tool tips on the menu actions of the locator input field. Change-Id: I8b439e45e6097a16a5f932d25d4e5d3e9bddb6ad Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Provide empty implementation for ILocatorFilter::refresh()Jarek Kobus2021-02-112-6/+0
| | | | | | | | Make this method just virtual, not a pure virtual. Remove all empty reimplementations of this method. Change-Id: Idf10e492355e8519172facd421ea0b2b13ce3b80 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Refactor Locator filter settings savingEike Ziller2021-02-041-1/+1
| | | | | | | | | | | | | | | | Unify setting saving. Do not write settings that stay at the default, so defaults could change and take effect. For this we explicitly differentiate between default and user settings. Make QJsonDocument the basis for saving settings, because QDataStream cannot really handle structured data where parts could be missing. Write locator settings to a different settings group, so we do not destroy reading older settings from older Qt Creator versions. Task-number: QTCREATORBUG-24762 Change-Id: I5909e2d79313f6fc26159bb644fdfb43781b6c38 Reviewed-by: David Schulz <david.schulz@qt.io>
* Move the BookmarkFilter's matching into the main threadJarek Kobus2021-01-292-7/+14
| | | | | | | | | | | | We can't operate directly on the BookmarkManager and Bookmark instances in the other thread, as they may be freely modified in the gui thread in the same time. Since it's uncommon to have hundreds of bookmarks set, we prepare all the needed data in the main thread instead, which shouldn't slow down the locator significantly. Change-Id: I9df0a8425694632c40138fbe3667499f7fc03432 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix build issues with Qt6Eike Ziller2020-09-181-1/+1
| | | | | | | | Change from QStringRef to QStringView at various places. Task-number: QTCREATORBUG-24098 Change-Id: Ia7a634fa26464fbb2962724d5f0e188cecc68801 Reviewed-by: hjk <hjk@qt.io>
* Small Qt 6 migration stuffhjk2020-07-291-3/+3
| | | | | | | | | | - qsizetype vs int - QJsonValue vs QJsonValueRef - #include for metatype system Task-number: QTCREATORBUG-24098 Change-Id: I066d9e3d5c35766b8aa3adc1c5835b23feb20b37 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-0/+1
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove unnecessary removeContextObject callsEike Ziller2020-05-272-6/+0
| | | | | | | They are removed on deletion now. Change-Id: I08461ea4938e24ab450df013a0f8f820032381da Reviewed-by: hjk <hjk@qt.io>
* Add some additional shortcuts for actionsEike Ziller2020-03-171-1/+1
| | | | | | | | | | | | | | | | | Add Cmd+Shift+- for decreasing font size on macOS. Do not add Cmd+= for increasing size, because it conflicts with the existing shortcut for "Replace and Find Next". Sprinkle some Backspace shortcuts in addition to Delete for removing items. There are (laptop) keyboards that either do not have a designated Delete key (requiring Fn+Backspace) or where the Delete key is not conveniently located/sized, and there is no benefit in making the distinction in that case anyhow. Fixes: QTCREATORBUG-706 Fixes: QTCREATORBUG-13733 Change-Id: I06274a9810b82800ec6158a883c95d2a7ae2465e Reviewed-by: David Schulz <david.schulz@qt.io>
* Make TextEditor setup more flexibleEike Ziller2020-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | So far it was only possible to combine TextEditorFactory, BaseTextEditor and TextEditorWidget directly. That TextEditorWidget is also directly a QPlainTextEdit made it impossible to "decorate" the text editor widget with something else without a lot of effort. Make it possible to create a text editor factory that returns an arbitrary widget, as long as it can be "cast" to a TextEditorWidget with either qobject_cast or Aggregation::query. That way the TextEditorWidget instance can be attached to the editor widget via Aggregation. Adapt other code that accesses TextEditorWidget from editors accordingly. Introduce a common method how to do that. Change-Id: I72b8721f3a8a8d8281c39af75253e9c80cbe1250 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: David Schulz <david.schulz@qt.io>
* Provide an empty default IPlugin::extensionsInitialized()hjk2020-02-071-1/+0
| | | | | | | And remove all empy re-implementations. Change-Id: I19f0b4e55c042c96693ecb89766f97f0a97b54ae Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Add final specifies to classesIgor Sidorov2020-02-052-3/+3
| | | | | | | Warning -Wfinal-dtor-non-final-class in clang trunk Change-Id: I2bf17064bf8898eab10b82b69583a283157766d0 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix various leaks relating to use of Core::NavigationViewChristian Kandeler2020-01-272-4/+4
| | | | | Change-Id: I8ba508b279376047bcf7ae17dbdadba70ec13582 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-5/+5
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-285-18/+18
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+9
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Plugins: Code cosmeticshjk2019-02-272-20/+15
| | | | | | | | | Get closer to a uniform pattern of code layout (public/private, pimpl naming...) Change-Id: If2bc6dcee3df9127274f479b4ebc270d283dcb65 Reviewed-by: Xing Xiong Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix Qt 5.13 deprecation warning about QFontMetrics::width()Friedemann Kleint2019-02-151-3/+4
| | | | | | | | | Replace by QFontMetrics::horizontalAdvance(), fixing: warning: ‘int QFontMetrics::width(const QString&, int) const’ is deprecated: Use QFontMetrics::horizontalAdvance [-Wdeprecated-declarations] Change-Id: I9991ffefe6e87e872dc35ba291d562e06b28ca64 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix some deprecation warnings in basic pluginsFriedemann Kleint2019-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix warnings apppearing in 5.13, for example: warning: ‘QDir& QDir::operator=(const QString&)’ is deprecated: Use QDir::setPath() instead [-Wdeprecated-declarations] ... warning: ‘static QRgb QColorDialog::getRgba(QRgb, bool*, QWidget*)’ is deprecated: Use getColor() [-Wdeprecated-declarations] warning: ‘Qt::DropAction QDrag::start(Qt::DropActions)’ is deprecated: Use QDrag::exec() instead [-Wdeprecated-declarations] warning: ‘void QProcess::finished(int)’ is deprecated: Use QProcess::finished(int, QProcess::ExitStatus) instead [-Wdeprecated-declarations] ... warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::background() const’ is deprecated: Use QPalette::window() instead [-Wdeprecated-declarations] ... warning: ‘const QBrush& QPalette::foreground() const’ is deprecated: Use QPalette::windowText() instead [-Wdeprecated-declarations] ... warning: ‘void QTextOption::setTabStop(qreal)’ is deprecated [-Wdeprecated-declarations] warning: ‘void QList<T>::swap(int, int) [with T = ProjectExplorer::BuildStep*]’ is deprecated: Use QList<T>::swapItemsAt() [-Wdeprecated-declarations] warning: ‘void QProcess::setReadChannelMode(QProcess::ProcessChannelMode)’ is deprecated: Use QProcess::setProcessChannelMode() instead [-Wdeprecated-declarations] ... warning: ‘QString QFileInfo::readLink() const’ is deprecated: Use QFileInfo::symLinkTarget() instead [-Wdeprecated-declarations] Change-Id: I1d893d42d372245892f2de8406f52dbe7bbd552a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix warning: "Missing emit keyword on signal call"Alessandro Portale2019-01-171-1/+1
| | | | | | | [-Wclazy-incorrect-emit] Change-Id: I93bdc6e23cdaccf35c9899ae16870ccc65a54f80 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Add macOS touch bar supportEike Ziller2019-01-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a generic Utils::TouchBar that implements a touch bar for macOS based on QAction. Touch bars can be nested, and one is set to be the application's top level touch bar. Also add an ActionContainer for the touch bar. That allows us to manage the layout of the touch bar the same way we do with menus. Since the touch bar is an input device with very limited space, a command in the touch bar needs to be specifically styled for the touch bar by setting either touchBarText or touchBarIcon (or both). Touch bars can be nested by nesting the ActionContainers. A nested touch bar ActionContainer needs to specify an icon and/or text to show in the touch bar button that opens that sub-bar. Commands are only shown in the touch bar if they are valid within the current context. Implementation-wise we cannot use the standard NSPopoverTouchBarItem for nesting touch bar levels. We cannot hide items in the touch bar, because hidden items still take up space in the touch bar. So we need to rebuild the touch bar regularly. Since the items we show are very dynamic, every time the items in the toplevel bar change because of a context change, any opened sub-level touch bar closes. That is why we maintain a stack of touch bar levels ourselves, replacing the main touch bar with the current level, and managing opening and closing the levels manually. This patch adds buttons for Help, Bookmarks, Header/Source, Follow (Symbol), Decl/Def, and a sub-bar for the debugger actions. Fixes: QTCREATORBUG-21263 Change-Id: Ib63e610f21a993f1d324fe23c83a7f2224f434ac Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
* BookmarkFilter: Allow more filteringAndre Hartmann2019-01-021-5/+37
| | | | | | | | | | | Allow filtering for: * fileName:lineNumber pattern * line text at bookmark Fixes: QTCREATORBUG-21771 Change-Id: I55ff2a5cb82460d5aa0dbcdbb60f87cf05f985e0 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Bookmarks: ModernizeAlessandro Portale2018-11-082-4/+4
| | | | | | | | modernize-use-auto modernize-use-equals-default Change-Id: I9c3a854530051ce2b86f7a94f715f8212a1688bb Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use FileName in TextMarkEike Ziller2018-05-034-20/+22
| | | | | Change-Id: I3666d95dc8ef3b7da099d6d30f5cb4678a349493 Reviewed-by: David Schulz <david.schulz@qt.io>
* Bookmarks: Some general code cleanupEike Ziller2018-05-033-47/+20
| | | | | Change-Id: Ibaba24af685d733bc3a488b82f2af5212f7ac35d Reviewed-by: David Schulz <david.schulz@qt.io>
* Insert new bookmarks after the "current" bookmarkEike Ziller2018-05-022-9/+20
| | | | | | | | | | | Makes it more useful as a navigation instrument. If new bookmarks are always added to the end of the list, the "previous" bookmark will have nothing to do with the context of the bookmark that was previously the "current" one. Task-number: QTCREATORBUG-20061 Change-Id: I0ea38391750371dec80872206d97f4934a37f7b4 Reviewed-by: David Schulz <david.schulz@qt.io>
* Bookmarks: Improve behavior of "Previous Bookmark"Eike Ziller2018-05-022-1/+14
| | | | | | | | | | | | | | If the text cursor is currently not at the "current bookmark", it is more intuitive and useful if "Previous Bookmark" first moves to the current bookmark, instead of jumping to the one before that. That solves two issues: - creating a bookmark, jumping somewhere else, and then going back to that bookmark - deleting a bookmark, and then going to the previous one Task-number: QTCREATORBUG-20061 Change-Id: I6dbb8c94f4d50ae4cc36e52808029e685be11069 Reviewed-by: David Schulz <david.schulz@qt.io>
* Add previous and next buttons to bookmarks pane tool barEike Ziller2018-05-023-1/+26
| | | | | | Task-number: QTCREATORBUG-9859 Change-Id: I2555fc89cd893681ee17b272def053f1e42e9368 Reviewed-by: David Schulz <david.schulz@qt.io>
* Plugins: Re-categorize plugins which are in "Qt Creator" categoryRazi Alavizadeh2018-03-201-1/+1
| | | | | | | | | | | | | Category of DiffEditor, ImageViewer, Macros and UpdateInfo was removed, i.e., they were moved to "Utilities" category. Category of other plugins that were in "Qt Creator" category, changed to "Core". By this patch, forks of QtCreator don't need to change *.json.in files locally. Change-Id: I243c6b1831c0b880d32b2118db71f0b281590b7b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-02-231-0/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/helpmanager.cpp Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
| * Fix usage of tr()Eike Ziller2018-02-191-0/+1
| | | | | | | | | | Change-Id: I24ff39ebe8061bb974e92afc02a9387ba9e2eef2 Reviewed-by: David Schulz <david.schulz@qt.io>
* | Core: make useMacShortcut constexprDavid Schulz2018-02-022-4/+4
| | | | | | | | | | Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Bookmarks: Avoid use of global object poolhjk2018-02-022-121/+105
|/ | | | | | | Modernize a bit in the process. Change-Id: I34e71c154b38ede29fc36a25762a515ea6596fb9 Reviewed-by: David Schulz <david.schulz@qt.io>
* Bookmark: Store line text trimmedDavid Schulz2018-01-172-3/+4
| | | | | Change-Id: I6f96210db20a8d18b5ceb5f6a3b529ea8d2bc0c5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Bookmark: add locator filter for bookmarksDavid Schulz2018-01-125-7/+170
| | | | | | Change-Id: I9107356d52bbf6d1e77b30d7057b56efd670c724 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Bookmark: const correct BookmarkManager::gotoBookmarkDavid Schulz2018-01-112-2/+2
| | | | | Change-Id: Id6118c741d0f21b9c6b968939769ca2ab3d683fd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* BookMarks: restructure bookmark mapDavid Schulz2017-12-124-96/+32
| | | | | | | | compare file names case insensitive on windows Task-number: QTCREATORBUG-19418 Change-Id: I4925a7b33f35ce18e906990ffc104b22ea6d73dc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix copyright year in plugin info, --version, and macOS infoEike Ziller2017-08-241-1/+1
| | | | | | | | By using the new QTCREATOR_COPYRIGHT_YEAR variable Task-number: QTCREATORBUG-18612 Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Bookmark: make bookmarks draggableDavid Schulz2017-06-302-0/+14
| | | | | | Task-number: QTCREATORBUG-9721 Change-Id: I157e2c4a15ae9d7e4942d3be378ecd01ef493155 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* TextEditor: Add line annotationsDavid Schulz2017-06-301-0/+2
| | | | | | | | Displaying short descriptive text of a TextMark at line end. Currently implemented for ClangTextMark and BookMark. Change-Id: Idc6b579bda0382ad94b2e236b715696396b10460 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Editor: Simplify text marksDavid Schulz2017-06-223-9/+6
| | | | | | | | | Moving defaultToolTip and color from TextMarkRegistry to TextMark. Allowing every instance of a TextMark object to define these information. Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7 Reviewed-by: Christian Stenger <christian.stenger@qt.io>