Hi,
I have the following problem:
Here is a class constructor:
MTelemetry
(QString sPort,quint16 dataPort,quint16 viewPort,
QString logFileName,
QString dataServer
="localhost",
MTelemetry(QString sPort,quint16 dataPort,quint16 viewPort,QString logFileName,QString dataServer="localhost",
QString viewServer="localhost",QObject *parent = 0) throw(MException): QThread(parent)
To copy to clipboard, switch view to plain text mode
And then, I subclass MTelemtry so:
class MCamCon : public MTelemetry
{
Q_OBJECT
private:
public:
MCamCon
(QString sPort,quint16 dataPort,quint16 viewPort
=0,
QString dataServer
="localhost",
//some code
};
class MCamCon : public MTelemetry
{
Q_OBJECT
private:
public:
MCamCon(QString sPort,quint16 dataPort,quint16 viewPort=0,QString dataServer="localhost",
QString viewServer="localhost",QObject *parent = 0);
//some code
};
To copy to clipboard, switch view to plain text mode
And the implementatio:
MCamCon
::MCamCon(QString sPort, quint16 dataPort,quint16 viewPort,
QString dataServer,
: MTelemetry(sPort, dataPort, viewPort, dataServer, viewServer, parent)
{
}
MCamCon::MCamCon(QString sPort, quint16 dataPort,quint16 viewPort,QString dataServer,
QString viewServer,QObject *parent)
: MTelemetry(sPort, dataPort, viewPort, dataServer, viewServer, parent)
{
}
To copy to clipboard, switch view to plain text mode
The compiler complains:
mcamcon.cpp:25: error: no matching function for call to ‘TM::MTelemetry::MTelemetry(QString
&, quint16
&, quint16
&, QString
&, QString
&, QObject*
&)’
../../Globals/include/mtelemetry.h:198: note: candidates are: TM::MTelemetry::MTelemetry(QString, quint16, quint16, QString, QString, QString, QObject*)
Yet as you can see, I am not passing by reference...
What am I missing here?
Thanks.
Bookmarks