From 91f9a68249d33dba25a2763ea89e73a219f8ad67 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 29 Sep 2018 12:17:35 +0200 Subject: ProfileEditor plugin: fix delete button --- plugins/ProfileEditor/forms/profilemanagerdialog.cpp | 6 +----- plugins/ProfileEditor/forms/profilemanagerdialog.h | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'plugins/ProfileEditor/forms') diff --git a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp index 72c56de..d660514 100644 --- a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp +++ b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp @@ -84,11 +84,7 @@ void ProfileManagerDialog::deleteProfile(QListWidgetItem *item) auto profile = item->data(Qt::UserRole).value>(); Q_ASSERT(!profile.isNull()); - qDebug("deleting profile %s", qUtf8Printable(profile->name())); - //qDebug("deleting %s: %s", qUtf8Printable(profile->configurationPath()), QFile(profile->configurationPath()).remove() ? "okay" : "failed"); - qDebug("deleting %s: %s", qUtf8Printable(profile->persistentStoragePath()), QDir(profile->persistentStoragePath()).removeRecursively() ? "okay" : "failed"); - qDebug("deleting %s: %s", qUtf8Printable(profile->cachePath()), QDir(profile->cachePath()).removeRecursively() ? "okay" : "failed"); + emit removeProfile(profile); delete item; - delete profile.data(); } diff --git a/plugins/ProfileEditor/forms/profilemanagerdialog.h b/plugins/ProfileEditor/forms/profilemanagerdialog.h index ce38777..89e959a 100644 --- a/plugins/ProfileEditor/forms/profilemanagerdialog.h +++ b/plugins/ProfileEditor/forms/profilemanagerdialog.h @@ -18,11 +18,11 @@ class ProfileManagerDialog : public QDialog public: explicit ProfileManagerDialog(const ProfileManager *profiles, QWidget *parent = 0); - ~ProfileManagerDialog(); + ~ProfileManagerDialog() override; signals: void createProfile(const QString &id); - void updateProfile(const QString &id); + void removeProfile(const WebProfile *profile); public slots: void addProfile(WebProfile *profile); -- cgit v1.2.1