Commit Graph

11 Commits

Author SHA1 Message Date
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
Eike Ziller
03717cf7ef Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/debugger/gdb/gdboptionspage.cpp
	src/plugins/fakevim/fakevimoptions.ui
	src/share/share.qbs

Change-Id: Ic45b68ba7b1cc1b780be4271ba4ee939e6055b80
2012-12-18 17:42:04 +01:00
Friedemann Kleint
3247ecf758 Replace dead link to Debugging Tools download by Wiki link.
Change-Id: I26d227464ae25edf92dc06f1c43cd0188b084132
Reviewed-by: hjk <qthjk@ovi.com>
2012-12-17 13:46:00 +01:00
hjk
5dfdf75efc KitManager: spacing in dialog
Change-Id: I243de278cd964c9aa51e7ff091a2c33e8043a562
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-11-16 16:33:50 +01:00
Tobias Hunger
f88636e613 Kit: Improve the options page
* Update warning icon as changes happen
* Make clone clone the current settings, not what used to be there
  before changes were made
* Make sure the edited entry is visible in list view
* I find the KitModel much easier to understand now

Task-number: QTCREATORBUG-7862
Task-number: QTCREATORBUG-7803
Change-Id: I124c2e5a96cea7386896084e1027ba79a8be20b7
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-16 12:04:37 +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
Friedemann Kleint
d339637701 Move debugger kit settings into a separate dialog.
Change the DebuggerKitConfigWidget to contain a display label
only. Add a Button with a menu for "Autodetect" and
"Edit...".

Change-Id: I8ec17966ef220c81fb8b145a61df4408d5950da9
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-11 16:27:15 +02:00
Friedemann Kleint
ddb1c96650 Add addToLayout()-method to KitConfigWidget.
Provide default implementation to do a single-line layout
and let the DebuggerKitConfigWidget span 3 rows, aligning label
and button accordingly.

Change-Id: I0fb3a3116a593822da9c4499c142b8a8255c02d0
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-09-07 16:55:04 +02:00
Friedemann Kleint
f60a94f759 Re-add version tooltips for debugger command.
Change-Id: Ic89c98426796401577abfd2301fc77e7ee8a8f9b
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-09-06 11:28:47 +02:00
Friedemann Kleint
af6bbc442e Add debugger engine type to configuration.
Introduce a struct DebuggerItem as a debugger configuration
item, containing debugger engine type and binary. Store
information as a variant map. Add a combo box.

Remove engine guessing logic. Parts of it are still required
when checking the suggested debugger from the SDK.

Split error checking to be able to do a quick error check
and find only valid profiles in the matchers.

Pass on errors up to RunControl::create().

Change-Id: I08653e2a76ca2c371701082f8173b0b8f8ed462e
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-09-05 15:49:11 +02:00
Tobias Hunger
8ba422d07c s/profile/kit/
* Rename profiles to kits.
* Update some strings:
   * projects mode has a Kits tab, not a Targets tab.
   * " Settings" was dropped from the sub-tabs of the Kits tab
   * menu entry "Build/Open Build/Run Target Selector" was renamed
     to "Build/Open Build and Run Kits Selector".
   * Use "Kit" instead of "Target" in miniprojecttargetselector.
     (The class was not renamed as it does indeed select targets,
      not kits)

Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-09-04 15:24:25 +02:00