[URL Handler] Special-case label for phone URLs
It's a lot nicer than "sending a URL" Differential Revision: https://phabricator.kde.org/D10069
This commit is contained in:
parent
6ff4dd914e
commit
686e3f98a9
1 changed files with 8 additions and 1 deletions
|
@ -89,7 +89,14 @@ int main(int argc, char** argv)
|
|||
Ui::Dialog uidialog;
|
||||
uidialog.setupUi(&dialog);
|
||||
uidialog.devicePicker->setModel(&proxyModel);
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString());
|
||||
|
||||
if (urlToShare.scheme() == QLatin1String("tel")) {
|
||||
uidialog.label->setText(i18n("Device to call this phone number with:"));
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString(QUrl::RemoveScheme));
|
||||
} else {
|
||||
uidialog.urlLabel->setText(urlToShare.toDisplayString());
|
||||
}
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted) {
|
||||
QUrl url = urlToShare;
|
||||
const int currentDeviceIndex = uidialog.devicePicker->currentIndex();
|
||||
|
|
Loading…
Reference in a new issue