Commit Graph

42 Commits

Author SHA1 Message Date
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
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
Christian Kamm
9f737301b4 Editor: Fix finding block parentheses.
The '[' and ']' characters were considered block-opening/closing. That
led to bad results in the autocompleter (the only user of these
functions).

Task-number: QTCREATORBUG-8031
Change-Id: I81b464b2591d3695baad6e9630f9bcc4aa4ef795
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-10-17 18:50:33 +02:00
hjk
2e361d20ab TextEditor: adjust ITextMark getters to coding style
bool getters should have an 'is' prefix.

Change-Id: I6d8b0a680e7985fa454b5e7df1b85ace6da264e6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-10 12:17:12 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp
	share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessageloghandler.h
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/madde/maemodeployconfigurationwidget.h
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentinfo.h
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/ichecklib_global.h
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h
	tests/manual/ssh/tunnel/tunnel.h

Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
2012-10-05 21:20:50 +02: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
Daniel Teske
f308050c0c ITextMark: Fix crash with invisible marks
Task-number: QTCREATORBUG-7884

Change-Id: I40525b2d35e7c5a806d4047bd5b503937798da0b
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-09-19 14:44:31 +02:00
Daniel Teske
4083c11002 Optimize painting after changing marks
Change-Id: Ib9e225bc063df82fcb351ff1e2572aa2d663b8a7
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-11 15:45:55 +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
hjk
5b0bf61640 qtcassert: move actual printing to separate function and enforce style
This also allows simple setting of breakpoints on failed asserts.

Change-Id: I6dd84cbfaf659d57e39f3447386cebc0221b2b84
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-04-17 09:53:44 +02:00
Daniel Teske
20efc0a6f6 Fix reloading removing all BaseTextMarks
It was already broken in 2.4.

Task-number: QTCREATORBUG-7110

Change-Id: I24fae889c67ba5436548b7534d7257b6680a8c81
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-04-05 11:59:09 +02:00
Daniel Teske
9bf9474e8d BaseTextMark: Remove checks for linenumber after updateLineNumber
The breakpoints are deleted in some cases on updateLineNumber, thus we
can't call anything on the mark after calling updateLineNumber

Change-Id: Ib6c7bddc980fc72e9d4f4b9ec9e2eeb8292c1e15
Reviewed-by: hjk <qthjk@ovi.com>
2012-03-13 17:21:36 +01:00
Daniel Teske
b7062b01a0 Add namespace TextEditor around DocumentMarker
Missed in moving the class

Change-Id: Iec712b64338d0ec84d7aa599d36f1a7845be2a74
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-22 11:19:20 +01:00
Daniel Teske
2df2c0655c Initialize ITextMark with a lineNumber
Ensure that it is updated as the lines are moved. That can be later used
to quickly find and remove the marks again.

Change-Id: I2285111996d5c8ef12f792fd73ff00ce186addc1
Reviewed-by: hjk <qthjk@ovi.com>
2012-02-21 18:08:33 +01:00
Daniel Teske
45850c23f2 Move BaseTextDocument::documentClosing to BaseTextDocumentLayout
Centralizing mark handling

Change-Id: Ie29c15d97aa171fbf3516d4242fe3f962091477a
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:26:37 +01:00
Daniel Teske
c44d65d3c6 Move DocumentMarker to BaseTextDocumentLayout
Centralizing the markhandling in BaseTextDocumentLayout

Change-Id: I16633db8aba72e81f724aaccc2596f5fff81761d
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:26:09 +01:00
Daniel Teske
b9016b900e Move mark related functions to BaseTextDocumentLayout
BaseTextDocument::updateMarksLineNumber() and updateMarksBlock()

Change-Id: I407cddcbe3133a5e8af960d39fe8d499b640c708
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 17:25:42 +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
Friedemann Kleint
34933799fa TextEditor: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: I8fa683c4f68d6e3d3a3eb95acf2f54f8c56b87b7
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2012-01-06 11:41:24 +01:00
Eike Ziller
85cf2b661e Merge remote-tracking branch 'origin/2.4'
Conflicts:
	src/libs/qmljs/qmljsinterpreter.cpp
	src/libs/qmljs/qmljsinterpreter.h
	src/plugins/debugger/qml/scriptconsole.cpp
	src/plugins/git/gitplugin.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h

Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
2011-11-11 09:46:25 +01:00
Yuchen Deng
18b675d32f Double-click to select current block
This is a Eclipse-like feature, for select enclosing element.
e.g.
int test() {| // Here is the cursor position
    ...
}
When Double-click, we can select the block: {...}
I think this is a useful feature.

