mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
Cleanup: toFormattedQString was not really used and just redirecting toQString
* marked deprecated * and replaced by toQString
This commit is contained in:
@@ -1282,7 +1282,7 @@ namespace BlackCore
|
|||||||
if (msgs.isEmpty()) { return false; }
|
if (msgs.isEmpty()) { return false; }
|
||||||
if (!msgs.hasErrorMessages()) { return false; }
|
if (!msgs.hasErrorMessages()) { return false; }
|
||||||
CApplication::cmdLineErrorMessage(
|
CApplication::cmdLineErrorMessage(
|
||||||
msgs.toFormattedQString(true)
|
msgs.toQString(true)
|
||||||
);
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace BlackCore
|
|||||||
QStringLiteral(" ") %
|
QStringLiteral(" ") %
|
||||||
CEntityFlags::flagToString(this->getEntities()) %
|
CEntityFlags::flagToString(this->getEntities()) %
|
||||||
QStringLiteral(" ") %
|
QStringLiteral(" ") %
|
||||||
this->m_cacheLifetime.toFormattedQString(i18n);
|
this->m_cacheLifetime.toQString(i18n);
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntityFlags::Entity CDatabaseReaderConfig::getEntities() const
|
CEntityFlags::Entity CDatabaseReaderConfig::getEntities() const
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CHotkeyDialog::combinationSelectionChanged(const CHotkeyCombination &combination)
|
void CHotkeyDialog::combinationSelectionChanged(const CHotkeyCombination &combination)
|
||||||
{
|
{
|
||||||
ui->pb_SelectedHotkey->setText(combination.toFormattedQString());
|
ui->pb_SelectedHotkey->setText(combination.toQString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHotkeyDialog::combinationSelectionFinished(const CHotkeyCombination &combination)
|
void CHotkeyDialog::combinationSelectionFinished(const CHotkeyCombination &combination)
|
||||||
@@ -216,7 +216,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CHotkeyDialog::synchronizeSimpleSelection()
|
void CHotkeyDialog::synchronizeSimpleSelection()
|
||||||
{
|
{
|
||||||
ui->pb_SelectedHotkey->setText(m_actionHotkey.getCombination().toFormattedQString());
|
ui->pb_SelectedHotkey->setText(m_actionHotkey.getCombination().toQString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CHotkeyDialog::synchronizeAdvancedSelection()
|
void CHotkeyDialog::synchronizeAdvancedSelection()
|
||||||
|
|||||||
@@ -134,22 +134,22 @@ namespace BlackGui
|
|||||||
static const CIcon iconRadio(CIcon::iconByIndex(CIcons::StandardIconRadio16));
|
static const CIcon iconRadio(CIcon::iconByIndex(CIcons::StandardIconRadio16));
|
||||||
static const CIcon iconAttitude(CIcon::iconByIndex(CIcons::AviationAttitudeIndicator));
|
static const CIcon iconAttitude(CIcon::iconByIndex(CIcons::AviationAttitudeIndicator));
|
||||||
|
|
||||||
this->addOrUpdateLiveDataByName("latitude", s.latitude().toFormattedQString(), iconLatLng);
|
this->addOrUpdateLiveDataByName("latitude", s.latitude().toQString(), iconLatLng);
|
||||||
this->addOrUpdateLiveDataByName("longitude", s.longitude().toFormattedQString(), iconLatLng);
|
this->addOrUpdateLiveDataByName("longitude", s.longitude().toQString(), iconLatLng);
|
||||||
this->addOrUpdateLiveDataByName("altitude", s.getAltitude().valueRoundedWithUnit(CLengthUnit::ft(), 2), iconAlt);
|
this->addOrUpdateLiveDataByName("altitude", s.getAltitude().valueRoundedWithUnit(CLengthUnit::ft(), 2), iconAlt);
|
||||||
if (s.hasGroundElevation())
|
if (s.hasGroundElevation())
|
||||||
{
|
{
|
||||||
this->addOrUpdateLiveDataByName("elevation", s.getGroundElevation().valueRoundedWithUnit(CLengthUnit::ft(), 2), iconAlt);
|
this->addOrUpdateLiveDataByName("elevation", s.getGroundElevation().valueRoundedWithUnit(CLengthUnit::ft(), 2), iconAlt);
|
||||||
}
|
}
|
||||||
this->addOrUpdateLiveDataByName("pitch", s.getPitch().toFormattedQString(), iconAttitude);
|
this->addOrUpdateLiveDataByName("pitch", s.getPitch().toQString(), iconAttitude);
|
||||||
this->addOrUpdateLiveDataByName("bank", s.getBank().toFormattedQString(), iconAttitude);
|
this->addOrUpdateLiveDataByName("bank", s.getBank().toQString(), iconAttitude);
|
||||||
this->addOrUpdateLiveDataByName("heading", s.getHeading().toFormattedQString(), s.getHeading().toIcon());
|
this->addOrUpdateLiveDataByName("heading", s.getHeading().toQString(), s.getHeading().toIcon());
|
||||||
this->addOrUpdateLiveDataByName("ground speed", s.getGroundSpeed().toFormattedQString(), s.getGroundSpeed().toIcon());
|
this->addOrUpdateLiveDataByName("ground speed", s.getGroundSpeed().toQString(), s.getGroundSpeed().toIcon());
|
||||||
|
|
||||||
this->addOrUpdateLiveDataByName("COM1 active", c1.getFrequencyActive().toFormattedQString(), iconRadio);
|
this->addOrUpdateLiveDataByName("COM1 active", c1.getFrequencyActive().toQString(), iconRadio);
|
||||||
this->addOrUpdateLiveDataByName("COM2 active", c2.getFrequencyActive().toFormattedQString(), iconRadio);
|
this->addOrUpdateLiveDataByName("COM2 active", c2.getFrequencyActive().toQString(), iconRadio);
|
||||||
this->addOrUpdateLiveDataByName("COM1 standby", c1.getFrequencyStandby().toFormattedQString(), iconRadio);
|
this->addOrUpdateLiveDataByName("COM1 standby", c1.getFrequencyStandby().toQString(), iconRadio);
|
||||||
this->addOrUpdateLiveDataByName("COM2 standby", c2.getFrequencyStandby().toFormattedQString(), iconRadio);
|
this->addOrUpdateLiveDataByName("COM2 standby", c2.getFrequencyStandby().toQString(), iconRadio);
|
||||||
this->addOrUpdateLiveDataByName("Transponder", ownAircraft.getTransponderCodeFormatted(), iconRadio);
|
this->addOrUpdateLiveDataByName("Transponder", ownAircraft.getTransponderCodeFormatted(), iconRadio);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ namespace BlackMisc
|
|||||||
template<class K, class V> QString qmapToString(const QMap<K, V> &map)
|
template<class K, class V> QString qmapToString(const QMap<K, V> &map)
|
||||||
{
|
{
|
||||||
QString s;
|
QString s;
|
||||||
const QString kv("%1: %2 ");
|
static const QString kv("%1: %2 ");
|
||||||
QMapIterator<K, V> i(map);
|
QMapIterator<K, V> i(map);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
@@ -240,6 +240,7 @@ namespace BlackMisc
|
|||||||
QString toQString(bool i18n = false) const { return derived()->convertToQString(i18n); }
|
QString toQString(bool i18n = false) const { return derived()->convertToQString(i18n); }
|
||||||
|
|
||||||
//! Cast to pretty-printed QString
|
//! Cast to pretty-printed QString
|
||||||
|
//! \deprecated not really used and just using toQString
|
||||||
QString toFormattedQString(bool i18n = false) const { return derived()->toQString(i18n); }
|
QString toFormattedQString(bool i18n = false) const { return derived()->toQString(i18n); }
|
||||||
|
|
||||||
//! To std string
|
//! To std string
|
||||||
@@ -253,15 +254,17 @@ namespace BlackMisc
|
|||||||
Derived *derived() { return static_cast<Derived *>(this); }
|
Derived *derived() { return static_cast<Derived *>(this); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// *INDENT-OFF*
|
||||||
/*!
|
/*!
|
||||||
* When a derived class and a base class both inherit from Mixin::String,
|
* When a derived class and a base class both inherit from Mixin::String,
|
||||||
* the derived class uses this macro to disambiguate the inherited members.
|
* the derived class uses this macro to disambiguate the inherited members.
|
||||||
*/
|
*/
|
||||||
# define BLACKMISC_DECLARE_USING_MIXIN_STRING(DERIVED) \
|
# define BLACKMISC_DECLARE_USING_MIXIN_STRING(DERIVED) \
|
||||||
using ::BlackMisc::Mixin::String<DERIVED>::toQString; \
|
using ::BlackMisc::Mixin::String<DERIVED>::toQString; \
|
||||||
using ::BlackMisc::Mixin::String<DERIVED>::toFormattedQString; \
|
using ::BlackMisc::Mixin::String<DERIVED>::toFormattedQString; \
|
||||||
using ::BlackMisc::Mixin::String<DERIVED>::toStdString; \
|
using ::BlackMisc::Mixin::String<DERIVED>::toStdString; \
|
||||||
using ::BlackMisc::Mixin::String<DERIVED>::stringForStreaming;
|
using ::BlackMisc::Mixin::String<DERIVED>::stringForStreaming;
|
||||||
|
// *INDENT-ON*
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ namespace BlackMisc
|
|||||||
using Mixin::String<Derived>::toQString;
|
using Mixin::String<Derived>::toQString;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::String::toFormattedQString
|
//! \copydoc BlackMisc::Mixin::String::toFormattedQString
|
||||||
|
//! \deprecated not really used and just using toQString
|
||||||
using Mixin::String<Derived>::toFormattedQString;
|
using Mixin::String<Derived>::toFormattedQString;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::String::toStdString
|
//! \copydoc BlackMisc::Mixin::String::toStdString
|
||||||
|
|||||||
Reference in New Issue
Block a user