Hi,

I'm subclassing QHttp to a class called HttpSyncr.

I have the following slot declarations in HttpSyncr.h:
Qt Code:
  1. public slots:
  2. void ReceiveResponseHeader(const QHttpResponseHeader& header);
  3. void HttpRequestStarted(int id);
  4. void HttpRequestFinished(int id, bool error);
To copy to clipboard, switch view to plain text mode 

This is how I'm connecting:
Qt Code:
  1. HttpSyncr::HttpSyncr(QObject *parent)
  2. : QHttp(parent)
  3. {
  4. bool res = connect(this, SIGNAL(responseHeaderReceived(const QHttpResponseHeader&)), this, SLOT(ReceiveResponseHeader(const QHttpResponseHeader&)));
  5. res = connect(this, SIGNAL(requestStarted(int)), this, SLOT(HttpRequestStarted(int)));
  6. res = connect(this, SIGNAL(requestFinished(int, bool)), this, SLOT(HttpRequestFinished(int, bool)));
  7.  
  8. }
To copy to clipboard, switch view to plain text mode 

I figured that simply specifying 'this' as both source and target would be okay, but the slot is getting defined incorrectly. My debug output from the connect() function is:
Object::connect: No such slot QHttp::ReceiveResponseHeader(QHttpResponseHeader)
Object::connect: No such slot QHttp::HttpRequestStarted(int)
Object::connect: No such slot QHttp::HttpRequestFinished(int,bool)
Is there a way to force MOC to know that the slot is actually in HttpSyncr and not the base class?


Steve