From 92de31840ed3ec7cc8ec90fe58b1955278a8acff Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 4 Jul 2021 22:31:32 +0300 Subject: Replace Accounts.importAccount() with Context.importBackup() dc_accounts_import_account() is going to be removed from the core. --- qml/AccountsPage.qml | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'qml/AccountsPage.qml') diff --git a/qml/AccountsPage.qml b/qml/AccountsPage.qml index 0088777..bf39d7e 100644 --- a/qml/AccountsPage.qml +++ b/qml/AccountsPage.qml @@ -1,7 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 -import QtQuick.Dialogs 1.3 import org.kde.kirigami 2.12 as Kirigami Kirigami.Page { @@ -30,33 +29,6 @@ Kirigami.Page { } } - contextualActions: [ - Kirigami.Action { - text: "Import account" - iconName: "document-import" - onTriggered: importAccountDialog.open() - } - ] - - FileDialog { - id: importAccountDialog - title: "Import account" - folder: shortcuts.home - onAccepted: { - var url = importAccountDialog.fileUrl.toString() - if (url.startsWith("file://")) { - var filename = url.substring(7) - console.log("Importing " + filename) - var accountId = dcAccounts.importAccount(filename) - if (accountId == 0) { - console.log("Import failed") - } else { - console.log("Import succeeded") - } - } - } - } - ListModel { id: accountsModel } -- cgit v1.2.3-70-g09d2