[Development] QtDriveInfo module in Playground

Thiago Macieira thiago.macieira at intel.com
Fri Mar 1 16:50:12 CET 2013


On sexta-feira, 1 de março de 2013 10.52.41, Olivier Goffart wrote:
> qdisplayinfo_linux.cpp:50 is:
> Q_GLOBAL_STATIC_WITH_ARGS(const QString, BACKLIGHT_SYSFS_PATH,  
>                                 (QStringLiteral("/sys/class/backlight/")))
> 

> Is that something we should fix in Q_GLOBAL_STATIC_WITH_ARGS ?  or should
> we  jsut say that lambda expressions or QStringLiteral are not allowed in
> Q_GLOBAL_STATIC_WITH_ARGS ?

It's just too much overhead the way it's written. It's much simpler as:

static QString backlightSysfsPath()
{
    return QStringLiteral("/sys/class/backlight/");
}

QStringLiteral is optimised for that case.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130301/e8b9ea13/attachment.sig>


More information about the Development mailing list