Hey everyone<br><br>This week I have been working on improving the Nepomuk kioslaves, and I've encountered a problem with Dolphin (and Konqueror). The problem is explained in quite detail in this bug report [1]. The basic problem is that the user should never see "nepomuk:res/uuid". It's the internal name of the resource and it should not matter to the user.<br>
<br>The problem comes when opening nepomuk uris via the nepomuk kio slave. For example - The user searches for "Coldplay" (via krunner) and gets a "Contact" which they select. This gives them a url of the form 'nepomuk:/res/adfafadf', and opens it with the file manager. Dolphin then displays this URL via the nepomuk kio slave, and the files related to "Coldplay" are shown.<br>
<br>The problematic part is that the window title (and tab name) are displayed as "nepomuk - res/uuid", which is ugly. I checked and the UDS_DISPLAY_NAME, is set to "Coldplay". But Dolphin operates only on URLs.<br>
<br>Here is the relevant code -<br><br>// dolphinmainwindow.cpp:2025<br>QString DolphinMainWindow::tabName(const KUrl& url) const<br>{<br>    QString name;<br>    if (url.equals(KUrl("file:///"))) {<br>        name = '/';<br>
    } else {<br>        name = url.fileName();<br>        if (name.isEmpty()) {<br>            name = url.protocol();<br>        } else {<br>            // Make sure that a '&' inside the directory name is displayed correctly<br>
            // and not misinterpreted as a keyboard shortcut in QTabBar::setTabText()<br>            name.replace('&', "&&");<br>        }<br>    }<br>    return name;<br>}<br><br>This clearly only operates on the URL instead of the UDS Entries. Would it be a big change to stat the url and then use the display name? ( KFileItem::text() ? )<br>
<br>Or does anyone have any other suggestions on how to improve it? I could possibly redirect the url to the nepomuksearch:/ url (which it actually does internally via the ForwardingSlaveBase), so that a proper name is shown? I'm not sure.<br>
<br>Opinions?<br><br>[1] <a href="https://bugs.kde.org/show_bug.cgi?id=287259">https://bugs.kde.org/show_bug.cgi?id=287259</a><br clear="all"><br>-- <br><span style="color:rgb(192,192,192)">Vishesh Handa</span><br><br>