From b1a3793c2fc725726c40ef139071ffa1cc510bc7 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Mon, 14 Sep 2015 22:57:19 +0100 Subject: [PATCH] refs #466 Resolved miscellaneous TODO items. --- src/blackcore/voice_vatlib.cpp | 10 ---------- src/blackmisc/blackmiscfreefunctions.cpp | 6 ++++-- src/blackmisc/blackmiscfreefunctions.h | 11 ----------- src/blackmisc/pq/measurementunit.h | 7 ------- src/blackmisc/tuple_private.h | 2 +- 5 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/blackcore/voice_vatlib.cpp b/src/blackcore/voice_vatlib.cpp index 370e62c6e..3a34023a4 100644 --- a/src/blackcore/voice_vatlib.cpp +++ b/src/blackcore/voice_vatlib.cpp @@ -63,16 +63,6 @@ namespace BlackCore return make_unique(this); } - /* FIXME: - Can the following methods be more general somehow? - E.g.: - template - connectVoice(Input input, Output output) - { - ... - } - */ - void CVoiceVatlib::connectVoice(IAudioInputDevice *device, IAudioMixer *mixer, IAudioMixer::InputPort inputPort) { auto audioInputVatlib = qobject_cast(device); diff --git a/src/blackmisc/blackmiscfreefunctions.cpp b/src/blackmisc/blackmiscfreefunctions.cpp index 8a1b3b8bc..595f7a024 100644 --- a/src/blackmisc/blackmiscfreefunctions.cpp +++ b/src/blackmisc/blackmiscfreefunctions.cpp @@ -151,6 +151,8 @@ uint BlackMisc::calculateHash(const QList &values, const char *className) return calculateHash(list, className); } +QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type); + QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int localUserType) { // my business? @@ -163,7 +165,7 @@ QVariant BlackMisc::fixQVariantFromDbusArgument(const QVariant &variant, int loc if (localUserType < userType) { // complex Qt type, e.g. QDateTime - return BlackMisc::complexQtTypeFromDbusArgument(arg, localUserType); + return complexQtTypeFromDbusArgument(arg, localUserType); } 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, diff --git a/src/blackmisc/blackmiscfreefunctions.h b/src/blackmisc/blackmiscfreefunctions.h index d62ac758b..9d7734f85 100644 --- a/src/blackmisc/blackmiscfreefunctions.h +++ b/src/blackmisc/blackmiscfreefunctions.h @@ -254,17 +254,6 @@ namespace BlackMisc */ 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 //! \remarks Used in order to debug code, do not remove BLACKMISC_EXPORT void displayAllUserMetatypesTypes(QTextStream &out); diff --git a/src/blackmisc/pq/measurementunit.h b/src/blackmisc/pq/measurementunit.h index 66cfad8a9..05120ac2a 100644 --- a/src/blackmisc/pq/measurementunit.h +++ b/src/blackmisc/pq/measurementunit.h @@ -235,13 +235,6 @@ namespace BlackMisc : 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: //! Destructor virtual ~CMeasurementUnit() = default; diff --git a/src/blackmisc/tuple_private.h b/src/blackmisc/tuple_private.h index 8afa2eaae..e4a735c51 100644 --- a/src/blackmisc/tuple_private.h +++ b/src/blackmisc/tuple_private.h @@ -146,7 +146,7 @@ namespace BlackMisc template struct AttributeComparable { - template using isCValueObject = typename std::is_base_of::type; // FIXME use TemplateIsBaseOf + template using isCValueObject = typename std::is_base_of::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()); } 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; }