D7401: Solid/Mac : fleshing out the skeleton IOKit backend (WIP)

Anthony Fieroni noreply at phabricator.kde.org
Sun Oct 22 10:32:25 UTC 2017


anthonyfieroni added inline comments.

INLINE COMMENTS

> cfhelper.cpp:51-56
> +static QVariant q_toVariant(const CFTypeRef &obj, bool verbose=false)
>  {
>      const CFTypeID typeId = CFGetTypeID(obj);
> +// 	if (verbose) {
> +// 		qWarning() << "CFTypeID for obj" << obj << "=" << typeId << q_toString(CFCopyTypeIDDescription(typeId));
> +// 	}

Remove verbose

> iokitdevice.cpp:148
> +{
> +    QString qModel = QString();
> +    char *model = NULL;

QString has a default constructor.

> iokitdevice.cpp:149
> +    QString qModel = QString();
> +    char *model = NULL;
> +    size_t size = 0;

nullptr even on C functions

> iokitdevice.cpp:293-294
> +    case Solid::DeviceInterface::Processor:
> +        return Processor::vendor();
> +        break;
> +    case Solid::DeviceInterface::Battery:

break after return is useless

> iokitdevice.cpp:375-377
> +            return "computer-laptop";
> +        } else {
> +            return "computer";

QStringLiteral

> iokitmanager.cpp:95-98
> +        return "IOMedia";
> +    case Solid::DeviceInterface::OpticalDrive:
> +    case Solid::DeviceInterface::OpticalDisc:
> +        return "IOCDMedia";

QStrinLiteral

> iokitopticaldrive.h:33
> +{
> +class IOKitOpticalDrive : public IOKitStorage, virtual public Solid::Ifaces::OpticalDrive
> +{

I see that all classes have a virtual inheritance but i don't see they are exported.

REPOSITORY
  R245 Solid

REVISION DETAIL
  https://phabricator.kde.org/D7401

To: rjvbb, #frameworks
Cc: anthonyfieroni, cgilles, kde-mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-mac/attachments/20171022/9c569453/attachment.html>


More information about the kde-mac mailing list