Consider functions like below:
class1::class1() { class3 obj3 = new class3(this); } void class1::function1() { class2 *obj2 = new class2(); connect(
You should only call connect once. Move your code that calls connect to a different function that is only called once.
connect