Commit Graph

440 Commits

Author SHA1 Message Date
jkobus
a4b00160bb Refactor diff editor widget, fix whitespaces handling
Prepare for ignoreNewLine handling

Task-number: QTCREATORBUG-11002

Change-Id: I97fc0887ef27c821252283ccbad655ac0bc79f0a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-01-30 13:43:09 +01:00
Jarek Kobus
66f8437b0e Remove unneeded stuff
Change-Id: I2771765bd331e81e09141a2f3088fb364d4bf90d
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-30 13:33:27 +01:00
Eike Ziller
3fa6b6737c TextEditors: Move font settings to document
Change-Id: I325764cbaa9684fa2758b0ea6c6ea58de142cb73
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-24 08:00:07 +01:00
Jarek Kobus
4e320e8671 Fix empty contents in git show editor
Task-number: QTCREATORBUG-11314

Change-Id: I8a74c174be4436797bf04904e708e26e9463ddcf
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-01-22 04:17:23 +01:00
Tobias Hunger
f531f16dbf DiffEditor: Fix warnings on clang/msvc
The recent move to use classes in favor of structs missed the forward
declarations, so the build produces warnings about the mismatch when
using clang (and MSVC as far as I can tell).

Change-Id: I235f7410a5b43b14c318843c9ee4dfcb9ea88e63
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-17 11:24:32 +01:00
jkobus
242ae4ce37 Fix return arg of Diff class getter
Change-Id: I25dc6d2992831d79077e4d06f52018d6191e0bfb
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-16 15:15:03 +01:00
jkobus
096bc3b0e1 Add default arg to Diff ctor
Change-Id: I97d4b99250d55216ef866f7529ca423e2133db09
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-16 15:14:51 +01:00
jkobus
a74b59ffd6 Add DiffEditorController
Change-Id: Ic2f4a38d2ed08426ca7e5229d959b10fa545c129
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2014-01-16 14:36:53 +01:00
jkobus
3b2cb038cd Fix display of inserted lines by the end of file
Task-number: QTCREATORBUG-11281

Change-Id: I2d84584a850cf159dd0724f79bbc967848b3047b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2014-01-16 10:21:55 +01:00
hjk
4d96fa7aba Core: Merge Find and Locator into Core plugin
Change-Id: I7053310272235d854c9f409670ff52a10a7add8b
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-14 07:43:00 +01:00
jkobus
1d954b1b2a Get rid of DiffEditor::editorWidget();
Change-Id: I3078002359871dad74d4a07924d5beeaeb9f82ba
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2014-01-13 13:32:10 +01:00
Eike Ziller
f9ce335a6d Editors: Remove useless parent widget argument from create/duplicate
It was never called with a sensible value anyhow, and only complicates things.

Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-08 11:46:11 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
jkobus
0d13028440 Refactor source property
Get rid of source property out of DiffEditorWidget,
attach dynamic property when it's needed instead.

Change-Id: I6641a7b55c42b4eceba78c2e28f5140b40fe0fa5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-12-19 14:06:51 +01:00
Orgad Shaneh
4442a92729 Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-14 08:13:52 +01:00
Robert Loehning
0bb9ab131e Normalize connect()s
Change-Id: I1305abd51cb6ae856215af63807e66c433982c26
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-10 18:27:57 +02:00
Christian Kandeler
f1da03c73b qbs project files: Make use of new qbsSearchPaths property.
Change-Id: I396d970fafea1fd0b4c4d73883796662a1d0064b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-09 18:08:56 +02:00
hjk
ca15d0aa95 Apply static pattern to TextEditorSetting
Change-Id: I4e6f573d893c0aa2bb4ca9812fc8db2961dac172
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-20 10:28:22 +02:00
jkobus
5d15076ea1 Fix compilation of generichighlighter test on Windows
Change-Id: I25c2f68528ede12fa900ea86973c6df39667c421
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2013-09-18 17:25:41 +02:00
Orgad Shaneh
f29ce3d9b9 DiffEditor: Preserve source for state recovery
Task-number: QTCREATORBUG-10126
Change-Id: I707e7cdac84c91d52c5661718ac48e3d79fc7c91
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-13 15:45:36 +02:00
hjk
8098c085fe Utils: Cleanup of Tooltip interface
Change-Id: If4908e7a5d5ce749ff1e2efc7a026604821737be
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-13 11:35:22 +02:00
Tobias Hunger
ad50831a77 DiffEditor: Remove dead code
Change-Id: I57c61b7c5adb80ab6ffecd699cd78e1351509b07
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-09-12 10:30:55 +02:00
hjk
a37589d431 Apply 'static' pattern to MimeDatabase
Also adjust and streamline using and surrounding code.

Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-09-03 11:41:45 +02:00
jkobus
86f9a2b7e6 Fix generic highlighter autotest
Change-Id: I35994a8c29374edfeb8a230af10c2a3277232f22
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-08-30 14:19:37 +02:00
jkobus
24ccd50015 Add a toolbutton for switching diff view mode
Task-number: QTCREATORBUG-10035

Change-Id: I83cb7cec3f4ba484ab068f398a12096501017668
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-30 11:21:31 +02:00
jkobus
33a7952745 Implement syntax highlighting in diff editor
All Qt Creator's main highlighters are used in the first place,
for other mimetypes generic highlighter is used as a fallback.

Task-number: QTCREATORBUG-9580

Change-Id: I863b9085520e5bdda142ce88f2074afeacee0531
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-08-29 08:54:04 +02:00
jkobus
a03112d2f6 Fix id of diff editor according to change b772001c
Task-number: QTCREATORBUG-9960

