aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ProfileEditor/forms/profilemanagerdialog.cpp6
-rw-r--r--plugins/ProfileEditor/forms/profilemanagerdialog.h3
-rw-r--r--plugins/ProfileEditor/forms/profileview.cpp2
-rw-r--r--plugins/ProfileEditor/profileeditorplugin.cpp2
-rw-r--r--plugins/interfaces.h2
5 files changed, 9 insertions, 6 deletions
diff --git a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp
index dac4a61..7920f90 100644
--- a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp
+++ b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp
@@ -6,7 +6,7 @@
#include <QPointer>
#include "newprofiledialog.h"
-ProfileManagerDialog::ProfileManagerDialog(const QVector<WebProfile *> &profiles, QWidget *parent)
+ProfileManagerDialog::ProfileManagerDialog(const ProfileManager *profiles, QWidget *parent)
: QDialog(parent)
, ui(new Ui::ProfileManagerDialog)
{
@@ -27,7 +27,7 @@ ProfileManagerDialog::ProfileManagerDialog(const QVector<WebProfile *> &profiles
deleteProfile(ui->listWidget->currentItem());
});
- for(auto *profile : profiles) {
+ for(auto *profile : profiles->profileList().values()) {
addProfile(profile);
}
}
@@ -85,7 +85,7 @@ void ProfileManagerDialog::deleteProfile(QListWidgetItem *item)
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->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");
diff --git a/plugins/ProfileEditor/forms/profilemanagerdialog.h b/plugins/ProfileEditor/forms/profilemanagerdialog.h
index 4f468c5..ce38777 100644
--- a/plugins/ProfileEditor/forms/profilemanagerdialog.h
+++ b/plugins/ProfileEditor/forms/profilemanagerdialog.h
@@ -3,6 +3,7 @@
#include <QDialog>
#include <QVector>
+#include <profilemanager.h>
namespace Ui
{
@@ -16,7 +17,7 @@ class ProfileManagerDialog : public QDialog
Q_OBJECT
public:
- explicit ProfileManagerDialog(const QVector<WebProfile *> &profiles, QWidget *parent = 0);
+ explicit ProfileManagerDialog(const ProfileManager *profiles, QWidget *parent = 0);
~ProfileManagerDialog();
signals:
diff --git a/plugins/ProfileEditor/forms/profileview.cpp b/plugins/ProfileEditor/forms/profileview.cpp
index 85dde12..e265e16 100644
--- a/plugins/ProfileEditor/forms/profileview.cpp
+++ b/plugins/ProfileEditor/forms/profileview.cpp
@@ -9,6 +9,7 @@
#include "profileview.h"
#include "ui_profileview.h"
#include <webprofile.h>
+#include <profilemanager.h>
#include <QWebEngineSettings>
#include <QWebEngineCookieStore>
#include <QDateTime>
@@ -33,7 +34,6 @@ ProfileView::ProfileView(WebProfile *profile, QWidget *parent)
// general tab
ui->name->setText(profile->name());
ui->offTheRecord->setChecked(profile->isOffTheRecord());
- ui->configurationPath->setText(profile->configurationPath());
// http tab
ui->userAgent->setPlainText(m_profile->httpUserAgent());
diff --git a/plugins/ProfileEditor/profileeditorplugin.cpp b/plugins/ProfileEditor/profileeditorplugin.cpp
index 32b0b8d..b158d6b 100644
--- a/plugins/ProfileEditor/profileeditorplugin.cpp
+++ b/plugins/ProfileEditor/profileeditorplugin.cpp
@@ -26,7 +26,7 @@ QHash<QString, std::function<int()>> ProfileEditorPlugin::commands()
QDialog *ProfileEditorPlugin::createWidget(QWidget *parent)
{
Q_CHECK_PTR(browser);
- auto *widget = new ProfileManagerDialog(browser->profiles(), parent);
+ auto *widget = new ProfileManagerDialog(browser->getProfileManager(), parent);
widget->setAttribute(Qt::WA_DeleteOnClose, true);
connect(widget, &ProfileManagerDialog::createProfile, this, [=](const QString &id) {
diff --git a/plugins/interfaces.h b/plugins/interfaces.h
index fe25ed3..7ee10db 100644
--- a/plugins/interfaces.h
+++ b/plugins/interfaces.h
@@ -20,12 +20,14 @@ class QDialog;
class WebProfile;
class Configuration;
+class ProfileManager;
class BrowserInterface
{
public:
virtual Configuration *getConfiguration() const = 0;
virtual QPair<QString, WebProfile *> loadProfile(const QString &id) = 0;
+ virtual const ProfileManager *getProfileManager() const = 0;
virtual const QVector<WebProfile *> profiles() const = 0;
};