mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 10:26:03 +08:00
refs #466 Resolved miscellaneous TODO items.
This commit is contained in:
@@ -63,16 +63,6 @@ namespace BlackCore
|
|||||||
return make_unique<CAudioMixerVatlib>(this);
|
return make_unique<CAudioMixerVatlib>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME:
|
|
||||||
Can the following methods be more general somehow?
|
|
||||||
E.g.:
|
|
||||||
template <typename Input, typename Output>
|
|
||||||
connectVoice(Input input, Output output)
|
|
||||||
{
|
|
||||||
...
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void CVoiceVatlib::connectVoice(IAudioInputDevice *device, IAudioMixer *mixer, IAudioMixer::InputPort inputPort)
|
void CVoiceVatlib::connectVoice(IAudioInputDevice *device, IAudioMixer *mixer, IAudioMixer::InputPort inputPort)
|
||||||
{
|
{
|
||||||
auto audioInputVatlib = qobject_cast<CAudioInputDeviceVatlib*>(device);
|
auto audioInputVatlib = qobject_cast<CAudioInputDeviceVatlib*>(device);
|
||||||
|
|||||||
@@ -151,6 +151,8 @@ uint BlackMisc::calculateHash(const QList<int> &values, const char *className)
|
|||||||
return calculateHash(list, className);
|
return calculateHash(list, className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
|
||||||
|
|
||||||
QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int localUserType)
|
QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int localUserType)
|
||||||
{
|
{
|
||||||
// my business?
|
// my business?
|
||||||
@@ -163,7 +165,7 @@ QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int loc
|
|||||||
if (localUserType < userType)
|
if (localUserType < userType)
|
||||||
{
|
{
|
||||||
// complex Qt type, e.g. QDateTime
|
// complex Qt type, e.g. QDateTime
|
||||||
return BlackMisc::complexQtTypeFromDbusArgument(arg, localUserType);
|
return complexQtTypeFromDbusArgument(arg, localUserType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -179,7 +181,7 @@ QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int loc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant BlackMisc::complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type)
|
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type)
|
||||||
{
|
{
|
||||||
// QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
|
// QDate = 14, QTime = 15, QDateTime = 16, QUrl = 17,
|
||||||
|
|
||||||
|
|||||||
@@ -254,17 +254,6 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
BLACKMISC_EXPORT QVariant fixQVariantFromDbusArgument(const QVariant &variant, int localUserType);
|
BLACKMISC_EXPORT QVariant fixQVariantFromDbusArgument(const QVariant &variant, int localUserType);
|
||||||
|
|
||||||
/*!
|
|
||||||
* Convert a QDBusArgument back to a concrete type if required
|
|
||||||
* This is a workaround if a QVariant is sent via DBus, QDBusArgument is
|
|
||||||
* received and Qt is not able to get the original QVariant back
|
|
||||||
* \param argument send via DBus
|
|
||||||
* \param type Metatype
|
|
||||||
* \return QVariant generated from the above
|
|
||||||
* \todo To be removed if a better solution is found
|
|
||||||
*/
|
|
||||||
BLACKMISC_EXPORT QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
|
|
||||||
|
|
||||||
//! Display all user metatypes
|
//! Display all user metatypes
|
||||||
//! \remarks Used in order to debug code, do not remove
|
//! \remarks Used in order to debug code, do not remove
|
||||||
BLACKMISC_EXPORT void displayAllUserMetatypesTypes(QTextStream &out);
|
BLACKMISC_EXPORT void displayAllUserMetatypesTypes(QTextStream &out);
|
||||||
|
|||||||
@@ -235,13 +235,6 @@ namespace BlackMisc
|
|||||||
: m_name(name), m_symbol(symbol), m_epsilon(0.0), m_displayDigits(0)
|
: m_name(name), m_symbol(symbol), m_epsilon(0.0), m_displayDigits(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//! \copydoc CValueObject::stringForStreaming
|
|
||||||
// todo: Causes build error. Ask KB is still required.
|
|
||||||
// virtual QString stringForStreaming() const override
|
|
||||||
// {
|
|
||||||
// return this->getName(false);
|
|
||||||
// }
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CMeasurementUnit() = default;
|
virtual ~CMeasurementUnit() = default;
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ namespace BlackMisc
|
|||||||
template <class Derived>
|
template <class Derived>
|
||||||
struct AttributeComparable<Derived, false, false>
|
struct AttributeComparable<Derived, false, false>
|
||||||
{
|
{
|
||||||
template <class T> using isCValueObject = typename std::is_base_of<CEmpty, T>::type; // FIXME use TemplateIsBaseOf
|
template <class T> using isCValueObject = typename std::is_base_of<CEmpty, T>::type; // historical use case, may need tweaking in future
|
||||||
friend int compare(const Derived &a, const Derived &b) { return compareHelper(a.m_obj, b.m_obj, isCValueObject<Derived>()); }
|
friend int compare(const Derived &a, const Derived &b) { return compareHelper(a.m_obj, b.m_obj, isCValueObject<Derived>()); }
|
||||||
friend bool operator ==(const Derived &a, const Derived &b) { return a.m_obj == b.m_obj; }
|
friend bool operator ==(const Derived &a, const Derived &b) { return a.m_obj == b.m_obj; }
|
||||||
friend bool operator !=(const Derived &a, const Derived &b) { return a.m_obj != b.m_obj; }
|
friend bool operator !=(const Derived &a, const Derived &b) { return a.m_obj != b.m_obj; }
|
||||||
|
|||||||
Reference in New Issue
Block a user