#!/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>
The methods Utils::UnixUtils::fileBrowser and
Utils::UnixUtils::substituteFileBrowserParameters are both declared when
compiling on MacOS, but their implementation is not compiled into
libutils. So this gives linker errors.
Change-Id: I0befb607dda0a83d681068f8236167ba88918460
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
It is confusing that save is missing in the context menu
of the editor manager.
Split mode requires to use different actions then the ones
in the File menu, since the editor in question might not be the
current editor.
Change-Id: I47cd5295f7a3b58906e9b158e88d9128142d4311
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
e8b5c6dfcca3fc139049136b42459e7840efed7 :
Provide terminal emulator functionality in ConsoleProcess for
Windows as well.
e833b794b3 :
Use Core::Id().
Change-Id: Idad2bd2180e9a5dd2d1266496e340726435835d3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Mostly use HostOsInfo instead of direct macros.
Change-Id: Ic6da7c987268fc8a0d06057e17c5bc0b131cbcb2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This facilitates a consistent mechanism for not repeating messages
Change-Id: I5a766f104d7da8b3f5000c9814b5e4aff335a764
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The undo stack was growing endlessly, even if the size of the
output pane is limited.
Task-number: QTCREATORBUG-8402
Change-Id: I605166f691945b66cbb11f1eaa3f6729df6f6d16
Reviewed-by: hjk <qthjk@ovi.com>
The former settting saved under this key had a default value of $HOME,
which is a akward value. We need to use a different key, so that users
get the default value even if they had run a creator which sets the
$HOME value.
Change-Id: I1c6637c3037e4e1919f078f56eaba5ce77d7fbce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This enables using integral values in addition to strings as key.
Change-Id: I0d03441eab4172b31f813d478bdd2946d7056117
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Broke while fixing the flag handling in editor manager.
Change-Id: Id743de099b3c193dcbf1dc55b4372217c691488a
Reviewed-by: David Schulz <david.schulz@digia.com>
QTBUG-3570 doesn't look like being fixed in Qt5.
Change-Id: Icddcd0e98899c9a8ac01b99783bb9450dcbe952b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Qt 5 will not expose QWindowsStyle, use QStyleFactory instead.
Change-Id: Id4ec0a4812cd8f8378ad1e493796c6110080c0ae
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Qt 5 will not expose QWindowsStyle, use QStyleFactory instead.
Change-Id: Id4ec0a4812cd8f8378ad1e493796c6110080c0ae
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
The "fixed" size policy was leading to strange behavior (QTBUG-28041),
but I also don't see a reason for the dialog to have fixed size as
long as it has a sensible size at pop up.
Task-number: QTCREATORBUG-8171
Change-Id: I17a8db4adfe7872f68d0ce1f70b641fbf6b780ab
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Correct also checking for flag value.
Task-Number: QTCREATORBUG-8272
Change-Id: I5f919d9c79639a04c05900dc8be950855478a3fe
Reviewed-by: David Schulz <david.schulz@digia.com>
Change the UI to always show the editor for the build directory.
Default to what we do for qmake projects right now (with shadow-
building enabled).
Use this setting in qmake based projects.
Set this to '.' for in-source builds by default.
Change-Id: I3fb26ab817b0f545e9b318b68e592df8040d5562
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Distinguish from const char * one.
QString ctor is yet to be removed
Change-Id: I2da231036c6417353b0566d39666d918ad141c6d
Reviewed-by: hjk <qthjk@ovi.com>
A MIME type can declare itself a sub-type of any other type. That
may be an alias of some type not yet registered, so delay alias
resolution till all MIME types are registered.
Change-Id: Ie944771287f83e5439b120d12bed550266a6c954
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>