Just set UDSEntry::UDS_NAME to the actual directory name instead of the hardcoded string "folder" and don't set UDSEntry::UDS_DISPLAY_NAME at all
Summary: There is no reason to set UDSEntry::UDS_NAME to "folder" and then override it with UDSEntry::UDS_DISPLAY_NAME Test Plan: Apply patch, click android device in dolphin's Devices list Verify phones sdcards are listed as befor Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: albertvaka, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D18223
This commit is contained in:
parent
708262e195
commit
4834b63537
2 changed files with 3 additions and 2 deletions
|
@ -162,8 +162,7 @@ void KioKdeconnect::listDevice()
|
||||||
const QString icon = QStringLiteral("folder");
|
const QString icon = QStringLiteral("folder");
|
||||||
|
|
||||||
KIO::UDSEntry entry;
|
KIO::UDSEntry entry;
|
||||||
entry.insert(KIO::UDSEntry::UDS_NAME, QStringLiteral("files"));
|
entry.insert(KIO::UDSEntry::UDS_NAME, name);
|
||||||
entry.insert(KIO::UDSEntry::UDS_DISPLAY_NAME, name);
|
|
||||||
entry.insert(KIO::UDSEntry::UDS_ICON_NAME, icon);
|
entry.insert(KIO::UDSEntry::UDS_ICON_NAME, icon);
|
||||||
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
|
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
|
||||||
entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
||||||
|
@ -178,6 +177,7 @@ void KioKdeconnect::listDevice()
|
||||||
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
|
entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
|
||||||
entry.insert(KIO::UDSEntry::UDS_SIZE, 0);
|
entry.insert(KIO::UDSEntry::UDS_SIZE, 0);
|
||||||
entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
entry.insert(KIO::UDSEntry::UDS_ACCESS, S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IXOTH);
|
||||||
|
|
||||||
listEntry(entry);
|
listEntry(entry);
|
||||||
|
|
||||||
infoMessage(QLatin1String(""));
|
infoMessage(QLatin1String(""));
|
||||||
|
|
|
@ -68,6 +68,7 @@ SftpPlugin::~SftpPlugin()
|
||||||
void SftpPlugin::addToDolphin()
|
void SftpPlugin::addToDolphin()
|
||||||
{
|
{
|
||||||
removeFromDolphin();
|
removeFromDolphin();
|
||||||
|
|
||||||
QUrl kioUrl("kdeconnect://"+deviceId+"/");
|
QUrl kioUrl("kdeconnect://"+deviceId+"/");
|
||||||
d->m_placesModel.addPlace(device()->name(), kioUrl, QStringLiteral("kdeconnect"));
|
d->m_placesModel.addPlace(device()->name(), kioUrl, QStringLiteral("kdeconnect"));
|
||||||
qCDebug(KDECONNECT_PLUGIN_SFTP) << "add to dolphin";
|
qCDebug(KDECONNECT_PLUGIN_SFTP) << "add to dolphin";
|
||||||
|
|
Loading…
Reference in a new issue