summaryrefslogtreecommitdiff
path: root/src/plugins/diffeditor
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * Fix horizontal scrolling in sidebyside diff editorJarek Kobus2018-02-161-2/+23
| | | | | | | | | | | | | | | | Fix horizontal scrolling in sidebyside diff editor when doing text search. Change-Id: I6b52ee50544ef6005b8b79b87b9289dbc7f99dbf Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | DiffEditor: Remove unneeded used of global object poolhjk2018-02-081-2/+2
| | | | | | | | | | Change-Id: I7b1cd980702313e3ef2501519aa64042d4483bb8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Core: make useMacShortcut constexprDavid Schulz2018-02-021-2/+2
|/ | | | | Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* DiffEditor: Replace bool arguments with flags enumAndre Hartmann2018-01-172-3/+10
| | | | | | Change-Id: I70262476d015ba5b73069b149093dac66f7c6008 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* DiffEditor: Simplify makePatch tests a bitOrgad Shaneh2018-01-171-35/+4
| | | | | | Change-Id: I205bda692dbb5f759ca84dd5cf4b73da9601a7b5 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Refactor HighlightScrollBarJarek Kobus2017-12-124-20/+79
| | | | | | | | | | | | | | | | | | | | | Rename it into HighlightScrollBarController. Don't derive it anymore from QScrollBar. Make it based on QObject and decorate the existing instance of QAbstractScrollArea as needed. Fix the highlight of the shared scrollbar of the SideBySideDiffEditor. Both left and right diff editors have their own HighlightScrollBarController and their own separate overlays, but both overlays are created as children of the same right editor instance. Synchronize also the cursor between left and right editors. Make highlight current line working. Make the overlay transparent for mouse events - this fixes issues on macOS when scolling over invisible scrollbar. Change-Id: Iab05c360173e09d8748658c59785da86438a7189 Reviewed-by: David Schulz <david.schulz@qt.io>
* SideDiffEditorWidget: Fix Clang semantic warningsAndre Hartmann2017-12-091-2/+2
| | | | | Change-Id: I0f92993aa6152836237f7429c66761c22692075d Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* DiffEditor: ModernizeAndre Hartmann2017-12-0921-478/+440
| | | | | | | | | | | * Use member init * Use nullptr * Use range-for * omit QLatin1{String|Char} where possible Change-Id: Ib231b747cdd9073b3d4fc6779b8e0afb2b404a31 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* Merge remote-tracking branch 'origin/4.5'Eike Ziller2017-11-273-16/+37
|\ | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri Change-Id: I29979e76cb01bc94ddcd7868ca1cbc34afb14c5d
| * DiffEditor: Fix parsing of mode-only change in patchOrgad Shaneh2017-11-273-16/+37
| | | | | | | | | | | | | | | | | | | | | | | | If one of the files has mode-only change, the entire patch fails as a git patch, and is parsed as a text patch. Because of that, the prefixes (a/, b/) are not stripped and jumping to a change by double-clicking does not work. Change-Id: Ib54ce4fa7aad02cb956af1f7de73d3c732ac5a89 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | DiffEditor: Add missing overrideUlf Hermann2017-11-071-1/+1
| | | | | | | | | | Change-Id: Ic0541a8c902ae10c622cf8843990bdc4e21b9fe8 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Add folding to Side-by-side diff editorJarek Kobus2017-11-015-9/+152
| | | | | | | | | | | | | | | | Add folding for files and chunks. Change-Id: I76476351e88f0b3e71e3cccbca0fa17b02c26226 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* | DiffEditor: Remove indirect call to firstVisibleBlockDavid Schulz2017-10-251-5/+1
| | | | | | | | | | Change-Id: I37db7e280ea9f327ff8ab33b0f9b1fee813fcba9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | DiffEditor: remove unused member of SideBySideDiffEditorWidgetDavid Schulz2017-10-251-3/+0
| | | | | | | | | | Change-Id: Ic46fe95bc493c9242b0896737fb324f3816cc0d4 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Add folding to Unified diff editorFriedemann Kleint2017-10-051-1/+24
| | | | | | | | | | | | | | Add folding for files and chunks. Change-Id: I0dd278d0bc69208a0c9c116b94e4ead7aec5fede Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Replace manual signal blocking/unblocking with QSignalBlockerTobias Hunger2017-10-041-2/+1
|/ | | | | | Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* DiffEditor: Clean forward declarationLaurent Montel2017-09-274-8/+0
| | | | | Change-Id: Ifedc0041a5a7d736231057c092f430061c62f8fb Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.4'Orgad Shaneh2017-08-301-1/+1
|\ | | | | | | Change-Id: I9ab2c68d2bd07b0dd89051a2f5f6fa51676d8594
| * 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>
* | Replace QLatin1String, QStringLiteral ("") with QString()Nikita Baryshnikov2017-08-211-1/+1
| | | | | | | | | | | | Change-Id: I21e6165e7e8858df8436c04c9afcc1be5242bda4 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: André Hartmann <aha_1980@gmx.de>