diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2011-11-03 00:42:32 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-03 10:04:56 +0100 |
commit | d524bf0ee69aa468a4714440243720d57bd2248e (patch) | |
tree | b52d3a4b24a0495c8da2dbb4322f9ea1b14f52c0 /bin | |
parent | f79dc01304dfa0b8cf0f595aa085da96b31da232 (diff) |
Fix regular expression when replacing headers
Use non-greedy capturing where it makes sense, also
keep the user's whitespace indentation in his include statements
Change-Id: Iff2b5dabf443529292e943ae69427bd15e702bf9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fixqt4headers | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/fixqt4headers b/bin/fixqt4headers index 58b0fdf43d..06793414e5 100755 --- a/bin/fixqt4headers +++ b/bin/fixqt4headers @@ -13,7 +13,7 @@ for module in $modules; do includes=`ls $QTDIR/include/$module` for i in $includes; do # echo " fixing " $i - perl -pi -e "s,^#include +<.+/$i>,#include <$module/$i>," $files; + perl -pi -e "s,^#(\\s*)include(\\s+)<.+?/$i>,#\\1include\\2<$module/$i>," $files; # perl -pi -e 's,^#include +".+/$i",#include "$module/$i",' $files; done; fi; |