Since C++11 the standard no longer mandates the existence of an
implicit copy constructor if there is a user-supplied copy assignment
operator, and GCC 9 warns about that:
src/qtui/settingspages/dccsettingspage.cpp: In member function ‘virtual void DccSettingsPage::load()’:
src/qtui/settingspages/dccsettingspage.cpp:91:71: warning: implicitly-declared ‘DccConfig::DccConfig(const DccConfig&)’ is deprecated [-Wdeprecated-copy]
Remove the copy assignment operator altogether and rely on the
implicitly generated one, which does the same thing.
setAllowClientUpdates(true);
}
-DccConfig& DccConfig::operator=(const DccConfig& other)
-{
- if (this == &other)
- return *this;
-
- SyncableObject::operator=(other);
-
- static auto propCount = staticMetaObject.propertyCount();
- for (int i = 0; i < propCount; ++i) {
- auto propName = staticMetaObject.property(i).name();
- setProperty(propName, other.property(propName));
- }
-
- return *this;
-}
-
bool DccConfig::operator==(const DccConfig& other)
{
// NOTE: We don't compare the SyncableObject attributes (isInitialized, clientUpdatesAllowed())
*/
DccConfig(QObject* parent = nullptr);
- /**
- * Assignment operator.
- *
- * @note Only assigns properties relevant for config management!
- *
- * @param[in] other Right-hand side instance
- * @returns The updated instance
- */
- DccConfig& operator=(const DccConfig& other);
-
/**
* Equality operator.
*