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 @@
info.displayName = QLatin1String("Bluetooth");
info.userName = "";
info.accountId = "";
info.accountIcon = QLatin1String("image://theme/icon-m-bluetooth");
info.methodId = QLatin1String("bluetooth");
info.shareUIPath = SHARE_UI_PATH + QLatin1String("/BluetoothShareUI.qml");
info.capabilitities = capabilities;
......@@ -75,7 +76,8 @@ TransferMethodInfo::TransferMethodInfo():
methodId(),
shareUIPath(),
capabilitities(),
accountId()
accountId(),
accountIcon()
{
}
......@@ -90,6 +92,7 @@ TransferMethodInfo &TransferMethodInfo::operator=(const TransferMethodInfo &othe
shareUIPath = other.shareUIPath;
capabilitities = other.capabilitities;
accountId = other.accountId;
accountIcon = other.accountIcon;
return *this;
}
......@@ -102,7 +105,8 @@ TransferMethodInfo::TransferMethodInfo(const TransferMethodInfo &other):
methodId(other.methodId),
shareUIPath(other.shareUIPath),
capabilitities(other.capabilitities),
accountId(other.accountId)
accountId(other.accountId),
accountIcon(other.accountIcon)
{
}
......@@ -126,7 +130,8 @@ QDBusArgument &operator<<(QDBusArgument &argument, const TransferMethodInfo &inf
<< info.methodId
<< info.shareUIPath
<< info.capabilitities
<< info.accountId;
<< info.accountId
<< info.accountIcon;
argument.endStructure();
return argument;
......@@ -143,7 +148,8 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, TransferMethodInf
>> info.methodId
>> info.shareUIPath
>> info.capabilitities
>> info.accountId;
>> info.accountId
>> info.accountIcon;
argument.endStructure();
return argument;
......@@ -176,6 +182,8 @@ QVariant TransferMethodInfo::value(int index) const
return capabilitities;
case AccountId:
return accountId;
case AccountIcon:
return accountIcon;
default:
return QVariant();
}
......
......@@ -39,8 +39,9 @@ public:
enum TransferMethodInfoField {
DisplayName, // e.g. Facebook
UserName, // e.g. mike.myers@gmail.com
MethodId, // Id of the plugin
AccountId, // Id the account, needed in a case of multiple accounts
MethodId, // id of the plugin
AccountId, // id the account, needed in a case of multiple accounts
AccountIcon, // account icon source
ShareUIPath, // path to the share ui QML plugin
Capabilities // list of supported mimetypes
};
......@@ -64,6 +65,7 @@ public:
QString shareUIPath;
QStringList capabilitities;
quint32 accountId;
QString accountIcon;
};
#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