Re: signals and Q_SIGNALS
Brought to you by:
rathmann
From: Paul H. <har...@gm...> - 2009-01-30 01:52:12
|
On 30/01/2009, David Stranz <dav...@ma...> wrote: > > Paul, > > My apologies; I stand corrected. The issue is worse than > it appeared at the time of my off-the-cuff reply. > apology accepted :) It seems to me that either of the renaming solutions proposed > by boost are preferable to changing every Qwt header every time > you update, whether you do it automatically via a script or not. > QT had other keywords like emit (replaced with Q_EMIT) that were annoying. I have converted my extensive code to use the Q_ syntax after a long QT4 upgrade process, and don't want to change it back. It was preferable to change the small Qwt header set than to recompile a special boost just for the signalslib change. The header file suggested in the link makes things easier, but at the end of the day it was QT3 that was stomping on other libraries' shoes, and that has now been fixed. Legacy problems should be left in the past... QT is an evolving beast that changes and improves... it is not Microsoft's ancient GDI library that hasn't evolved with the times (it is instead pushed aside with new GDI libraries every few years, Forms, WPL, etc). The only change you need make in your code is in the way you > reference the boost::signals namespace. If you make this > You also had to recompile boost with custom flags. I did it for years and it pissed me off as its not straight forward, and shouldn't need to be done in the first place. change in your code once, it doesn't matter then if Qwt > or any other Qt-derived library updates to the new Q_SIGNALS > macros or not. Likewise, it is independent of changes in boost, > since presumably the header file would live in a local directory, > not in boost. > I would imagine/hope that QT libraries will slowly start to use the Q_ macros. I wonder what KDE4 uses? However, I know nothing of your project, and it might be > that your existing code is so extensive (or has been validated) > such that editing it is out of the question. > > Thanks for pointing out this problem. I use boost extensively > (though not the signals library) and was ignorant of the fact > that there were clashes with Qt. Everything else has worked just > fine right out of the box. > As I mentioned in the other email, all I (personally) need is some sort of program/script to do the conversions. Once the script/program has been written, it can either live on my personal system, or it can be incorporated into Qwt and therefore benefit the rest of the users if they desire to use it. cheers, Paul |