Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kfileplacesitem.cpp
Show All 22 Lines | |||||
23 | #include <QtCore/QDateTime> | 23 | #include <QtCore/QDateTime> | ||
24 | #include <QIcon> | 24 | #include <QIcon> | ||
25 | 25 | | |||
26 | #include <kbookmarkmanager.h> | 26 | #include <kbookmarkmanager.h> | ||
27 | #include <kiconloader.h> | 27 | #include <kiconloader.h> | ||
28 | #include <klocalizedstring.h> | 28 | #include <klocalizedstring.h> | ||
29 | #include <KConfig> | 29 | #include <KConfig> | ||
30 | #include <KConfigGroup> | 30 | #include <KConfigGroup> | ||
31 | #include <kprotocolinfo.h> | ||||
31 | #include <solid/block.h> | 32 | #include <solid/block.h> | ||
32 | #include <solid/opticaldisc.h> | 33 | #include <solid/opticaldisc.h> | ||
33 | #include <solid/opticaldrive.h> | 34 | #include <solid/opticaldrive.h> | ||
34 | #include <solid/storageaccess.h> | 35 | #include <solid/storageaccess.h> | ||
35 | #include <solid/storagevolume.h> | 36 | #include <solid/storagevolume.h> | ||
36 | #include <solid/storagedrive.h> | 37 | #include <solid/storagedrive.h> | ||
37 | #include <solid/portablemediaplayer.h> | 38 | #include <solid/portablemediaplayer.h> | ||
38 | 39 | | |||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | 100 | } else { | |||
100 | m_text = bookmark.text(); | 101 | m_text = bookmark.text(); | ||
101 | } | 102 | } | ||
102 | 103 | | |||
103 | const GroupType type = groupType(); | 104 | const GroupType type = groupType(); | ||
104 | switch (type) { | 105 | switch (type) { | ||
105 | case PlacesType: | 106 | case PlacesType: | ||
106 | m_groupName = i18nc("@item", "Places"); | 107 | m_groupName = i18nc("@item", "Places"); | ||
107 | break; | 108 | break; | ||
109 | case RemoteType: | ||||
110 | m_groupName = i18nc("@item", "Remote"); | ||||
111 | break; | ||||
108 | case RecentlySavedType: | 112 | case RecentlySavedType: | ||
109 | m_groupName = i18nc("@item", "Recently Saved"); | 113 | m_groupName = i18nc("@item", "Recently Saved"); | ||
110 | break; | 114 | break; | ||
111 | case SearchForType: | 115 | case SearchForType: | ||
112 | m_groupName = i18nc("@item", "Search For"); | 116 | m_groupName = i18nc("@item", "Search For"); | ||
113 | break; | 117 | break; | ||
114 | case DevicesType: | 118 | case DevicesType: | ||
115 | m_groupName = i18nc("@item", "Devices"); | 119 | m_groupName = i18nc("@item", "Devices"); | ||
Show All 37 Lines | 149 | if (!isDevice()) { | |||
153 | } | 157 | } | ||
154 | 158 | | |||
155 | if (protocol == QLatin1String("bluetooth") || | 159 | if (protocol == QLatin1String("bluetooth") || | ||
156 | protocol == QLatin1String("obexftp") || | 160 | protocol == QLatin1String("obexftp") || | ||
157 | protocol == QLatin1String("kdeconnect")) { | 161 | protocol == QLatin1String("kdeconnect")) { | ||
158 | return DevicesType; | 162 | return DevicesType; | ||
159 | } | 163 | } | ||
160 | 164 | | |||
165 | if (protocol == QLatin1String("remote") || | ||||
166 | KProtocolInfo::protocolClass(protocol) != QLatin1String(":local")) { | ||||
mlaurent: != QLatin1String(":local") | |||||
167 | return RemoteType; | ||||
168 | } else { | ||||
161 | return PlacesType; | 169 | return PlacesType; | ||
162 | } | 170 | } | ||
171 | } | ||||
163 | 172 | | |||
164 | if (m_drive && (m_drive->isHotpluggable() || m_drive->isRemovable())) { | 173 | if (m_drive && (m_drive->isHotpluggable() || m_drive->isRemovable())) { | ||
165 | return RemovableDevicesType; | 174 | return RemovableDevicesType; | ||
166 | } else { | 175 | } else { | ||
167 | return DevicesType; | 176 | return DevicesType; | ||
168 | } | 177 | } | ||
169 | } | 178 | } | ||
170 | 179 | | |||
▲ Show 20 Lines • Show All 217 Lines • Show Last 20 Lines |
!= QLatin1String(":local")