Commit Graph

316 Commits

Author SHA1 Message Date
Christian Kandeler
ccbc7f9ec1 DiffEditor: Silence warning about unused variable.
Change-Id: I18a6dd021bb29ca5eaa7727213c80458d903ee6c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-10 12:59:53 +00:00
Eike Ziller
4f927e4c87 Move "open" from IEditor to IDocument
For non-editor documents it currently is not used, but for editors it
makes more sense to have that on the document instead of the editor.
Most actual implementations of "open" were done in the documents already
anyhow, because it is needed for reloading.

Change-Id: I29d4df2078995cbe80172b51a9bebeecb3afad3c
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-06-10 11:21:17 +00:00
Eike Ziller
e00aa54f4e Add override keyword to IEditor & TextEditorWidget implementations
Change-Id: I403101d788d9edfea5c5c9440ab4f39ad00e81f7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-06-09 04:17:42 +00:00
Tobias Hunger
ad9dc94eae DiffEditor: Parse git diffs properly
Do not put filenames into a regular expression and then hope for
the best... any file with any character in its name that has a
special meaning for a regexp will break the parsing.

Task-number: QTCREATORBUG-14322
Change-Id: Ifab513d675168aff041f20d2b3f06a8d27919aa7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-27 07:26:18 +00:00
Tobias Hunger
94af581dd8 Git: Make git show a bit more robust
Change-Id: I5d0dc3bb43753f7b2ac9c308944f327537547d76
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-04-23 15:52:00 +00:00
Tobias Hunger
5c60bb9dd5 DiffEditor: When jumping to a file then put that block to the top
When jumping to a file via the dropdown box: Have that block be
scrolled to the top of the view, not to the center. This is way
less confusing.

Change-Id: I5c629dda1af8bff76ca93a70357aa35c8efcb37a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-04-17 08:24:31 +00:00
Nikita Baryshnikov
147dad8944 DiffEditorManager simplify
by using EditorManager::openEditorWithContents

Change-Id: I2850648bff0f5b8f01254b9c7ce9539c1262f576
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-13 12:33:01 +00:00
Eike Ziller
11590a8c5f Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.cpp

Change-Id: I09c5a047f7d91fecfc58c78df438afcdcdc0a8d7
2015-04-13 10:53:03 +02:00
Nikita Baryshnikov
1d23de641f GitClient: fix diff when committing
When a commit has several files, opening diff for the first file
works, but trying to open another diff without closing the previous
one doesn't refresh the diff editor.

Change-Id: Ia973cb70f2355a89b70787dd97042ef9f751d9d6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
2015-04-12 09:56:56 +00:00
Tobias Hunger
ee7d0a7bf7 DiffEditor: Do not load settings when splitting views
Change-Id: I7fac89714ff9a603af29e19664b091e5e62be22f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-04-10 14:14:57 +00:00
Nikita Baryshnikov
27aad7dfca DiffEditorManager fix typo in assert
Change-Id: I8582fdb790f5541263eb17d1fa9418c3a48f88f6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-04-06 12:44:03 +00:00
Eike Ziller
9790d8aa00 Merge remote-tracking branch 'origin/3.4' 2015-03-24 07:40:21 +01:00
Tobias Hunger
fb6d7ce91b Remove some duplicate includes
Change-Id: If7bae084cd34c6fb0fe77f9227d9848517c0e691
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-20 14:45:04 +00:00
Eike Ziller
aee54f9df5 Merge remote-tracking branch 'origin/3.4' 2015-03-19 16:00:28 +01:00
Leena Miettinen
9e2501c3a2 DiffEditor: use sentence style capitalization for labels
Change-Id: I3d8142d934b126bf13cab4729f6ed3f46cadbcea
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-16 14:59:58 +00:00
Eike Ziller
bf7da428fb Merge remote-tracking branch 'origin/3.4' 2015-03-16 10:27:16 +01:00
Tobias Hunger
1c8b691620 DiffEditor: Do not soft-assert when saving
Do not soft-assert when saving a diff that was saved before.

Change-Id: Iebe06f2bf2ab966869181e0237ed6cc69b2f6045
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-03-13 12:58:59 +00:00
Eike Ziller
6433af534d Merge remote-tracking branch 'origin/3.4'
Conflicts:
	qtcreator.pri

