Commit Graph

64 Commits

Author SHA1 Message Date
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
David Schulz
5345e05f26 TextEditor: Fix unindent on backspace.
Task-number: QTCREATORBUG-15250
Change-Id: I4d19ad90098dc64f96b1aa7f728d8f30d05bff6d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2015-12-03 13:59:27 +00:00
Vladyslav Gapchych
aab3b0fc66 TextEditor: Fixed indentation in block selection mode
Made indentation work for block selection mode the same way it does in default mode:

1. delete text if any selected
2. indent block if no text selected
3. indent last line if cursor in first column (QTCREATORBUG-12697)

Task-number: QTCREATORBUG-12697
Change-Id: I1f6b218b389f3fdc5232ec02857aa76f5ccbaaf0
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2015-07-17 12:45:11 +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
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
David Schulz
6e9b724006 Editor: Blockselection rewrite.
Also adding the possibility to insert text into the blockselection.

Task-number: QTCREATORBUG-7773
Change-Id: I7a47a1d630f769a8253ee1a2f21057820ea170d5
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-06-20 13:16:54 +02: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
David Schulz
bd144ab0f5 Editor: TabSettings: Make some functions static.
Change-Id: I99597a22b333c44346eb890ebe615193bdbe66d6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-01 15:15:52 +02:00
David Schulz
9d3f12f24f Editor: Remove trailing whitespaces in generated files.
Task-number: QTCREATORBUG-9833

Change-Id: I7440d1e7c8ef303db1b6abfa8cd12325b934b0d2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
2013-08-12 14:16:59 +02:00
Eike Ziller
01db67fd97 Remove call that has no effect and triggers crash in Qt later on.
The text cursor constructor with text block parameter already sets the
cursor to the beginning of the line, so no need to do that explicitly.
Made dropping large text crash under some circumstances.

Task-number: QTCREATORBUG-8441
Change-Id: I3671d4d9db539025d4987f041371f8a0ac1d98f8
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-03-04 10:33:43 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
Orgad Shaneh
59ef5edcf5 TextEditor: Fixed marking of unchanged blocks when tabs are used
Task-number: QTCREATORBUG-5712

Change-Id: I50d1cbabebece46acbe4fa3ddf1565a1a95f5c9c
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-05 10:19:26 +01:00
hjk
31600758de all: s/info@qt.nokia.com/qt-info@nokia.com/
Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2011-11-03 10:33:19 +01:00
Jarek Kobus
2244911826 Implement Code Style schemes
Task-number: QTCREATORBUG-5092

Change-Id: I218cef02f7c242e4dfae59b1b8021ea618e60d07
Reviewed-on: http://codereview.qt-project.org/5160
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-09-23 10:23:15 +02:00
Leandro Melo
3b0a43802e Editors: Enhance smart backspace behavior
Adds a new smart backspace behavior option. Now it's also possible
to simply unindent (like a backtab). This is particularly useful
when the cursor is not inside an "indentation area" but the user
still wants to go backwards by indent levels when possible (for
example before a comment that appears after the code line). The
option also allows the user to reach a new indent level which has
not been seen so far in previous lines.

The original follows indentation user setting will be lost with this
patch, but we consider this ok for not very "significant" settings.

Change-Id: I49efb6b0309d9b7d7ff2a589413446bc16fb753c
Reviewed-on: http://codereview.qt.nokia.com/3105
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-08-18 10:09:17 +02:00
Jarek Kobus
dcf7345931 Remove unused methods
Change-Id: I62d09b50a94c0d3bf3ef670bd6d070b5c74c88e6
Reviewed-on: http://codereview.qt.nokia.com/509
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-06-20 16:52:54 +02:00
Christian Kamm
779fafcbfe Make C++ code style configurable.
Change-Id: Iaf08edb2361146e6b5e1cbafdb716a23c938875b
Done-with: Jarek Kobus
Task-number: QTCREATORBUG-2670
Task-number: QTCREATORBUG-4310
Task-number: QTCREATORBUG-2763
Task-number: QTCREATORBUG-3623
Task-number: QTCREATORBUG-567
Reviewed-on: http://codereview.qt.nokia.com/74
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-24 12:45:07 +02:00
Friedemann Kleint
ddf4b613f3 Krazy fixes (spelling, single char strings, char constants). 2011-05-10 15:21:41 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Leandro Melo
ea313f3ec8 Text editor: Introduce per project settings
With some refactorings to make the code look better.

