aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/diffeditor
Commit message (Collapse)AuthorAgeFilesLines
* DiffEditor: Improve initial size of description widgetOrgad Shaneh2020-10-081-0/+23
| | | | | | Fixes: QTCREATORBUG-24286 Change-Id: I8844b30d287fcdc5333906d00d92e00d05f5560a Reviewed-by: David Schulz <david.schulz@qt.io>
* DiffEditor: Fix Qt6 buildEike Ziller2020-09-092-166/+146
| | | | | | | | | | QStringRef is gone. QStringView::split is not available until Qt6. Since using a ref/view might actually have a performance impact in this case, work around this with a typedef to the available type. Task-number: QTCREATORBUG-24098 Change-Id: I72dcb4a9c93b73e396dfb9a2760af924db809eaf Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Core: replace QString with Utils::FilePath to get documentsDavid Schulz2020-09-042-3/+3
| | | | | Change-Id: I01777c227398be8bd3bf877c5429b84a75aa361b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Qt6: Adapt to removed QMap functionalityhjk2020-08-132-2/+2
| | | | | | | | | | | | | | 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>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-068-13/+15
| | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Move InfoBar to UtilsEike Ziller2020-06-181-6/+6
| | | | | | | | | The only reason it was required to be in Core plugin, was its use of Id, which now is available in Utils. Change-Id: I66ce863c24924e6448d339b3422538a7fe167336 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: Fix leakChristian Kandeler2020-06-171-0/+1
| | | | | Change-Id: I39c73f2076420d2026bec58f5a383b27188a2720 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffUtils: Remove unused include and declarationEike Ziller2020-05-292-3/+0
| | | | | Change-Id: I6acfa0d964530f9309594dfd2ae18c06c2235c85 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Remove unnecessary removeContextObject callsEike Ziller2020-05-275-41/+16
| | | | | | | They are removed on deletion now. Change-Id: I08461ea4938e24ab450df013a0f8f820032381da Reviewed-by: hjk <hjk@qt.io>
* DiffEditor: Fix clang warning about hidden overloadsChristian Kandeler2020-04-232-0/+3
| | | | | Change-Id: Iad4cbe1f2e97b862626deeecbcec496fe3457370 Reviewed-by: David Schulz <david.schulz@qt.io>
* DiffEditor: add info bar for documents with encoding errorsDavid Schulz2020-04-155-5/+60
| | | | | | | | ... with the option to reload the diff document with another encoding. Fixes: QTCREATORBUG-23835 Change-Id: I1ce07b292688059b37535f2972970d8ea91be81b Reviewed-by: hjk <hjk@qt.io>
* TextEditor: De-QObject-ify TextEditorActionHandlerhjk2020-02-102-22/+36
| | | | | Change-Id: I8c4919b89ce35d421edd4a21a650d5e0df4a7ead 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>
* Utils: Add a non-toolbar variant of the "RELOAD" iconAlessandro Portale2020-02-071-1/+1
| | | | | | | | New icon is: Utils::Icons::RELOAD. And the toolbar variant is now Utils::Icons::RELOAD_TOOLBAR. Change-Id: I811d83c7340a717968430ac1ce4a5c708c8ddcf9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Diff/Vcs: Use a function object for reloadinghjk2020-02-063-21/+22
| | | | | | | Helps with slimming down the user code side. Change-Id: I4b0aac76c0d1516eb05bff9c18594e64f8b41a7a Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: Pimpl pluginhjk2020-02-064-48/+61
| | | | | | | | | The standard pattern, and allows to drop the QObject parent on the editor factory which gets into the way of de-QObject-ifing the IEditorFactory hierarchy. Change-Id: I5c6a50f8075a99592ed4459b417ca8ba7471ae96 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Make IEditorFactory::createEditor use a function objecthjk2020-02-052-11/+1
| | | | | | | | 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-7/+7
| | | | | Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Git/DiffEditor: Fix staging added/removed lines separatelyJarek Kobus2019-12-026-78/+211
| | | | | | | | Fixes: QTCREATORBUG-23243 Change-Id: Ice19e1c778aabd9cb1b9fe0681234073de85cfcb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: Stage and unstage selected lines for GitAndre Hartmann2019-11-1913-46/+389
| | | | | | | Fixes: QTCREATORBUG-19071 Change-Id: I560ba208e68e477ea865e499847d819cfdfeb6f3 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* diffeditor: remove unused forward declarationLaurent Montel2019-10-251-1/+0
| | | | | Change-Id: I9da0e889262e37efae29ee7214edd5d95697e13d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Remove usages of deprecated APIs of QLayoutSona Kurazyan2019-09-021-1/+1
| | | | | | | | | | Replaced: QLayout::setMargin() -> QLayout::setContentsMargins() QLayout::margin() -> QLayout::getContentsMargins() Task-number: QTBUG-76491 Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-08-224-1/+14
|\ | | | | | | | | | | | | Conflicts: src/libs/utils/consoleprocess_win.cpp Change-Id: Ibdc265eed2f7080726e11ff6f2931c8559943af2
| * Git: Fix branch expansion on show before the diff display is doneOrgad Shaneh2019-08-164-1/+14
| | | | | | | | | | | | | | | | | | | | The description is shown first (with the <Expand> placeholder), and the diff parsing can be long. If <Expand> is clicked during parsing, it fails because the base directory is not set yet. Change-Id: Ib5e839b292c32091c726f24eb643d0fa5a142cb7 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Avoid warning on empty expressionshjk2019-07-233-3/+3
|/ | | | | | | | 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-282-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/+22
| | | | | | | | | | | | | | 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>
* Replace static_casts by QOverload where possiblehjk2019-02-261-2/+2
| | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Fix Qt 5.13 deprecation warning about QFontMetrics::width()Friedemann Kleint2019-02-151-1/+1
| | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* DiffEditor: ModernizeAlessandro Portale2018-11-0912-32/+30
| | | | | | | | | modernize-use-auto modernize-use-override modernize-use-equals-default Change-Id: I4e70550ed2962781b62661a405517b5c79126bad Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Core: Change IEditor::document() to constOrgad Shaneh2018-09-262-2/+2
| | | | | | | All the implementations are const. Change-Id: Ib9753fe764dd482d4f4392eec70878d42edc737a Reviewed-by: hjk <hjk@qt.io>
* Beautifier: Move formatting tools to TextEditorIvan Donchevskii2018-08-307-1687/+11
| | | | | | | | | | | | Formatting is moved from Beautifier plugin to formattexteditor.h/.cpp. Diff and Differ classes are extracted from DiffEditor to Utils to prevent extra TextEditor dependencies. This change will make possible to use formatCurrentFile and similar functions not only from Beautifier code. Change-Id: Ic5ca668afe88f4e9376d49e6bd3594807172b0dd Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove a few redundant occurrences of 'virtual' and 'override'Alessandro Portale2018-06-181-1/+1
| | | | | | | | | | | 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>
* DiffEditor: detect binary filesJarek Kobus2018-06-071-62/+59
| | | | | | Task-number: QTCREATORBUG-15767 Change-Id: Ic9f513ecaeb15b56c90933b1d5e4cf70e045b481 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* DiffEditor: Keep horizontal scrollbar policy in syncJarek Kobus2018-05-162-0/+21
| | | | | | Task-number: QTCREATORBUG-14330 Change-Id: I4c45089f10a9b59cd1bc5b5368f14e0bb0738f22 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Ignore index change when we set the documentJarek Kobus2018-05-041-0/+3
| | | | | | | | Do the same as in case of sidebyside editor. Task-number: QTCREATORBUG-18306 Change-Id: I1364aed0edb02dd9f5432e191ce4fb4b2db34430 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: fix various warningsJarek Kobus2018-05-039-23/+23
| | | | | Change-Id: I555aa30c8925ba8eeb314dd836f1544b93d7a66f Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-04-133-9/+9
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/settingsaccessor.cpp src/plugins/autotest/autotestplugin.cpp src/plugins/git/gitclient.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.h Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
| * Pass this context object to the connect()Jarek Kobus2018-04-093-9/+9
| | | | | | | | | | | | | | | | | | | | Otherwise when "this" instance gets deleted and the sender still exists, the lambda expression is still invoked for the deleted object. Task-number: QTCREATORBUG-20223 Change-Id: Ifd5c9e6ce1fe7fde71698c6683cdfcd7566e8d35 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Utils: Purge asConstOrgad Shaneh2018-04-091-2/+1
| | | | | | | | | | | | | | | | Replace by qAsConst. Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Plugins: Re-categorize plugins which are in "Qt Creator" categoryRazi Alavizadeh2018-03-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-03-1610-110/+150
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/androiddeployqtstep.cpp src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp src/plugins/qmakeprojectmanager/wizards/testwizard.cpp src/plugins/qtsupport/exampleslistmodel.cpp src/plugins/qtsupport/gettingstartedwelcomepage.cpp Change-Id: I126823f5f60613509520c07f52be7bc9d4f4367c
| * Move git specific stuff out of diff editor pluginJarek Kobus2018-03-1510-110/+150
| | | | | | | | | | | | | | Move it to the git plugin. Change-Id: I8151573ed50df70776f7ebf0475dd41fb84fae83 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-03-051-1/+1
|\| | | | | | | Change-Id: I421af2d62994436782dab6d37e97622bd055ed44
| * utils: Let the link icon have a LINK and a LINK_TOOLBAR versionAlessandro Portale2018-03-021-1/+1
| | | | | | | | | | | | Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5f Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-02-2312-93/+115
|\| | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/helpmanager.cpp Change-Id: I2feb60ec0afb2f22f75dc137a01c3fa217b299d8
| * DiffEditor: Minor cleanupOrgad Shaneh2018-02-201-2/+2
| | | | | | | | | | | | | | | | | | There is no need to enclose the argument with parentheses, and there is no need to cast to QSharedPointer. Change-Id: Ie8f6e4228e09203d1c42f614ee8a84de4a1e110b Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Fix repeting Stage/Unstage actions in unified diff editorJarek Kobus2018-02-168-84/+88
| | | | | | | | | | | | | | | | | | Don't store diff file index, chunk index and diff editor controller anymore. Pass needed indices by value, retrieve them when needed as lambda copy. Change-Id: I3a81f1ab6d131c0b1d9899ac4b061b6e25582f51 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * Don't route request for chunk actions through diff docJarek Kobus2018-02-165-7/+4
| | | | | | | | | | | | Change-Id: Ia2c052ab4a39e99466d697b44b5d58a574408fb0 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>