Change-Id: I233b697254e863b7c4389c0041104b82e97bd340
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-12 12:59:53 +02:00
hjk
b772001c82 EditorFactory: Replace some virtual functions with data members
Change-Id: I014cb57460c4e3a36bf7403960908b5ffec867ff
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-08-02 10:21:15 +02:00
Nikita Baryshnikov
56d3be8c0b DiffEditor: fix crash on diff action
Fix crash in GitClient::findExistingOrOpenNewDiffEditor as new DiffEditor
is not created

Change-Id: I7f0cd18ff3acffe1d83a5fad4d6f0df8c4d133f3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-19 12:14:34 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Eike Ziller
fade19a9bf Move IEditor::createNew to IDocument::setContents
The method is for setting the contents, so it belongs to the document,
and should be named correspondingly.

Change-Id: I40363dc08f11268f530885b512e4a88e8b10d096
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 09:00:17 +02:00
Eike Ziller
624d9e2c4c Move IEditor::isTemporary to IDocument
It's a property of the document implementation, not of the specific
editor instance working on it.

Change-Id: I5c3dd054e21b646e2d94b891916a096d045923f8
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-12 16:43:54 +02:00
Eike Ziller
113c5600c9 Move displayName from IEditor to IDocument
The display name is not editor instance specific, but belongs to the
document.

Change-Id: I3c936f04a86e10e6ca30063d85036d85b4b5880e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-07-10 17:26:15 +02:00
Eike Ziller
cc7c3c9623 Add QTCREATOR_COMPAT_VERSION
Necessary for keeping compatibility within a minor series.
When bumping versions, the compatVersion now needs to be taken into
account too.

Change-Id: I588947f885480889ff2f58481f72db76e3f1a9f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 15:14:10 +02:00
Eike Ziller
99c383f3d0 Make IDocument::fileName a member with setter.
Instead of requiring subclasses to implement a method.
Also renames IDocument::rename to IDocument::setFileName,
since it doesn't really rename any files or such.

Change-Id: I1344025c24d2f74a6a983e04fb0a5245f1f37aad
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 10:21:58 +02:00
jkobus
c59c1661d1 Fix jumping to wrong line after double click in left view
Task-number: QTCREATORBUG-9655

Change-Id: Ide2a68e4d49b0bb17d745e7f13f1c565b8629c03
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-05 09:43:08 +02:00
jkobus
2b3d38b426 DiffEditor: double click doesn't select the current word
Task-number: QTCREATORBUG-9381

Change-Id: Icc96c31b029d978c23a44fca59bcc28891fd92c6
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2013-07-01 13:33:53 +02:00
Nikolai Kosjar
91d8ecbd60 DiffEditor: Fix warning about initialization order
Change-Id: I321357cbc1aca79ea28c53bfd10945be51666275
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-19 09:52:26 +02:00
jkobus
b5be527eb9 DiffEditor: Show tooltips with filenames
Change-Id: I32af3b310deb4c96bf1dc798392029cc361ced97
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-19 09:12:49 +02:00
jkobus
f5a2c1469a Add a DiffShowEditor showing an additional info
Task-number: QTCREATORBUG-9489

Change-Id: I3ae2e59ccaf397f4236505f21e027a42e2798784
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-19 09:11:42 +02:00
jkobus
abe3951d67 Take diff colors from color scheme
Change-Id: I706612a8f89917cb57b7d1e9ecebd86b3f4bcc8d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-06-12 09:23:50 +02:00
jkobus
2ddcc0c386 Fix wrong diff output with span lines
Task-number: QTCREATORBUG-9494

Change-Id: Ica26e1448b1997e102648be58128f1be00c4905e
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2013-06-07 15:36:55 +02:00
Joerg Bornemann
67399fc02a fix qbs build
Change-Id: Ifb851fe09179b4822c53f528c793209226396c33
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-06-05 16:34:23 +02:00
Eike Ziller
7c8db79817 Switch less often to edit mode
This change
* Removes IMode::type, ModeManager::activateModeType, and
  IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
  instead
* Adapts the mode switching code in EditorManager to handle multiple
  windows, for example switching to edit mode should only happen if
  the editor/view is in the main window. Otherwise the editor window
  should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
  make the current editor visible by default, introducing
  DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
  used

One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.

Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-06-05 09:43:14 +02:00
Eike Ziller
9d0346a373 diffeditor: Fix qbs build
Change-Id: Ia657fbe20f51657295bfe657a88dab58c668c3f1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-06-05 09:16:18 +02:00
Eike Ziller
897ea412c3 DiffEditor: Fix context lines spin box layout.
Work around a regression in Qt 5 (QTBUG-31538)
Also prefer setting left+right margins instead of all margins for the
label.

Change-Id: I108de101239145295d37002aa989a959d8041c55
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-06-04 11:24:51 +02:00
jkobus
aa0533c969 Move "Sync Horiz Scroll Bars" corner widget to the toolbar
Change-Id: Ie97ae07b02499b4d8d80e006aa77ca3b802f39b3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-04 11:14:06 +02:00
jkobus
26142b849b DiffEditor: Apply visualize whitespaces according to options
Change-Id: I5f7c57479d5342f5457159b14fb6afa087cb988f
Reviewed-by: Marcel Krems <m.krems@software-vision.eu>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-06-04 10:56:48 +02:00
hjk
3814e262ff DiffEditor: Rename DiffEditorEditable to DiffEditor
More in line with current naming conventions.

Change-Id: I63f6677bd12d82f6749032996585d761f1a74fb7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-03 17:28:48 +02:00