the_bis
10th November 2006, 11:37
Hi,
I have to use standard C++ socket instead of QT QSocket object.
So I've used this code:
if (connect(socketDescriptor,
(struct sockaddr *) &serverAddress,
sizeof(serverAddress)) < 0) {
cerr << "cannot connect\n";
exit(1);
}
but this conflicts with a "QObject::connect" I use in an other part of my code.
So I have this error:
qtnclient.cpp: In member function ‘QString DeviceConfiguration::getValueFromServer(QString&, int&, QString&, DeviceConfiguration::configDatabyModule&)’:
qtnclient.cpp:484: error: no matching function for call to ‘DeviceConfiguration::connect(int&, sockaddr*, unsigned int)’
/usr/include/qt3/qobject.h:116: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*)
/usr/include/qt3/qobject.h:226: note: bool QObject::connect(const QObject*, const char*, const char*) const
I need to use "QObject::connect" in a part of my program but I need also to use the standard C/C++ "connect" in another part of my program...
Any help?
Thanks,
the_bis
I have to use standard C++ socket instead of QT QSocket object.
So I've used this code:
if (connect(socketDescriptor,
(struct sockaddr *) &serverAddress,
sizeof(serverAddress)) < 0) {
cerr << "cannot connect\n";
exit(1);
}
but this conflicts with a "QObject::connect" I use in an other part of my code.
So I have this error:
qtnclient.cpp: In member function ‘QString DeviceConfiguration::getValueFromServer(QString&, int&, QString&, DeviceConfiguration::configDatabyModule&)’:
qtnclient.cpp:484: error: no matching function for call to ‘DeviceConfiguration::connect(int&, sockaddr*, unsigned int)’
/usr/include/qt3/qobject.h:116: note: candidates are: static bool QObject::connect(const QObject*, const char*, const QObject*, const char*)
/usr/include/qt3/qobject.h:226: note: bool QObject::connect(const QObject*, const char*, const char*) const
I need to use "QObject::connect" in a part of my program but I need also to use the standard C/C++ "connect" in another part of my program...
Any help?
Thanks,
the_bis