Re: signals and Q_SIGNALS
Brought to you by:
rathmann
From: Paul H. <har...@gm...> - 2009-01-30 04:38:43
|
2009/1/30 Dave Flogeras <dfl...@ak...> > Not to butt in, > > but I believe a quick and dirty single line bash command (assuming a Linux > environment, and usual command line tools) would be: > > find . -iname "*.h" | xargs grep -l 'signals:' | xargs sed -i > "s/signals:/Q_SIGNALS:" > > > Run this from the top level of the unpacked qwt distro, and it will replace > all instances of the string "signals" with "Q_SIGNALS" in every header > file. > > Now, obviously this isn't a proper cross-platform solution. But it may be > a > good short term solution for you Paul. > > Regards, > Dave > That is basically what I did in my simple little QT program. It uses QRegExp and rewrites the file for each pattern I want to match (see source code). It would be nice if QT had some sort of sed-style regexp replace functionality but I got there in the end. |