[handler] Improve text if a file is shared
Summary: The handler allows to easily integrate file sharing into various file managers. Make it appear nicer by removing the scheme and using a different wording when sending files Test Plan: {F6382616} Reviewers: #kde_connect, apol Reviewed By: #kde_connect, apol Subscribers: apol, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D16605
This commit is contained in:
parent
2a8938e09f
commit
357751ac68
1 changed files with 4 additions and 1 deletions
|
@ -85,7 +85,7 @@ int main(int argc, char** argv)
|
|||
proxyModel.setSourceModel(&model);
|
||||
|
||||
QDialog dialog;
|
||||
dialog.setWindowTitle(urlToShare.toDisplayString());
|
||||
dialog.setWindowTitle(urlToShare.toDisplayString(QUrl::PreferLocalFile));
|
||||
Ui::Dialog uidialog;
|
||||
uidialog.setupUi(&dialog);
|
||||
uidialog.devicePicker->setModel(&proxyModel);
|
||||
|
@ -93,6 +93,9 @@ int main(int argc, char** argv)
|
|||
if (urlToShare.scheme() == QLatin1String("tel")) {
|
||||
uidialog.label->setText(i18n("Device to call this phone number with:"));
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString(QUrl::RemoveScheme));
|
||||
} else if (urlToShare.isLocalFile()) {
|
||||
uidialog.label->setText(i18n("Device to send this file to:"));
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString(QUrl::PreferLocalFile));
|
||||
} else {
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue