Commit Graph

71 Commits

Author SHA1 Message Date
Oswald Buddenhagen
7923032022 fix include style relating to cplusplus libraries
... and adjust INCLUDEPATH accordingly.

while i'm at messing with include statements, also re-order the include
blocks according to policy and sort them within bigger blocks.

Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-03 13:40:39 +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
Orgad Shaneh
a44aa55502 Add whitespace after control keywords
find -name \*.cpp -o -name \*.h | \
  xargs sed -Ei 's/ (for|foreach|if|switch|while)\(/ \1 (/g'

Change-Id: I9efdff4bf0c8c01a52baaaeb75198483c77b0390
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 20:20:46 +01:00
Orgad Shaneh
3747e941ad Clean up whitespace before EOL
Change-Id: I385544a10b9be66589b0d1a48594128035836c8a
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 20:17:51 +01: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
Christian Kamm
1aed32d866 C++11: Fix indent of brace initializers in ctor lists.
Change-Id: Ib784df9e17ff2fe6bb249dcf8c2fee7310340f50
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-19 11:52:40 +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
Leandro Melo
23c637c4f6 C++: Introduce unicode char/strings support
Those are the types char16_t and char32_t along with the new
char/string literals u'', U'', u"", u8"", and U"".

This is particularly important for the use of QStringLiteral
since in some platforms it relies on expansion such as above.

Note: The string literals quickfixes still need some tunning.

Task-number: QTCREATORBUG-7449
Change-Id: Iebcfea15677dc8e0ebb6143def89a5477e1be7d4
Reviewed-by: hjk <qthjk@ovi.com>
2012-06-06 14:55:07 +02:00
Flex Ferrum
4ca6c51c7f C++: Lambda formatting issues.
Fix code formatting in cases when '{' and '}' appear within expression
context (ex. lambda expression, initializer lists).

Change-Id: I42b28170a8d6d5fd08a9a1a8d8e7698219c18966
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2012-03-12 14:38:26 +01: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
Leandro Melo
efe9bca20c C++: Replace non-absolute-critical asserts for soft ones
Change-Id: I021074a78d90929b4e83b8aff9db1ae7995e8c6a
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-24 09:58:59 +01:00
Christian Kamm
0ba1234108 C++ indenter: Improve member initializer indent.
If you indent the first initializer differently, that will now stick
for the following ones.

Change-Id: Ib08dfbf64282eda41202528b7255e693c350f7c6
Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
2011-12-08 13:55:16 +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
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
Christian Kamm
aa3d406faf C++ indenter: Accept attributes in access specifiers.
Change-Id: Ie85b8264c9579e8c8312e30018280fb11f95edda
Reviewed-on: http://codereview.qt-project.org/6328
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Sanity-Review: Erik Verbruggen <erik.verbruggen@nokia.com>
2011-10-11 12:45:04 +02:00
Christian Kamm
8792fcfdc4 C++ indenter: Fix preserving indent in comments with tabs.
Task-number: QTCREATORBUG-6151
Change-Id: I584666441dce05af9a91cd28812b230c36bdd830
Reviewed-on: http://codereview.qt-project.org/5318
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
2011-09-21 13:40:48 +02:00
Christian Kamm
1f9be179f0 C++ indenter: Make continuations after ( consistent.
Change-Id: Iae780127065e3fce274db10e173f5c0bde15bd92
Reviewed-on: http://codereview.qt.nokia.com/1229
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-07-06 13:06:42 +02:00
Christian Kamm
e2cdaf7888 C++ indenter: Fix function declaration continuation indent.
Change-Id: I0ebe1f0f531cb4830f80b80c6bb52caeaee01353
Reviewed-on: http://codereview.qt.nokia.com/1167
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
2011-07-06 10:00:05 +02:00
Christian Kamm
794f296701 C++ indenter: Fix multiple initializers.
Task-number: QTCREATORBUG-4993
Change-Id: I0f7d541eb7b26c37b8167e30e2949b6b939fe4b8
Reviewed-on: http://codereview.qt.nokia.com/297
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-06-01 11:14:50 +02:00
Christian Kamm
f762d93702 C++ indenter: Fix indent in body of function with default argument.
Change-Id: I9d4f5b3ae7b8a59f8350cf756979a3a430398112
Reviewed-on: http://codereview.qt.nokia.com/206
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2011-05-30 12:02:04 +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
Christian Kamm
c5ce20c5f7 C++ indenter: Treat extern "C" like namespace.
Change-Id: Ib0553d35fbd83aada2b8809aa008b1f75ca77c32
Done-with: Erik Verbruggen
Reviewed-on: http://codereview.qt.nokia.com/14
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2011-05-19 13:23:50 +02:00
Christian Kamm
86d5df063c C++ indenter: Fix extra specifier in return type of func decl.
Like
struct Foo bar() { }

Change-Id: I946937c23d1660909757952a5a3bd400c4781826
Reviewed-on: http://codereview.qt.nokia.com/13
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
2011-05-19 13:14:07 +02:00
Tobias Hunger
aa2acec14c Fix/add copyright headers
Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
2011-05-06 15:17:05 +02:00
Friedemann Kleint
774fa49412 Fix more krazy warnings. 2011-04-19 15:43:53 +02:00
hjk
8397663964 Update license. 2011-04-13 11:49:28 +02:00
Christian Kamm
faff0c8ace C++ indenter: Fix for use of << and >> in parentheses.
Task-number: QTCREATORBUG-4076
2011-03-15 15:05:05 +01:00
con
d1023c7614 It's 2011 now.
Reviewed-by: hjk
2011-01-12 09:46:24 +01:00
Christian Kamm
16542241c9 C++: Add parsing of Q_PRIVATE_PROPERTY.
Reviewed-by: Roberto Raggi
2011-01-04 15:58:22 +01:00
con
b1bcf081d8 Merge branch '2.1'
Conflicts:
	src/plugins/coreplugin/basemode.cpp
	src/plugins/coreplugin/basemode.h
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp
	src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h
	src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/debugger/debuggeruiswitcher.cpp
	src/plugins/debugger/debuggeruiswitcher.h
	src/plugins/projectexplorer/buildconfigdialog.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp
	src/plugins/qmldesigner/components/propertyeditor/colorwidget.h
	src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h
	src/plugins/qmldesigner/designercore/include/modelutilities.h
	src/plugins/qmldesigner/designercore/include/nodeinstance.h
	src/plugins/qmldesigner/designercore/include/propertymetainfo.h
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h
	src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h
	src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp
	src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h
	src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp
	src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp
	src/plugins/qmldesigner/designercore/model/modelutilities.cpp
	src/plugins/snippets/inputwidget.cpp
	src/plugins/snippets/snippetscompletion.cpp
	src/plugins/snippets/snippetscompletion.h
	src/plugins/snippets/snippetspec.cpp
	src/plugins/snippets/snippetsplugin.cpp
	src/plugins/snippets/snippetswindow.cpp
	src/plugins/snippets/snippetswindow.h
	src/plugins/texteditor/snippetsparser.cpp
	src/tools/qml/qmldom/main.cpp
	tests/manual/trk/runner.cpp
	tests/manual/trk/trkolddevice.cpp
	tests/manual/trk/trkolddevice.h
	tests/manual/trk/trkserver.cpp
2010-12-17 17:00:53 +01:00
con
04e32b0049 License headers. 2010-12-17 16:03:42 +01:00
Christian Kamm
c5c4bacda9 C++ indenter: Fix labels.
Reviewed-by: Roberto Raggi
2010-12-01 10:22:41 +01:00
Christian Kamm
7a616d5896 C++ indenter: Align to next token instead of end of current.
Task-number: QTCREATORBUG-3136
Reviewed-by: Erik Verbruggen
2010-11-22 10:09:39 +01:00
Christian Kamm
d2468a4491 C++ indenter: Fix for GNU and Whitesmiths style switch statement.
Task-number: QTCREATORBUG-2994
2010-11-04 14:09:47 +01:00
Christian Kamm
6f19835fd8 C++ indenter: Ensure indent and padding are non-negative.
Reviewed-by: Roberto Raggi
2010-10-25 13:31:42 +02:00
Christian Kamm
5ac981a0ac C++ indenter: Fix indentation after namespace aliases.
Task-number: QTCREATORBUG-2574
Reviewed-by: Roberto Raggi
2010-10-19 12:49:43 +02:00
Christian Kamm
7e3294a8ce C++ indenter: Don't get confused on 'for (a in b)'.
Reviewed-by: Roberto Raggi
Reviewed-by: Erik Verbruggen
(cherry picked from commit c2d890f65e)
2010-10-08 13:09:26 +02:00
Christian Kamm
8215a1d0c0 C++ indenter: Fix member initializer indent being hardcoded to 4.
Task-number: QTCREATORBUG-2456
2010-09-27 10:39:33 +02:00
Christian Kamm
17e0886c69 C++ indenter: Fix error recovery in function definitions.
Task-number: QTCREATORBUG-1517
2010-09-24 15:58:23 +02:00
Christian Kamm
dc58172b78 C++ indenter: Add some small error recovery. 2010-09-24 15:41:13 +02:00
Christian Kamm
d7bf4f515d C++ indenter: Fix indentation if template and class appear on one line.
Task-number: QTCREATORBUG-2427
2010-09-24 15:08:54 +02:00
Christian Kamm
be563abf68 C++ indenter: Simplify debugging by making dump() more verbose. 2010-09-24 15:08:54 +02:00
Christian Kamm
d68e9e1a4d C++ indenter: Fix curly brace placement for ANSI style.
There was a bug in 5cd6ebfdfd which meant
no reindent of the current line was triggered for the opening curly
brace on a new line.

Task-number: QTCREATORBUG-2331
2010-09-15 11:16:25 +02:00
Christian Kamm
e5cbb56fe7 C++ indenter: Fix for statement indentation and add test. 2010-09-15 11:16:25 +02:00
Christian Kamm
642b6fb0d3 C++ indenter: Separate indent into logical indent and padding. 2010-09-13 12:38:34 +02:00
Christian Kamm
5cd6ebfdfd C++: Only reindent on electric characters if indent wasn't user-changed.
This should make the indenter less strict and annoying for non-standard
indentation styles.

Reviewed-by: Roberto Raggi
2010-09-08 16:22:23 +02:00