Change-Id: Iacd9f2afb843f06d457914a3b842dfc606e3adf3
2015-03-12 16:49:57 +01:00
Tobias Hunger
b1a71f7b96 DiffEditor: Fix line number forcing
Change-Id: I876c8ca6bc442cec853c41c48eb2be83def4558c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-11 12:26:43 +00:00
Tobias Hunger
f4a1f7460e DiffEditor: Fill in file combobox on new splits
Change-Id: Ic444a9544e3c032a1908673c349e00bec95891dd
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-03-11 12:11:30 +00:00
Tobias Hunger
25c663da44 DiffEditor: Remove dead code
Change-Id: I7d29bfc944e32ad03f237946b4bea08d1a9502c5
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-11 10:04:28 +00:00
Tobias Hunger
1842cd7793 DiffEditor: Fix sync toggle
Use more QActions in the ToolBar. Those seem to work better
than the bare widgets.

Move "ignore WS" after the Context Lines spinbox so that we
can make the editor smaller while keeping the pop-up menu working.

Change-Id: I00d707c6ee1fb8d90fef5aa5ec5abb7149d4e6a0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-03-11 10:03:41 +00:00
Eike Ziller
23ec56516e Merge remote-tracking branch 'origin/3.4'
Conflicts:
	src/plugins/coreplugin/coreplugin.cpp

Change-Id: I9aa6c61412e2ef4a91efe028296bcc2d075856d7
2015-03-11 10:35:49 +01:00
Tobias Hunger
3d360653cf Clean headers of the DiffEditor plugin.
Change-Id: I1c49527f010acbece31849127fc4d182678b6f37
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-03-10 14:28:13 +00:00
Tobias Hunger
dbe535b3c7 DiffEditor: WS only change
Change-Id: I845f492c27d2149ed01e175af5f974f86c7bd1d6
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-03-10 11:51:37 +00:00
Tobias Hunger
b2b8b867d6 DiffEditor: Refactor the user-facing parts
* Move all data handling into DiffEditorDocument
* Move much of the logic of how to update views into the
  DiffEditor.
* Introduce a base class for the different views on the diff
  to implement.
* Remove DiffEditorGuiController
* Make DiffEditorController smaller and merge the DiffEditorReloader
  into the class
* Simplify communication between the classes involved
* Make much of the implementation private to the plugin

Change-Id: I7ccb9df6061923bcb34cf3090d6d8331895e83c7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-03-10 10:25:52 +00:00
Nikita Baryshnikov
3cd0463f32 Remove aggregation dependency from project files
Change-Id: Idfd3941f47b71d6b84306d88604b744e3585e4af
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-03-09 14:25:34 +00:00
Friedemann Kleint
54da18eaaa Clean exported headers of the Core plugin.
Change-Id: I26472d568844d5fee62323e01f5c5c12082d5450
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 07:18:14 +00:00
Orgad Shaneh
aee35662a2 Prefix duplicate names in Open Documents to make them unique
If a document has a file name associated with it then the prefix is
composed from path components (subdirectories), starting from the one
where the file is located and going up the parents until the resulting
name becomes unique among other open documents.

If a document doesn't have an associated file name, then a sequential
number (starting from 1) is appended to the display name of the
document.

This feature is useful when working with big projects that have lots
of idendical file names across different subdirectories (e.g.
Makefile.in, main.cpp, etc.) that need to be edited at the same
time. It allows to easily recognize such a file when switching
between documents in the editor, w/o the need to place the
mouse pointer over the name entry to get its full path.

Started-by: Dmitriy Kuminov <coding@dmik.org>
Task-number: QTCREATORBUG-10185
Change-Id: I633ea6d9b9b4fce8b67335dbcce1bda29254efde
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-26 14:56:25 +00:00
Friedemann Kleint
fe2addf515 Clean exported headers of the TextEditor plugin.
Change-Id: I1e7dd34ba5a51fb0b34d137dc03add4457b32ed1
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-26 13:15:29 +00:00
hjk
7f001dab1b Core: Make Context parameter to registerAction optional
... and default to C_GLOBAL. A rather common case.
Similar for ActionContainer::addSeparator().

