summaryrefslogtreecommitdiff
path: root/src/plugins/bineditor
Commit message (Collapse)AuthorAgeFilesLines
* Translations: Merge "OpenWith::Editors" into "QtC::Core"Alessandro Portale2023-02-201-1/+2
| | | | | | Change-Id: I241ccc53afa11fa3faa1f1ca9363421827081812 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Translations: Change translation context prefix from "::" to "QtC::"Alessandro Portale2023-02-101-1/+1
| | | | | | | lupdate would be confused by translation contexts starting with :: Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c Reviewed-by: hjk <hjk@qt.io>
* BinEditor: More Tr::trAlessandro Portale2023-01-231-1/+1
| | | | | Change-Id: Ide1dfa4d8c1c1746e674856682be66a74522650b Reviewed-by: hjk <hjk@qt.io>
* Use simpler Plugin::initialize() when feasiblehjk2023-01-202-7/+2
| | | | | Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Prefix Tr::tr contexts with ::hjk2023-01-131-1/+1
| | | | | | | To make outliers better visible in Linguist Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-0610-10/+10
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* BinEditor: Clean up translation contextshjk2022-09-307-81/+67
| | | | | Change-Id: Ibeb8c93ad1dfa816ccf1160abae8aac6781157d9 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* FilePath: Return optional bytearray for file contentsEike Ziller2022-09-121-1/+1
| | | | | | | For differentiating between "error" and "empty file". Change-Id: I2c019ceac625e7be3180afa4d47ae3a24df91c1d Reviewed-by: hjk <hjk@qt.io>
* Utils: Remove Utils::optionalEike Ziller2022-09-012-7/+8
| | | | | | | | | | Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-2610-240/+20
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* BinEditor: Support character encodings for the text partOrgad Shaneh2022-08-054-14/+65
| | | | | Change-Id: I853b5b5c4c4d523033319169e80e6f9063360c17 Reviewed-by: David Schulz <david.schulz@qt.io>
* BinEditor: Use inline member initializationOrgad Shaneh2022-08-032-43/+28
| | | | | Change-Id: If70532c94b5a446dbb6595d635f4c03b69a5d65c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use setClipboardAndSelection more broadlyhjk2022-07-151-10/+9
| | | | | | | | Basically everywhere besides the EmacsKeys plugin. Change-Id: Iaf2a0a5d791b5b3dd6df2c05c1b862516630d3f8 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* 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>
* macros: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-06-031-2/+2
| | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Id779aaf869406571288519083883ab57e5c29cec Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* BinEditor: Fix compiler warningEike Ziller2022-05-191-1/+1
| | | | | | | | Unused lambda capture Change-Id: Ic4d633b794a36d663644c761a0c2d024deee2dd9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* 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>
* BinEditor: Proliferate FilePath usehjk2021-08-273-14/+15
| | | | | Change-Id: I1676ab03257b5acdc1f67e25f419939939707d53 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix some compiler warningsChristian Kandeler2021-08-181-1/+1
| | | | | Change-Id: Ibc354e7a8d0342eb12b2b0f9b2c630d15422f22a Reviewed-by: hjk <hjk@qt.io>
* BinEditor: Make it work with remote fileshjk2021-08-031-50/+47
| | | | | | | For testing, start Creator with bin/qtcreator docker://<imageid>/bin/ls Change-Id: I438dde457b6bfb860939ad928fb4e563a3766aa9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: filepathify IDocumentDavid Schulz2021-05-191-16/+14
| | | | | Change-Id: I364a80d070c5f90433309c281c4906ee101a1a1a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: filepathify fileutilsDavid Schulz2021-05-181-1/+2
| | | | | Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* IDocument: Simplify permission changesEike Ziller2021-01-141-19/+8
| | | | | | | | | | | | | | | | Take care of handling file permission changes centrally. TextDocument had its own, caching implementation of tracking the backing file's read-only state. Move that into IDocument directly. IDocument::reload with a permission-only change is not a very interesting case, but every subclass needed to add handling of it. Instead, remove TypePermission from the file-change types, and handle it separately via the now unified checkPermissions() implementation. IDocument::reloadBehavior already was never called with TypePermission. Change-Id: I321d47ba6193bc878efa9bb50ba7a739fa492745 Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.14'Eike Ziller2020-11-301-1/+1
|\ | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/gcctoolchain.cpp Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
| * BinEditor: Fix MSVC warningOrgad Shaneh2020-11-271-1/+1
| | | | | | | | | | | | | | warning: C4309: 'argument': truncation of constant value Change-Id: I5da62c2534474f65d5b4d1b44b995dd765d02265 Reviewed-by: hjk <hjk@qt.io>
* | Don't access static functions/fields via instanceAlessandro Portale2020-11-271-1/+1
|/ | | | | | | | | | | | Courtesy of readability-static-accessed-through-instance Amends: b2a766a79ac778febff87f0def34cf6d3f4f93e3 Round #2: This time done with Qt Creator's Analyzer, which found other occurences than run-clang-tidy.py Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Avoid more uses of non-explicit QChar(int) constructorhjk2020-11-101-5/+7
| | | | | | | | Will be gone in Qt6. Task-number: QTCREATORBUG-24098 Change-Id: Id76b15bb11879b2e8ff0f71af45acbfb1720f763 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-1/+1
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge remote-tracking branch 'origin/4.12'Eike Ziller2020-06-221-2/+2
|\ | | | | | | Change-Id: I0935f0087efc1ddd4f17fcafc2e3b5c58c23bef4
| * BinEditor: Crash less on searchhjk2020-06-171-2/+2
| | | | | | | | | | | | | | | | Task-number: QTCREATORBUG-21473 Task-number: QTCREATORBUG-23978 Change-Id: I8f63fa892b9ef37bc660bd0b96fce5e1d6772b57 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* | BinEditor/ClangCodeModel: Remove non-uses of #include <QRegExp>hjk2020-06-111-1/+0
| | | | | | | | | | | | Task-number: 24098 Change-Id: I58a52ad3c384cc945799ad73e5d3ce392245cd50 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-4/+4
| | | | | | | | | | | | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* | Port from QRegExpValidator to QRegularExpressionValidatorLars Knoll2020-03-201-2/+2
|/ | | | | | | | QRegExpValidator is going away in Qt6, so port over to the version using QRegularExpression. Change-Id: Iecd1ba1f0e5e01009ae43b79c1ccc73f0fc046b2 Reviewed-by: hjk <hjk@qt.io>
* Misc: Fix MSVC warningsOrgad Shaneh2020-02-251-1/+1
| | | | | | | | | | C4573: the usage of 'QObject::connect' requires the compiler to capture 'this' but the current default capture mode does not allow it and implicit conversions from size_t to int Change-Id: If9b4ba3103cadd5b2a38ba7072d05aa1488a87bb Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: hjk <hjk@qt.io>
* Core: Make IEditorFactory::createEditor use a function objecthjk2020-02-052-26/+21
| | | | | | | | Also, replace or remove unneeded Q_OBJECTs, and make base setters and adders protected. Change-Id: I212257ef53984d8852dc8c478537199fc9483486 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use isEmpty() instead of count() or size()Alessandro Portale2020-01-202-4/+4
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Use even less nullptr for default flagshjk2020-01-202-5/+3
| | | | | Change-Id: I5ec30de3e41dfc1c7bf6d5f5e36991eadcbbfb72 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* BinEditor: Fix a dead storeNikolai Kosjar2019-11-141-1/+0
| | | | | Change-Id: I44d8a60037f02f4467ea085e4ad0d366c6c7aa86 Reviewed-by: hjk <hjk@qt.io>
* Remove usages of deprecated APIs of QLayoutSona Kurazyan2019-09-021-1/+0
| | | | | | | | | | Replaced: QLayout::setMargin() -> QLayout::setContentsMargins() QLayout::margin() -> QLayout::getContentsMargins() Task-number: QTBUG-76491 Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Some clang-tidy -use-modernize-nullptrhjk2019-08-011-1/+1
| | | | | Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-4/+4
| | | | | | | | 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/+10
| | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-051-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/tools/clangpchmanagerbackend/source/taskscheduler.h Change-Id: I518adaf647df412887c2a372416634359f09ad2a
| * Bin editor: Fix UI textLeena Miettinen2019-03-041-1/+1
| | | | | | | | | | Change-Id: Id32a861c832360f8e559947da5911ed91820c7d0 Reviewed-by: hjk <hjk@qt.io>
* | Plugins: Code cosmeticshjk2019-02-271-2/+0
| | | | | | | | | | | | | | | | | | 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-17/+17
|/ | | | | | | | | 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>
* BinEditor: ModernizeAlessandro Portale2018-11-084-29/+29
| | | | | | | | | | modernize-use-nullptr modernize-use-override modernize-use-equals-default modernize-use-using Change-Id: I1d1381962b3ffd87cbf761f50d8f073068f9a06f Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* BinEditor: Support copying of hex value as a numberOrgad Shaneh2018-11-061-1/+16
| | | | | | | | Useful when copying a pointer value from memory editor. Change-Id: I8930e4ee1c7fd1df998e37ed65e4dff5dfa2ed2e Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Fix missing translation contextsEike Ziller2018-10-251-2/+2
| | | | | | | Change-Id: I4402157e7991ad0050333a34394b87ff3d6f4a1b Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com> Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>