Reviewed-by: con
2011-02-21 17:22:24 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Christian Kamm
bbc4a5f580 C++ indenter: Change to a more descriptive name for 'Padding mode'.
'Align continuation lines' should be easier to understand.

Done-with: Friedemann Kleint
2010-09-14 12:41:19 +02:00
Christian Kamm
26114a23d0 Indenter: Add an option to control the padding style.
Reviewed-by: Thorbjorn Lindeijer
2010-09-13 12:38:34 +02:00
mae
29b073e92e Refactor block selection
Block selection was "broken" when using tabs, or rather
incomplete: It treated tabs as normal characters, which
has shown to be unexpected by people using tabs in code.

The new implementation has a vastly improved find scope
as well. In addition, creating a blog selection with
mouse or keyboard feels a lot more solid now, as the
actual selection is detached from possible valid cursor
positions.

Task-number: QTCREATORBUG-1541
2010-08-05 15:26:58 +02:00
mae
f552e1d0c5 fix crash
confusion between columns and character positions
2010-07-07 11:13:42 +02:00
mae
bc0d5e38e4 Prepared padding support (as opposed to indent)
This will be hooked up with the new indenter.
If you use tabs for spaces, and have tabSize==indentSize, we
will be able to preserve spaces for padding nonetheless.
2010-07-02 15:23:00 +02:00
Thorbjørn Lindeijer
a6e5298591 Fixed handling of text wrapping and a text layout corner case
Due to using QTextCursor::columnNumber() instead of
QTextCursor::positionInBlock(), a lot of code would not work correctly
when used with wrapped lines.

In addition, there was an issue with columnNumber() returning 0 right
after inserting a character before the last character of a line.

Reviewed-by: mae
2010-06-15 12:25:01 +02:00
Alexey Semenko
538921e8dc Add "indent blocks twice" option for GNU indenting
Reviewed-by: mae
Merge-request: 133
2010-04-08 17:06:23 +02:00
hjk
9595504bda Long live the king! 2010-03-05 11:28:13 +01:00
Thorbjørn Lindeijer
ea0394a8ec Style fixes and small optimizations to guessSpacesForTabs
Save some cycles by not using QTextBlock::text unnecessarily (since only
its length and the character at the block position were used).
2010-02-08 16:59:10 +01:00
Roopesh Chander
e64c255b7e fix crash on files with no indented lines 2010-02-08 16:59:10 +01:00
Roopesh Chander
d330320fc7 make auto-spaces-for-tabs work only if spaces-for-tabs is checked
This is to make it consistent with the rest of the settings ui.
When a checkbox is unchecked, the sub-check box becomes invalid, its
functionality is disabled, but it retains its checked state.
2010-02-08 16:59:10 +01:00
Roopesh Chander
bf2289127f Look both forward and backward for auto-determining spaces vs tabs 2010-02-08 16:59:10 +01:00
Roopesh Chander
9822fb65df cleanWhitespace() checkes whether it has to change indentation or not. handle that. 2010-02-08 16:59:10 +01:00
Roopesh Chander
764245eed2 don't go searching backwards for more than a hundred lines of code
Merge-request: 1766
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-08 16:59:10 +01:00
Roopesh Chander
6fced0e5b0 A little code-beautification won't hurt
Merge-request: 1766
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-08 16:59:10 +01:00
Roopesh Chander
ea13309b9a Add a checkbox for 'auto-determine spaces or tabs from the previous line'
Merge-request: 1766
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-08 16:59:10 +01:00
Roopesh Chander
2a58049e6a Ability to auto-determine whether we want spaces instead of tabs or not
Based on the previous (referrable) line

Merge-request: 1766
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-08 16:59:10 +01:00
Jeffrey Baumes
fa5f9246c2 Adding indented braces option.
Merge-request: 1949
Reviewed-by: Thorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>
2010-02-05 16:25:22 +01:00
mae
0ed9043c34 tune auto-indentation of pasted text
auto-indentation of pasted text now only happens when complete
lines including a trailing paragraph separator are copied and pasted.

In addition, the reindent() functions ensures that the relative indentation
within the pasted block is preserved. This mechanism is now also used for
moving lines up/down.

Done with thorbjorn
2009-09-29 12:46:04 +02:00
mae
061865efa4 move auto parentheses handling into the cpp editor 2009-09-17 12:37:20 +02:00
mae
1c4fc0d7dd preliminary auto parentheses support 2009-09-15 17:04:33 +02:00