PDA

View Full Version : qt3to4 - The Qt 3 to 4 Porting Tool - The Journey



mkts
9th December 2010, 18:28
Hi All
I took the old project not only made in Qt3 but using std-lib’s as well.
I used qt3to4 tool but not all the changes made by it are not good for now and I have not experience with it. So please take a loot and if You will have an idea where or how to solve this I would be grateful.


FSColor.h
#ifndef __FSColor_h__
#define __FSColor_h__ 1

#include "FSTransformObject.h"
#include <q3painter.h>

namespace transform {

class FSColor : public FSTransformObject
{
public:
FSColor(FSInputStream* aStream);
FSColor();
FSColor(int r, int g, int b, int a = 255)
: Qt::red(r) // Qt:: added by tool and error point
, Qt::green(g) // error: expected class-name before ‘(’ token
, Qt::blue(b)
, alpha(a)
{}
...
};
}


I have tried a couple of methods to solve this problem but i am here now.

wysota
9th December 2010, 18:37
But what is the problem? If you have "red", "green" and "blue" variables in your class then simply remove those "Qt::" prefixes.