diff --git a/kcm/akonadicontactactions.ui b/kcm/akonadicontactactions.ui
--- a/kcm/akonadicontactactions.ui
+++ b/kcm/akonadicontactactions.ui
@@ -126,9 +126,9 @@
-
+
- 3
+ 0
@@ -164,39 +164,6 @@
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 6
-
-
- 0
-
-
-
-
- Command:
-
-
-
-
-
-
-
-
-
diff --git a/kcm/kcmakonadicontactactions.cpp b/kcm/kcmakonadicontactactions.cpp
--- a/kcm/kcmakonadicontactactions.cpp
+++ b/kcm/kcmakonadicontactactions.cpp
@@ -49,10 +49,10 @@
mConfigManager = addConfig(ContactActionsSettings::self(), this);
+ ui.DialPhoneNumberAction->addItem(i18n("System Default"), ContactActionsSettings::UseSystemDefault);
ui.DialPhoneNumberAction->addItem(i18n("Skype"), ContactActionsSettings::UseSkype);
ui.DialPhoneNumberAction->addItem(i18n("Ekiga"), ContactActionsSettings::UseEkiga);
ui.DialPhoneNumberAction->addItem(i18n("SflPhone"), ContactActionsSettings::UseSflPhone);
- ui.DialPhoneNumberAction->addItem(i18n("kdeconnect"), ContactActionsSettings::UseKdeConnectPhone);
ui.DialPhoneNumberAction->addItem(i18n("External Application"), ContactActionsSettings::UseExternalPhoneApplication);
connect(ui.DialPhoneNumberAction, QOverload::of(&KComboBox::currentIndexChanged), this, &KCMAkonadiContactActions::slotDialPhoneNumberActionChanged);
@@ -104,11 +104,9 @@
{
ContactActionsSettings::EnumDialPhoneNumberAction enumValue = static_cast(ui.DialPhoneNumberAction->itemData(value).toInt());
if (enumValue == ContactActionsSettings::UseExternalPhoneApplication) {
- ui.stackedWidget_2->setCurrentIndex(1);
- } else if (enumValue == ContactActionsSettings::UseKdeConnectPhone) {
- ui.stackedWidget_2->setCurrentIndex(2);
+ ui.phoneDetailsStack->setCurrentIndex(1);
} else {
- ui.stackedWidget_2->setCurrentIndex(0);
+ ui.phoneDetailsStack->setCurrentIndex(0);
}
Q_EMIT changed(true);
}
diff --git a/src/akonadi-contacts/CMakeLists.txt b/src/akonadi-contacts/CMakeLists.txt
--- a/src/akonadi-contacts/CMakeLists.txt
+++ b/src/akonadi-contacts/CMakeLists.txt
@@ -27,7 +27,6 @@
)
-set( AKONADI_PHONE_DIAL_DEFAULT "UseSkype" )
set( AKONADI_SEND_SMS_DEFAULT "UseSkypeSms" )
########### next target ###############
diff --git a/src/akonadi-contacts/actions/contactactionssettings.kcfg.cmake b/src/akonadi-contacts/actions/contactactionssettings.kcfg.cmake
--- a/src/akonadi-contacts/actions/contactactionssettings.kcfg.cmake
+++ b/src/akonadi-contacts/actions/contactactionssettings.kcfg.cmake
@@ -45,26 +45,18 @@
-
-
+
- Defines which application shall be used to dial the phone number of a contact. If 'Skype' is selected the Skype application will be started (if installed on the computer) and the number is dialed. If 'External Application' is selected, a command with placeholders can be defined.
- @AKONADI_PHONE_DIAL_DEFAULT@
+ Define how a phone number of a contact should be dialed. 'System Default' uses the default application configured for this on your system (e.g. KDE Connect). Selecting a specific application will use that (if installed), 'External Application' allows you to specify a dial command with placeholders manually.
+ UseSystemDefaultThis command defines the application that shall be executed to dial a contact's phone number.The following placeholders can be used in the command:
%N: The raw number as stored in the address book.
- %n: The normalized number with all non-digit characters removed.
-
-
-
- kdeconnect-cli --name 'phone name' --share 'tel:%N'
- The following placeholders can be used in the command:
- %N: The raw number as stored in the address book.
%n: The normalized number with all non-digit characters removed.
@@ -74,7 +66,6 @@
-
diff --git a/src/akonadi-contacts/actions/dialphonenumberaction.cpp b/src/akonadi-contacts/actions/dialphonenumberaction.cpp
--- a/src/akonadi-contacts/actions/dialphonenumberaction.cpp
+++ b/src/akonadi-contacts/actions/dialphonenumberaction.cpp
@@ -32,6 +32,8 @@
#include
#include
+#include
+
using namespace Akonadi;
static QString strippedDialNumber(const QString &number)
@@ -71,8 +73,15 @@
return;
}
- QString command = ContactActionsSettings::self()->phoneCommand();
+ if (ContactActionsSettings::self()->dialPhoneNumberAction() == ContactActionsSettings::UseSystemDefault) {
+ QUrl url;
+ url.setScheme(QStringLiteral("tel"));
+ url.setPath(strippedDialNumber(number.number()));
+ QDesktopServices::openUrl(url);
+ return;
+ }
+ QString command = ContactActionsSettings::self()->phoneCommand();
if (command.isEmpty()) {
KMessageBox::sorry(nullptr, i18n("There is no application set which could be executed.\nPlease go to the settings dialog and configure one."));
return;