Commit Graph

396 Commits

Author SHA1 Message Date
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
Montel Laurent
c001e98da8 Port to new connect api
Change-Id: I603fc2e3fda624c913e432d5059c86d96c3e2c3b
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 13:00:02 +00:00
Orgad Shaneh
8b5dcc13c5 Replace QFileInfo::fileName() with FileName::fileName()
Change-Id: I4852ff215abf25649fc5eac1e922ae901839ca3d
Reviewed-by: hjk <hjk@theqtcompany.com>
2015-01-29 11:15:43 +00:00
Christian Stenger
401d66764c DiffEditor: Compile fix for Qt version less than 5.4
Introduced with ae6730d76d.

Change-Id: Ie12606ed18397d5b296d9c89ef8ce0c31e3991f3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-29 08:25:33 +00:00
Tobias Hunger
ae6730d76d DiffEditor: Convert more connects to Qt5 style
Change-Id: Ie1da8e093bd28f0a2ad0fe34b860008a7484ed5f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-28 15:22:15 +00:00
Tobias Hunger
bdae49c474 DiffEditor: Use Qt5 style connects
Change-Id: I051b2128620bf0317b359852007463c6601ceaca
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-28 13:35:05 +00:00
Tobias Hunger
d527b11daa DiffEditor: Save a little space by reordering members in Controller
Change-Id: I3051979a2ada5650021370667e8979eb25d0467f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
2015-01-28 13:35:02 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Orgad Shaneh
c6a983d271 Core: Use FileName for file path in IDocument
Change-Id: I85f7398aee59d0d36f0e5c3bf88ff3c96002e394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-12 10:23:37 +01:00
hjk
e8396f4c8d Utils: Simplify tooltip architecture and cleanup
This mainly merges TipContents into the the actual
tooltip labels.

Change-Id: I64b576c987bce034842f7e3f324b81595dae0713
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-15 08:24:31 +01:00
hjk
50ad32a25b Utils: Start simplification of tooltip handling
There's a bit too much unneeded flexibility in there, requiring extra
boiler-plate code on the user side.

Change-Id: I34d03838fb1cd3182fcbb93bf65158ebfc7e2bce
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2014-12-08 12:56:12 +01:00
Eike Ziller
a47fbb8309 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/coreplugin/coreplugin.cpp
	src/plugins/coreplugin/themesettingswidget.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.h
	src/plugins/qmlprofiler/qml/Overview.js
	src/shared/qbs

Change-Id: Ibe92c166fc5bfbcb4d6964e50ca7298d8459d60e
2014-11-24 15:43:48 +01:00
jkobus
8d1940a796 Replace old svn diff editor with the new one
Change-Id: I4137b709be718603cdc221ac938e139326c88835
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-21 10:08:36 +01:00
Christian Kandeler
e3ae038387 DiffEditor: Remove pointless assignment.
Change-Id: I0d2f1f4cd29334a42f2099cbb1b65628e58e1a64
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-19 11:22:24 +01:00
Friedemann Kleint
f268d0f8e1 DiffEditor: Make it possible to paste snippets.
Add property "plainText" to DiffEditorDocument which
is queried as last resort by the code paster.

Task-number: QTCREATORBUG-12546
Task-number: QTCREATORBUG-9669
Change-Id: Iea9cd0d296bcc8e8a7300072c1a4a9068c2ab102
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-11-13 11:14:18 +01:00
Friedemann Kleint
9605244f6d DiffEditor: Save description along with diff.
Save complete, git-applicable patch when saving the result of
for example 'git show'. Strips some Creator-specific tags
off the description and reformats the description such
that it is accepted by git.

Change-Id: I739d85a7263f97e2149a2794974ba026f2eca067
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-13 09:10:22 +01:00
Friedemann Kleint
e123f5a4d9 Limit length of file names in DiffEditorDocument::suggestedFileName().
Change-Id: I168831b24bcece5ef825825c448edf684f4f536d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-13 08:33:38 +01:00
Friedemann Kleint
e01496122d Implement DiffEditorDocument::suggestedFileName().
Try to derive a git-format-patch type file name from
the description.

Change-Id: I581f4ba87a5ac4b82ca6519be8aa13fb4b4ebe43
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-11-12 16:21:02 +01:00
Christian Kandeler
9d677e3302 qbs build: Remove unneeded import statements.
The respective items are available without it.

Change-Id: Idc840cf08e7bec84f561c096afe8de25b1fb8468
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-11-10 15:45:14 +01:00
jkobus
1ce60cb31d DiffEditor: remove description when the diff is saved.
The description itself isn't saved so no need to
keep it anymore.

Change-Id: I8e521ce261261eb91a1f218f4e65092fc3fb44e8
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-07 14:19:08 +01:00
jkobus
2a9c9f2d70 Hide some diff editor controls when diff editor is bound to a file.
Remove unnecessary anymore "ignoreWhitespace" argument
from functions which read a patch file.

Transfer the ownership of reloader into controller.

Task-number: QTCREATORBUG-13250
Change-Id: I68183005b845d6ece9ea2be9888abc8597310426
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2014-11-05 14:38:51 +01:00