Here's what the base class ads look like:
protected: void indexAll(); void cleanAll();
In a derived class, the following does not compile:
indexAll(); // OK connect(&_timer, &QTimer::timeout, this, &FileIndex::indexAll); // ERROR connect(&_timer, SIGNAL(timeout()), this, SLOT(indexAll())); // OK
I would like to use the first connect option, as it does some compile-time checks. Why does this return an error:
error: 'void Files::FileIndex::indexAll()' is protected void FileIndex::indexAll() ^ [...].cpp:246:58: error: within this context connect(&_timer, &QTimer::timeout, this, &FileIndex::indexAll); ^
source share