https://bugs.kde.org/show_bug.cgi?id=407139

Michael Pyne <mp...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mp...@kde.org

--- Comment #3 from Michael Pyne <mp...@kde.org> ---
Oddly, KGlobalAccel does appear to have some code in its DBus component handler
to try to clean up paths to conform to DBus requirements. See
src/runtime/component.cpp:203:

    QDBusObjectPath Component::dbusPath() const                                 
    {                                                                           
    QString dbusPath = _uniqueName;                                             
    // Clean up for dbus usage: any non-alphanumeric char should be turned into
'_'                                    
    const int len = dbusPath.length();                                          
    for ( int i = 0; i < len; ++i )                                             
        {                                                                       
        if ( !dbusPath[i].isLetterOrNumber() )                                  
            dbusPath[i] = QLatin1Char('_');                                     
        }                                                                       
    // QDBusObjectPath could be a little bit easier to handle :-)               
    return QDBusObjectPath( _registry->dbusPath().path() + "component/" +
dbusPath);                                   
    } 

The problem seems to be the ".isLetterOrNumber" check, which doesn't actually
strip non-ASCII characters. Since every character in "bébé" is a Unicode
letter, no translation happens here. Added a check that the QChar returned by
dbusPath[i] is actually a latin-1 characters (e.g. with QChar::toLatin1) would
seem to be necessary.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to