Macros for simplifying transferring code from another framework
-
Hello!
I'm porting my C++ Windows-project built with Embarcadero RAD Studio to Linux with Qt. So I have many statements in my code like that:
@Menu->Enabled = true;@
For Qt it should be transformed like that:
@Menu->setEnabled(true);@
So now I'm losing a lot of time commenting code. Is there a way to do this replacement automatically (maybe by writinf some macros using #define or something using Qt)?
-
Macros like that would be a nightmare to maintain. I would go for a careful text replacement. "Enabled = true" -> "setEnabled(true)" shouldn't be that difficult. And of course test the bejesus out of it afterwards (you do have unit tests right?).
-
Hi,
When porting an application like that it can become vital to ensure you didn't broke anything.