Commit ed00382b authored by jpetrell's avatar jpetrell

[sharing] Show account icon on sharing list. Contributes to JB#35260

parent e8806542
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
info.displayName = QLatin1String("Bluetooth"); info.displayName = QLatin1String("Bluetooth");
info.userName = ""; info.userName = "";
info.accountId = ""; info.accountId = "";
info.accountIcon = QLatin1String("image://theme/icon-m-bluetooth");
info.methodId = QLatin1String("bluetooth"); info.methodId = QLatin1String("bluetooth");
info.shareUIPath = SHARE_UI_PATH + QLatin1String("/BluetoothShareUI.qml"); info.shareUIPath = SHARE_UI_PATH + QLatin1String("/BluetoothShareUI.qml");
info.capabilitities = capabilities; info.capabilitities = capabilities;
...@@ -75,7 +76,8 @@ TransferMethodInfo::TransferMethodInfo(): ...@@ -75,7 +76,8 @@ TransferMethodInfo::TransferMethodInfo():
methodId(), methodId(),
shareUIPath(), shareUIPath(),
capabilitities(), capabilitities(),
accountId() accountId(),
accountIcon()
{ {
} }
...@@ -90,6 +92,7 @@ TransferMethodInfo &TransferMethodInfo::operator=(const TransferMethodInfo &othe ...@@ -90,6 +92,7 @@ TransferMethodInfo &TransferMethodInfo::operator=(const TransferMethodInfo &othe
shareUIPath = other.shareUIPath; shareUIPath = other.shareUIPath;
capabilitities = other.capabilitities; capabilitities = other.capabilitities;
accountId = other.accountId; accountId = other.accountId;
accountIcon = other.accountIcon;
return *this; return *this;
} }
...@@ -102,7 +105,8 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other): ...@@ -102,7 +105,8 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other):
methodId(other.methodId), methodId(other.methodId),
shareUIPath(other.shareUIPath), shareUIPath(other.shareUIPath),
capabilitities(other.capabilitities), capabilitities(other.capabilitities),
accountId(other.accountId) accountId(other.accountId),
accountIcon(other.accountIcon)
{ {
} }
...@@ -126,7 +130,8 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfo &inf ...@@ -126,7 +130,8 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfo &inf
<< info.methodId << info.methodId
<< info.shareUIPath << info.shareUIPath
<< info.capabilitities << info.capabilitities
<< info.accountId; << info.accountId
<< info.accountIcon;
argument.endStructure(); argument.endStructure();
return argument; return argument;
...@@ -143,7 +148,8 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInf ...@@ -143,7 +148,8 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInf
>> info.methodId >> info.methodId
>> info.shareUIPath >> info.shareUIPath
>> info.capabilitities >> info.capabilitities
>> info.accountId; >> info.accountId
>> info.accountIcon;
argument.endStructure(); argument.endStructure();
return argument; return argument;
...@@ -176,6 +182,8 @@ QVariant TransferMethodInfo::value(int index) const ...@@ -176,6 +182,8 @@ QVariant TransferMethodInfo::value(int index) const
return capabilitities; return capabilitities;
case AccountId: case AccountId:
return accountId; return accountId;
case AccountIcon:
return accountIcon;
default: default:
return QVariant(); return QVariant();
} }
......
...@@ -39,8 +39,9 @@ public: ...@@ -39,8 +39,9 @@ public:
enum TransferMethodInfoField { enum TransferMethodInfoField {
DisplayName, // e.g. Facebook DisplayName, // e.g. Facebook
UserName, // e.g. mike.myers@gmail.com UserName, // e.g. mike.myers@gmail.com
MethodId, // Id of the plugin MethodId, // id of the plugin
AccountId, // Id the account, needed in a case of multiple accounts AccountId, // id the account, needed in a case of multiple accounts
AccountIcon, // account icon source
ShareUIPath, // path to the share ui QML plugin ShareUIPath, // path to the share ui QML plugin
Capabilities // list of supported mimetypes Capabilities // list of supported mimetypes
}; };
...@@ -64,6 +65,7 @@ public: ...@@ -64,6 +65,7 @@ public:
QString shareUIPath; QString shareUIPath;
QStringList capabilitities; QStringList capabilitities;
quint32 accountId; quint32 accountId;
QString accountIcon;
}; };
#endif // TRANSFERMETHODINFO_H #endif // TRANSFERMETHODINFO_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment