Strange problem, already looked into with several colleagues... Using Qt Creator and Qt 4.8.5
- define an object
- set a number of values with setters
- request values with a getters
- result: getting an int no problem, all other values give segmentation fault
- but with breakpoint in debugger the values are correctly shown, so they are in the object!
same code worked before, problem "just appeared". Compiler issue?
private: int id; QString name; public; int getId() { return this->id; } // OK void setId(int id) { this->id = id; } QString getName() { return this->name; } // SIGSEGV void setName(QString name) { this->name = name; }
Any ideas? Same issue known?
UPDATE
Changed code to this, based on comments, still same issue
private:
int id;
QString name;
public;
int getId() { return id; } // OK
void setId(int setTo) { id = setTo; }
QString getName() { return name; } // SIGSEGV
void setName(QString setTo) { name = setTo; }