Hi there!
I've got an complicated error. The software send PrintParamters to a Printer a couple of times. At a certain moment all QStrings of the Parameter Struct are broken (bad ptr)
Is there an general issue with QStrings in Structs?
here is the struct I'm using:
typedef struct RecorderPrintParam {
ES_DataType xxxxxxxxxx;
bool xxxxxxxxxxx;
bool xxxxxxxxxxxx;
bool xxxxxxxxxxxx;
int xxxxxxxxxxxxxxxxxxxxxx;
double xxxxxxxxxxxxxxx;
double xxxxxxxxxx;
bool xxxxxxxxxxx;
int xxxxxxxxxxxxxxx;
double xxxxxxxxxxx;
bool xxxxxxxxxxx;
bool xxxxxxxxxx;
double xxxxxxxxx;
QString xname;
QString yname;
QString anotherValue;
QString opername;
QString region;
QString application;
QString version;
AxisUnit axUnit ;
double axLenM;
double xxxxxxxx;
double xxxxxxxx;
int xxxxxxxx;
double xxxxxxxxx;
double xxxxxxxxx;
bool xxxxxxxxxxxxxxx; /
double xxxxxxxxxxxxxxx;
double xxxxxxxxxx;
bool xxxxxxxxx;
}RecorderPrintParam;
Here is how the struct is been used: called from a GUI-Class:
void
MyDlg::UpdateRecorderPrintParameters()
{
RecorderPrintParam param;
....
....
param.xname = QString("abc def 123");
_recorder->setParam(¶m);
}
param.xname already has a bad ascii ptr !! ? I also tried to use just = "abc def 123" instead of = QString("abc def 123"); but it's the same error that occurs
This is how the setParam functions looks like:
RecorderInterface::setParam(RecorderPrintParam *up)
{
....
...
if(up->xname.compare(_myParams.xname)!=0 ) _newHeaderPrint=true;
...
...
}
}
xname has still an address at that moment"8xname = {d=0x08e2d568 }", but xname.ascii has a 0x00000000 pointer