Change-Id: I7f9ba573af201c0a472132d5a494ad17cc4175b7
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-26 10:09:03 +00:00
Tobias Hunger
3232af6272 DiffEditor: Fix selection of next view
Change-Id: I3754bb3637fc89d4c9ef2939db25dd1fda9d3243
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-23 15:02:29 +00:00
Tobias Hunger
f9f6f0b2c9 DiffEditor: Introduce a base class for the different views
... of the diff. Currently that is side-by-side and unified, just
as before.

Change-Id: I62a5462344c4b4ae652899f9d5b2936aa5a692b8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-23 13:28:08 +00:00
Eike Ziller
5a3a940ad3 Use new mime database
Change-Id: I4305872b6b11ef3e8a364280ffa5209a5a793600
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-17 13:00:07 +00:00
Tobias Hunger
c1dbcfb204 DiffEditor: Move SelectableTextEditorWidget to internal
Change-Id: I4fefca2c780f17c68e73bbdaee9528c8945c00e4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 17:15:10 +00:00
Tobias Hunger
f10fd0ef5e DiffEditor: Make DiffEditor internal
Change-Id: Ife1d3d1efa2b89e3eccadec26d7c22cf86620911
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 17:15:04 +00:00
Tobias Hunger
1cc01fa18d DiffEditor: Make SideBySideDiffEditorWidget internal
Change-Id: I794282d23dc13525fbc9ad327cfa8dce2c28fbca
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:29 +00:00
Tobias Hunger
a96a62c941 DiffEditor: Make UnifiedDiffEditorWidget internal
Change-Id: I4c65190be212ed43cd0150d6f33a944e8accd73d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:25 +00:00
Tobias Hunger
2a01738ffb DiffEditor: Make DiffEditorGuiController internal
Change-Id: I657085535b7f141c97bc3d054e9edfd236209981
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:20 +00:00
Tobias Hunger
956abd2803 DiffEditor: Make DiffEditorDocument internal
Only expose Core::IDocument and keep DiffEditorDocument internal
to the DiffEditor plugin.

Change-Id: If39b82e2f20d40a65284503b4d4fd8dad919ad3a
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-02-16 15:50:16 +00:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Tobias Hunger
bfcce472e1 DiffEditor: Remove unnecessary instance() method from DiffEditorManager
The interface is static and the only slot that one can connect to is
private.

Change-Id: Iebd3747fecd24e0250d02e663de405e3f9217acb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-04 13:14:05 +00:00
Tobias Hunger
0a402aecd0 DiffEditor: Remove unused methods
The guicontroller is managed by the diffeditor, which is the only one able
to access these objects, so there is no need to ever return the pointer.

Change-Id: I6388a78bcadae67dae669bf7e96298444983c3e8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-04 13:13:51 +00:00
Tobias Hunger
d195807cc0 DiffEditor: Remove m_controller member
Not needed, we can just get the controller from the document at any time

Change-Id: I4a4ad9e3e343a147096e46406b9175b3f52f31a6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-04 13:13:40 +00:00
Tobias Hunger
e5cb8b1cd8 DiffEditor: Assert that document is passed in
Do not bother to check after that assert.

Change-Id: I4d8d8c8aa40420880824b7832005ab3f06df4aa7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-02-04 13:13:26 +00:00
Orgad Shaneh
7d469ff1fb DiffEditor: Remove unneeded qualifications
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I04454108cf2818bb88237849169a8359dd408de9
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-02-04 07:37:06 +00:00
Christian Stenger
4919a97444 DiffEditor: Fix compile for Qt less than 5.4
Change-Id: I0f70bcb0cb7b872c3b8183c4530b59a4845e5475
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-02-02 06:23:23 +00:00
Tobias Hunger
250d8abe2d DiffEditor: Remove a bit of fluff
Change-Id: Ie1b2df8eb336078ced59d1406020ae57d2b53682
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-30 10:42:01 +00:00
Tobias Hunger
f1ac9cd56d DiffEditor: Remove some empty destructors
Change-Id: Icd81940f4f91bf78e9e34c2ab5bb2c0a72c831bf
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-30 10:39:33 +00:00
Tobias Hunger
83e8a6cb27 DiffEditor: Convert more connects to Qt5 style
This helps me a lot in understanding where the signals go:-)

Change-Id: Id6ed6fccc4ca6852887b7e140deeea60252fe062
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2015-01-30 10:39:01 +00:00