There are many compile errors on implicit casts of QPointer<T>&
in signal/slot connection when building with GCC < 5.x. The following error happens when building with GCC 4.8.4:
... no matching function for call to ‘QObject::connect(QPointer<T>&, ...)’
... no matching function for call to ‘QObject::disconnect(QPointer<T>&, ...)’
It's apparently a compiler bug that fixed in GCC 5.x and later. However, working around it is not very costly, and GCC 4.8 is supposed to should be supported. Similar report in Qt Bug Database QTBUG-69512.
src/card/base/CardConnectionWorker.cpp
(Click to expand)
/tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp: In constructor ‘governikus::CardConnectionWorker::CardConnectionWorker(governikus::Reader*)’:
/tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:21:94: error: no matching function for call to ‘governikus::CardConnectionWorker::connect(QPointer&, void (governikus::Reader::*)(const QString&), governikus::CardConnectionWorker* const, void (governikus::CardConnectionWorker::*)(const QString&))’
connect(mReader, &Reader::fireCardInserted, this, &CardConnectionWorker::onReaderInfoChanged);
^
/tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:21:94: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mReader, &Reader::fireCardInserted, this, &CardConnectionWorker::onReaderInfoChanged);
^
.../tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:22:93: error: no matching function for call to ‘governikus::CardConnectionWorker::connect(QPointer&, void (governikus::Reader::*)(const QString&), governikus::CardConnectionWorker* const, void (governikus::CardConnectionWorker::*)(const QString&))’
connect(mReader, &Reader::fireCardRemoved, this, &CardConnectionWorker::onReaderInfoChanged);
^
/tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:22:93: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mReader, &Reader::fireCardRemoved, this, &CardConnectionWorker::onReaderInfoChanged);
^
.../tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:23:105: error: no matching function for call to ‘governikus::CardConnectionWorker::connect(QPointer&, void (governikus::Reader::*)(const QString&), governikus::CardConnectionWorker* const, void (governikus::CardConnectionWorker::*)(const QString&))’
connect(mReader, &Reader::fireCardRetryCounterChanged, this, &CardConnectionWorker::onReaderInfoChanged);
^
/tmp/AusweisApp2/src/card/base/CardConnectionWorker.cpp:23:105: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mReader, &Reader::fireCardRetryCounterChanged, this, &CardConnectionWorker::onReaderInfoChanged);
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-gnu-zero-variadic-macro-arguments" [enabled by default]
src/qml/HistoryModel.cpp
(Click to expand)
/tmp/AusweisApp2/src/qml/HistoryModel.cpp: In constructor ‘governikus::HistoryModel::HistoryModel(governikus::HistorySettings*, QObject*)’:
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:122:115: error: no matching function for call to ‘governikus::HistoryModel::connect(QPointer&, void (governikus::HistorySettings::*)(), governikus::HistoryModel* const, void (governikus::HistoryModel::*)())’
connect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:122:115: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
.../tmp/AusweisApp2/src/qml/HistoryModel.cpp:123:105: error: no matching function for call to ‘governikus::HistoryModel::connect(QPointer&, void (governikus::HistorySettings::*)(bool), governikus::HistoryModel* const, void (governikus::HistoryModel::*)(bool))’
connect(mHistorySettings, &HistorySettings::fireEnabledChanged, this, &HistoryModel::fireEnabledChanged);
^
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:123:105: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mHistorySettings, &HistorySettings::fireEnabledChanged, this, &HistoryModel::fireEnabledChanged);
^
.../tmp/AusweisApp2/src/qml/HistoryModel.cpp: In member function ‘virtual bool governikus::HistoryModel::removeRows(int, int, const QModelIndex&)’:
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:369:118: error: no matching function for call to ‘governikus::HistoryModel::disconnect(QPointer&, void (governikus::HistorySettings::*)(), governikus::HistoryModel* const, void (governikus::HistoryModel::*)())’
disconnect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:369:118: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
disconnect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
.../tmp/AusweisApp2/src/qml/HistoryModel.cpp:371:115: error: no matching function for call to ‘governikus::HistoryModel::connect(QPointer&, void (governikus::HistorySettings::*)(), governikus::HistoryModel* const, void (governikus::HistoryModel::*)())’
connect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
/tmp/AusweisApp2/src/qml/HistoryModel.cpp:371:115: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mHistorySettings, &HistorySettings::fireHistoryInfosChanged, this, &HistoryModel::onHistoryEntriesChanged);
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-gnu-zero-variadic-macro-arguments" [enabled by default]
src/widget/DiagnosisGui.cpp
(Click to expand)
/tmp/AusweisApp2/src/widget/DiagnosisGui.cpp: In member function ‘void governikus::DiagnosisGui::activate()’:
/tmp/AusweisApp2/src/widget/DiagnosisGui.cpp:50:72: error: no matching function for call to ‘governikus::DiagnosisGui::connect(QPointer&, void (QDialog::*)(int), governikus::DiagnosisGui* const, void (governikus::DiagnosisGui::*)())’
connect(mDialog, &QDialog::finished, this, &DiagnosisGui::fireFinished);
^
/tmp/AusweisApp2/src/widget/DiagnosisGui.cpp:50:72: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mDialog, &QDialog::finished, this, &DiagnosisGui::fireFinished);
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-gnu-zero-variadic-macro-arguments" [enabled by default]
src/widget/SetupAssistantGui.cpp
(Click to expand)
/tmp/AusweisApp2/src/widget/SetupAssistantGui.cpp: In member function ‘void governikus::SetupAssistantGui::activate()’:
/tmp/AusweisApp2/src/widget/SetupAssistantGui.cpp:39:123: error: no matching function for call to ‘governikus::SetupAssistantGui::connect(QPointer&, void (governikus::SetupAssistantWizard::*)(), governikus::SetupAssistantGui* const, void (governikus::SetupAssistantGui::*)())’
connect(mWizard, &SetupAssistantWizard::fireChangePinButtonClicked, this, &SetupAssistantGui::fireChangePinButtonClicked);
^
/tmp/AusweisApp2/src/widget/SetupAssistantGui.cpp:39:123: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mWizard, &SetupAssistantWizard::fireChangePinButtonClicked, this, &SetupAssistantGui::fireChangePinButtonClicked);
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-gnu-zero-variadic-macro-arguments" [enabled by default]
src/widget/step/StepChooseCardGui.cpp
(Click to expand)
/tmp/AusweisApp2/src/widget/step/StepChooseCardGui.cpp: In constructor ‘governikus::StepChooseCardGui::StepChooseCardGui(const QSharedPointer&, governikus::AuthenticateStepsWidget*)’:
/tmp/AusweisApp2/src/widget/step/StepChooseCardGui.cpp:42:105: error: no matching function for call to ‘governikus::StepChooseCardGui::connect(QPointer&, void (governikus::ReaderDeviceGui::*)(), governikus::StepChooseCardGui* const, void (governikus::StepChooseCardGui::*)())’
connect(mReaderDeviceGui, &ReaderDeviceGui::fireFinished, this, &StepChooseCardGui::onSubDialogFinished);
^
/tmp/AusweisApp2/src/widget/step/StepChooseCardGui.cpp:42:105: note: mismatched types ‘const typename QtPrivate::FunctionPointer::Object*’ and ‘QPointer’
connect(mReaderDeviceGui, &ReaderDeviceGui::fireFinished, this, &StepChooseCardGui::onSubDialogFinished);
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-gnu-zero-variadic-macro-arguments" [enabled by default]