aboutsummaryrefslogtreecommitdiff
path: root/plugins/ProfileEditor/forms
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-07 13:11:58 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-07 13:11:58 +0200
commit4739f509d9d5ebaef71a51cece8f75b6a7e4b3dc (patch)
treee3f89c1db2aaaa605f0cbd4d752479a611fb5aac /plugins/ProfileEditor/forms
parentSome cppcheck fixes (diff)
downloadsmolbote-4739f509d9d5ebaef71a51cece8f75b6a7e4b3dc.tar.xz
Move ProfileManager to libweb
Diffstat (limited to 'plugins/ProfileEditor/forms')
-rw-r--r--plugins/ProfileEditor/forms/profilemanagerdialog.cpp6
-rw-r--r--plugins/ProfileEditor/forms/profilemanagerdialog.h3
-rw-r--r--plugins/ProfileEditor/forms/profileview.cpp2
3 files changed, 6 insertions, 5 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());