mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T545 Removed redundant constructors that are now inherited.
This commit is contained in:
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
|
||||
bool CDownloadComponent::setDownloadFile(const CRemoteFile &remoteFile)
|
||||
{
|
||||
return this->setDownloadFiles(CRemoteFileList(remoteFile));
|
||||
return this->setDownloadFiles(CRemoteFileList { remoteFile });
|
||||
}
|
||||
|
||||
bool CDownloadComponent::setDownloadFiles(const CRemoteFileList &remoteFiles)
|
||||
|
||||
@@ -21,10 +21,6 @@ namespace BlackMisc
|
||||
CSequence<CAircraftParts>(other)
|
||||
{ }
|
||||
|
||||
CAircraftPartsList::CAircraftPartsList(std::initializer_list<CAircraftParts> il) :
|
||||
CSequence<CAircraftParts>(il)
|
||||
{ }
|
||||
|
||||
int CAircraftPartsList::setOnGround(bool onGround)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAircraftPartsList(const CSequence<CAircraftParts> &other);
|
||||
|
||||
//! Construct from initializer list.
|
||||
CAircraftPartsList(std::initializer_list<CAircraftParts> il);
|
||||
|
||||
//! Set on ground for all entries
|
||||
int setOnGround(bool onGround);
|
||||
};
|
||||
|
||||
@@ -19,10 +19,6 @@ namespace BlackMisc
|
||||
CSequence<CAircraftSituationChange>(other)
|
||||
{ }
|
||||
|
||||
CAircraftSituationChangeList::CAircraftSituationChangeList(std::initializer_list<CAircraftSituationChange> il) :
|
||||
CSequence<CAircraftSituationChange>(il)
|
||||
{ }
|
||||
|
||||
CAircraftSituationChange CAircraftSituationChangeList::frontOrNull() const
|
||||
{
|
||||
if (this->isEmpty()) { return CAircraftSituationChange::null(); }
|
||||
|
||||
@@ -38,9 +38,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAircraftSituationChangeList(const CSequence<CAircraftSituationChange> &other);
|
||||
|
||||
//! Construct from initializer list.
|
||||
CAircraftSituationChangeList(std::initializer_list<CAircraftSituationChange> il);
|
||||
|
||||
//! Front or NULL
|
||||
CAircraftSituationChange frontOrNull() const;
|
||||
|
||||
|
||||
@@ -33,10 +33,6 @@ namespace BlackMisc
|
||||
CSequence<CAircraftSituation>(other)
|
||||
{ }
|
||||
|
||||
CAircraftSituationList::CAircraftSituationList(std::initializer_list<CAircraftSituation> il) :
|
||||
CSequence<CAircraftSituation>(il)
|
||||
{ }
|
||||
|
||||
CAircraftSituation CAircraftSituationList::frontOrNull() const
|
||||
{
|
||||
if (this->isEmpty()) { return CAircraftSituation::null(); }
|
||||
|
||||
@@ -53,9 +53,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAircraftSituationList(const CSequence<CAircraftSituation> &other);
|
||||
|
||||
//! Construct from initializer list.
|
||||
CAircraftSituationList(std::initializer_list<CAircraftSituation> il);
|
||||
|
||||
//! Front or NULL
|
||||
CAircraftSituation frontOrNull() const;
|
||||
|
||||
|
||||
@@ -36,9 +36,6 @@ namespace BlackMisc
|
||||
//! Construct from single callsign
|
||||
CCallsignSet(const CCallsign &callsign);
|
||||
|
||||
//! Initializer list constructor.
|
||||
CCallsignSet(std::initializer_list<CCallsign> il) : CCollection<CCallsign>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCallsignSet(const CCollection<CCallsign> &other);
|
||||
|
||||
|
||||
@@ -22,9 +22,5 @@ namespace BlackMisc
|
||||
CCoordinateGeodeticList::CCoordinateGeodeticList(const CSequence<CCoordinateGeodetic> &other) :
|
||||
CSequence<CCoordinateGeodetic>(other)
|
||||
{ }
|
||||
|
||||
CCoordinateGeodeticList::CCoordinateGeodeticList(std::initializer_list<CCoordinateGeodetic> il) :
|
||||
CSequence<CCoordinateGeodetic>(il)
|
||||
{ }
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CCoordinateGeodeticList();
|
||||
|
||||
//! Construct by coordinates
|
||||
CCoordinateGeodeticList(std::initializer_list<CCoordinateGeodetic> coordinates);
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCoordinateGeodeticList(const CSequence<CCoordinateGeodetic> &other);
|
||||
};
|
||||
|
||||
@@ -38,9 +38,6 @@ namespace BlackMisc
|
||||
//! Default constructor
|
||||
CActionHotkeyList() = default;
|
||||
|
||||
//! Construct from std::initializer_list<bool>
|
||||
CActionHotkeyList(std::initializer_list<CActionHotkey> il) : CSequence<CActionHotkey>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CActionHotkeyList(const CSequence<CActionHotkey> &baseClass);
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Input
|
||||
{
|
||||
CHotkeyCombination::CHotkeyCombination(CKeyboardKey key) : CHotkeyCombination(CKeyboardKeyList(key))
|
||||
CHotkeyCombination::CHotkeyCombination(CKeyboardKey key) : CHotkeyCombination(CKeyboardKeyList { key })
|
||||
{ }
|
||||
|
||||
CHotkeyCombination::CHotkeyCombination(const CKeyboardKeyList &keys) : m_keyboardKeys(keys)
|
||||
|
||||
@@ -39,9 +39,6 @@ namespace BlackMisc
|
||||
|
||||
//! Construct from a base class object.
|
||||
CJoystickButtonList(const CSequence<CJoystickButton> &baseClass);
|
||||
|
||||
//! Initializer list constructor.
|
||||
CJoystickButtonList(std::initializer_list<CJoystickButton> il) : CSequence<CJoystickButton>(il) {}
|
||||
};
|
||||
|
||||
} //namespace
|
||||
|
||||
@@ -15,11 +15,6 @@ namespace BlackMisc
|
||||
{
|
||||
CKeyboardKeyList::CKeyboardKeyList() { }
|
||||
|
||||
CKeyboardKeyList::CKeyboardKeyList(CKeyboardKey key)
|
||||
{
|
||||
this->push_back(key);
|
||||
}
|
||||
|
||||
CKeyboardKeyList::CKeyboardKeyList(const CSequence<CKeyboardKey> &baseClass) :
|
||||
CSequence<CKeyboardKey>(baseClass)
|
||||
{ }
|
||||
|
||||
@@ -38,15 +38,9 @@ namespace BlackMisc
|
||||
//! Default constructor
|
||||
CKeyboardKeyList();
|
||||
|
||||
//! Init by single key
|
||||
CKeyboardKeyList(CKeyboardKey key);
|
||||
|
||||
//! Construct from a base class object.
|
||||
CKeyboardKeyList(const CSequence<CKeyboardKey> &baseClass);
|
||||
|
||||
//! Initializer list constructor.
|
||||
CKeyboardKeyList(std::initializer_list<CKeyboardKey> il) : CSequence<CKeyboardKey>(il) {}
|
||||
|
||||
//! All key strings
|
||||
QStringList getKeyStrings() const;
|
||||
|
||||
|
||||
@@ -45,24 +45,12 @@ namespace BlackMisc
|
||||
//! By single element
|
||||
CLogCategoryList(const CLogCategory &category) { this->push_back(category); }
|
||||
|
||||
//! Copy constructor.
|
||||
CLogCategoryList(const CLogCategoryList &) = default;
|
||||
|
||||
//! Copy construct from superclass instance.
|
||||
CLogCategoryList(const CSequence<CLogCategory> &other) : CSequence<CLogCategory>(other) {}
|
||||
|
||||
//! Initializer list constructor.
|
||||
CLogCategoryList(std::initializer_list<CLogCategory> il) : CSequence<CLogCategory>(il) {}
|
||||
|
||||
//! Prevent accidental use of the initializer list constructor.
|
||||
CLogCategoryList(std::nullptr_t) = delete;
|
||||
|
||||
//! Copy assignment.
|
||||
CLogCategoryList &operator =(const CLogCategoryList &) = default;
|
||||
|
||||
//! Copy assign from superclass instance.
|
||||
CLogCategoryList &operator =(const CSequence<CLogCategory> &other) { CSequence<CLogCategory>::operator =(other); return *this; }
|
||||
|
||||
/*!
|
||||
* Construct by extracting categories from a class T.
|
||||
*
|
||||
|
||||
@@ -17,10 +17,6 @@ namespace BlackMisc
|
||||
CRawFsdMessageList::CRawFsdMessageList(const CSequence &other) : CSequence<CRawFsdMessage>(other)
|
||||
{ }
|
||||
|
||||
CRawFsdMessageList::CRawFsdMessageList(std::initializer_list<CRawFsdMessage> il) :
|
||||
CSequence<CRawFsdMessage>(il)
|
||||
{ }
|
||||
|
||||
CRawFsdMessageList CRawFsdMessageList::findByPacketType(const QString &type) const
|
||||
{
|
||||
return this->findBy([ & ](const CRawFsdMessage &rawFsdMessage)
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CRawFsdMessageList(const CSequence &other);
|
||||
|
||||
//! Construct from initializer list.
|
||||
CRawFsdMessageList(std::initializer_list<CRawFsdMessage> il);
|
||||
|
||||
//! Find by a given list of raw messages which are type
|
||||
CRawFsdMessageList findByPacketType(const QString &type) const;
|
||||
|
||||
|
||||
@@ -24,11 +24,6 @@ namespace BlackMisc
|
||||
CSequence<CRemoteFile>(other)
|
||||
{ }
|
||||
|
||||
CRemoteFileList::CRemoteFileList(const CRemoteFile &remoteFile)
|
||||
{
|
||||
this->push_back(remoteFile);
|
||||
}
|
||||
|
||||
QStringList CRemoteFileList::getNames(bool sorted) const
|
||||
{
|
||||
QStringList fileNames;
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CRemoteFileList(const CSequence<CRemoteFile> &other);
|
||||
|
||||
//! From single file
|
||||
CRemoteFileList(const CRemoteFile &remoteFile);
|
||||
|
||||
//! All file names
|
||||
QStringList getNames(bool sorted = true) const;
|
||||
|
||||
|
||||
@@ -129,12 +129,8 @@ namespace BlackMisc
|
||||
CUrlList(listOfUrls), m_maxTrials(maxTrials)
|
||||
{ }
|
||||
|
||||
CFailoverUrlList::CFailoverUrlList(const CSequence<CUrl> &other, int maxTrials) :
|
||||
CUrlList(other), m_maxTrials(maxTrials)
|
||||
{ }
|
||||
|
||||
CFailoverUrlList::CFailoverUrlList(const CUrlList &urlIst) :
|
||||
CUrlList(urlIst)
|
||||
CFailoverUrlList::CFailoverUrlList(const CUrlList &urlIst, int maxTrials) :
|
||||
CUrlList(urlIst), m_maxTrials(maxTrials)
|
||||
{ }
|
||||
|
||||
CUrlList CFailoverUrlList::getWithoutFailed() const
|
||||
|
||||
@@ -78,11 +78,8 @@ namespace BlackMisc
|
||||
//! By list of URLs
|
||||
explicit CFailoverUrlList(const QStringList &listOfUrls, int maxTrials = 2);
|
||||
|
||||
//! Construct from a base class object.
|
||||
CFailoverUrlList(const CSequence<CUrl> &other, int maxTrials = 2);
|
||||
|
||||
//! From url list
|
||||
CFailoverUrlList(const CUrlList &urlIst);
|
||||
CFailoverUrlList(const CUrlList &urlIst, int maxTrials = 2);
|
||||
|
||||
//! All failed URLs
|
||||
const CUrlList &getFailedUrls() const { return m_failedUrls; }
|
||||
|
||||
@@ -21,9 +21,6 @@ namespace BlackMisc
|
||||
{
|
||||
CPlatformSet::CPlatformSet() { }
|
||||
|
||||
CPlatformSet::CPlatformSet(std::initializer_list<CPlatform> il) : CCollection<CPlatform>(il)
|
||||
{ }
|
||||
|
||||
CPlatformSet::CPlatformSet(const CCollection<CPlatform> &other) : CCollection<CPlatform>(other)
|
||||
{ }
|
||||
|
||||
|
||||
@@ -30,9 +30,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CPlatformSet();
|
||||
|
||||
//! Initializer list constructor.
|
||||
CPlatformSet(std::initializer_list<CPlatform> il);
|
||||
|
||||
//! Construct from a base class object.
|
||||
CPlatformSet(const CCollection<CPlatform> &other);
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace BlackMisc
|
||||
|
||||
CPropertyIndexList CPropertyIndexVariantMap::indexes() const
|
||||
{
|
||||
return CSequence<CPropertyIndex>(m_values.keys());
|
||||
return m_values.keys();
|
||||
}
|
||||
|
||||
int CPropertyIndexVariantMap::size() const
|
||||
|
||||
@@ -12,7 +12,4 @@ namespace BlackMisc
|
||||
{
|
||||
CVariantList::CVariantList(const CSequence &other) : CSequence(other)
|
||||
{}
|
||||
|
||||
CVariantList::CVariantList(std::initializer_list<CVariant> il) : CSequence(il)
|
||||
{}
|
||||
} // ns
|
||||
|
||||
@@ -33,9 +33,6 @@ namespace BlackMisc
|
||||
|
||||
//! Construct from a base class object.
|
||||
CVariantList(const CSequence &other);
|
||||
|
||||
//! Initializer list constructor.
|
||||
CVariantList(std::initializer_list<CVariant> il);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CVariantMap() {}
|
||||
|
||||
//! Initializer list constructor.
|
||||
CVariantMap(std::initializer_list<std::pair<QString, CVariant>> il) : CDictionary(il) {}
|
||||
|
||||
//! Copy constructor.
|
||||
CVariantMap(const CVariantMap &) = default;
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CCloudLayerList() = default;
|
||||
|
||||
//! Initializer list constructor.
|
||||
CCloudLayerList(std::initializer_list<CCloudLayer> il) : CSequence<CCloudLayer>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCloudLayerList(const CSequence<CCloudLayer> &other);
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CTemperatureLayerList() = default;
|
||||
|
||||
//! Initializer list constructor.
|
||||
CTemperatureLayerList(std::initializer_list<CTemperatureLayer> il) : CSequence<CTemperatureLayer>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CTemperatureLayerList(const CSequence<CTemperatureLayer> &other);
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CVisibilityLayerList() = default;
|
||||
|
||||
//! Initializer list constructor.
|
||||
CVisibilityLayerList(std::initializer_list<CVisibilityLayer> il) : CSequence<CVisibilityLayer>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CVisibilityLayerList(const CSequence<CVisibilityLayer> &other);
|
||||
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CWeatherGrid() = default;
|
||||
|
||||
//! Initializer list constructor.
|
||||
CWeatherGrid(std::initializer_list<CGridPoint> il) : CSequence<CGridPoint>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CWeatherGrid(const CSequence<CGridPoint> &other);
|
||||
|
||||
|
||||
@@ -40,9 +40,6 @@ namespace BlackMisc
|
||||
//! Default constructor.
|
||||
CWindLayerList() = default;
|
||||
|
||||
//! Initializer list constructor.
|
||||
CWindLayerList(std::initializer_list<CWindLayer> il) : CSequence<CWindLayer>(il) {}
|
||||
|
||||
//! Construct from a base class object.
|
||||
CWindLayerList(const CSequence<CWindLayer> &other);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user