From ccae7d1520548aaec95f6bd7302dd72c6fbdd6b9 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 8 Sep 2018 13:13:24 +0200 Subject: Replace ProfileManager::profileList() with ProfileManager::idList() --- .../ProfileEditor/forms/profilemanagerdialog.cpp | 4 +-- plugins/ProfileEditor/forms/profileview.cpp | 15 +++++++++ plugins/ProfileEditor/forms/profileview.ui | 37 ++++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) (limited to 'plugins/ProfileEditor/forms') diff --git a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp index 7920f90..72c56de 100644 --- a/plugins/ProfileEditor/forms/profilemanagerdialog.cpp +++ b/plugins/ProfileEditor/forms/profilemanagerdialog.cpp @@ -27,8 +27,8 @@ ProfileManagerDialog::ProfileManagerDialog(const ProfileManager *profiles, QWidg deleteProfile(ui->listWidget->currentItem()); }); - for(auto *profile : profiles->profileList().values()) { - addProfile(profile); + for(const QString &profileId : profiles->idList()) { + addProfile(profiles->profile(profileId)); } } diff --git a/plugins/ProfileEditor/forms/profileview.cpp b/plugins/ProfileEditor/forms/profileview.cpp index e265e16..2ffb119 100644 --- a/plugins/ProfileEditor/forms/profileview.cpp +++ b/plugins/ProfileEditor/forms/profileview.cpp @@ -35,6 +35,21 @@ ProfileView::ProfileView(WebProfile *profile, QWidget *parent) ui->name->setText(profile->name()); ui->offTheRecord->setChecked(profile->isOffTheRecord()); + ui->homepage->setText(profile->homepage().toString()); + connect(ui->homepage, &QLineEdit::editingFinished, profile, [=]() { + profile->setHomepage(QUrl::fromUserInput(ui->homepage->text())); + }); + + ui->newtab->setText(profile->newtab().toString()); + connect(ui->newtab, &QLineEdit::editingFinished, profile, [=]() { + profile->setNewtab(QUrl::fromUserInput(ui->newtab->text())); + }); + + ui->search->setText(profile->search()); + connect(ui->search, &QLineEdit::editingFinished, profile, [=]() { + profile->setSearch(ui->search->text()); + }); + // http tab ui->userAgent->setPlainText(m_profile->httpUserAgent()); connect(ui->userAgent, &QPlainTextEdit::textChanged, profile, [=]() { diff --git a/plugins/ProfileEditor/forms/profileview.ui b/plugins/ProfileEditor/forms/profileview.ui index 6c2edda..2b25184 100644 --- a/plugins/ProfileEditor/forms/profileview.ui +++ b/plugins/ProfileEditor/forms/profileview.ui @@ -68,6 +68,43 @@ + + + + Homepage + + + + + + + New tab page + + + + + + + Search + + + + + + + + + + + + + + + + Qt::Horizontal + + + -- cgit v1.2.1