Change-Id: I4ca7ed04056176195d1622714effda9079ae0e44
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-11-08 14:53:34 +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
Leandro Melo
3945b9a70f Editors: Make sure folded blocks remain consistent
When folding indents change and a block becomes no longer
folded we need to update the user data. This patch tries
to handle general inconsistencies that might arise in such
situations. Notice however that there are stil other problems
to be addressed (including issues in Qt).

Task-number: QTCREATORBUG-5771
Change-Id: I38b869832159598d46cde00058308c218ca31f1a
Reviewed-on: http://codereview.qt.nokia.com/2908
Reviewed-by: Robert Löhning <robert.loehning@nokia.com>
Reviewed-by: Matthias Ettrich
2011-08-15 10:21:52 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Oswald Buddenhagen
dc3c156cac Merge branch '2.2'
Conflicts:
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
	src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
	src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemodeviceconfigurations.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
	src/plugins/qt4projectmanager/qt-maemo/qt4maemotargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
	src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
	src/plugins/qt4projectmanager/qt4target.cpp
	src/plugins/qt4projectmanager/qt4target.h
	src/plugins/qt4projectmanager/qtoptionspage.h
	src/plugins/qt4projectmanager/qtversionmanager.cpp
	src/plugins/welcome/welcomemode.cpp
2011-04-14 12:39:31 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
hjk
f67e9a54c9 Adjust mark area width to mark width.
Patch by Kevin Funk
2011-03-23 10:49:00 +01:00
hjk
1b1896b38b texteditor: give priorities to mark to ensure z-order when drawing 2011-03-02 18:43:26 +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
mae
ebc305b0d8 Fix: Folded code is deleted on save
Also fixes a crash when folding code at the very end
of the document

Task-number: QTCREATORBUG-2159
2010-09-07 16:38:03 +02:00
mae
ab8a8c018d Fix brace states
The lexer needs its own lexerState, before it was using
the syntax highlighter user state. This breaks the brace
depth calculation of the highlighter.

Reviewed-by: Roberto Raggi
2010-07-12 11:18:31 +02:00
Olivier Goffart
b6efa77e25 Fix use of unitialized memory 2010-07-09 10:19:03 +02:00
Christian Kamm
7ae3fd5a10 C++ indenter: Refactor to be independent of BaseTextDocumentLayout.
Done-with: Thomas Hartmann
2010-07-08 10:16:17 +02:00
Christian Kamm
88f2e340bd C++: Introduce the new CodeFormatter.
Done-with: Erik Verbruggen
2010-07-02 16:13:12 +02:00
mae
6ef602d121 add basic support to show refactor markers
See BaseTextEditor::setRefactorMarkers(...). The markers support
a clicked signal via BaseTextEditor and tooltips. They feature
a cursor, but are always positioned at the end of the line (not block!).

As special gimmick they do extend the document width when they
are positioned outside the document area.
2010-07-02 13:48:57 +02:00
mae
697cb0daa8 Code folding fix
Remove harmful over optimization (made it impossible to restore
nested folding states)
2010-05-20 16:40:28 +02:00
mae
e07c34017e Rework code folding
The new and cleaner foldingIndent in the block user data will
make it easier to support other kinds of indentation for various
other programming languages (like Python).
2010-05-20 15:11:31 +02:00
Thorbjørn Lindeijer
8e9a70addf Renamed TextEditDocumentLayout to BaseTextDocumentLayout 2010-04-26 14:42:11 +02:00
Thorbjørn Lindeijer
41ab8fbbf1 Moved TextEditDocumentLayout and related classes to their own file
The Parentheses, TextBlockUserData and TextEditDocumentLayout classes
and their member function implementations were spread around the
BaseTextEditor class. Moving them to their own file to make the code a
bit better organized.

Reviewed-by: mae
2010-04-26 14:42:11 +02:00