From 089abd62383516eb33cbc1c93b06826a0cba3d7b Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Mon, 3 Jul 2017 14:47:24 +0200 Subject: Added homepage and newtab to profile widget --- src/forms/profileview.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/forms/profileview.cpp') diff --git a/src/forms/profileview.cpp b/src/forms/profileview.cpp index 9d2e9ed..cece4e4 100644 --- a/src/forms/profileview.cpp +++ b/src/forms/profileview.cpp @@ -30,6 +30,8 @@ #include +#include + ProfileView::ProfileView(WebEngineProfile *profile, QWidget *parent) : QWidget(parent), ui(new Ui::ProfileView) @@ -58,16 +60,17 @@ void ProfileView::setProfile(WebEngineProfile *profile) if(!profile) { return; } + //Q_ASSERT(profile); _profile = profile; - if(!_profile->storageName().isEmpty()) { - setWindowTitle(_profile->storageName()); - } else { - setWindowTitle(tr("Off-the-record")); - } + setWindowTitle(_profile->name()); m_cookiesForm = new CookiesForm(_profile->cookieStore(), this); - ui->tabWidget->addTab(m_cookiesForm, m_cookiesForm->windowTitle()); + //ui->tabWidget->addTab(m_cookiesForm, m_cookiesForm->windowTitle()); + + // general + ui->homepage_lineEdit->setText(_profile->homepage().toString()); + ui->newtab_lineEdit->setText(_profile->newtab().toString()); // http ui->userAgent->setPlainText(_profile->httpUserAgent()); @@ -81,6 +84,9 @@ void ProfileView::setProfile(WebEngineProfile *profile) // policy ui->cookiePolicy->setCurrentIndex(_profile->persistentCookiesPolicy()); + + //ui->formLayout_3->addWidget(m_cookiesForm); + ui->verticalLayout_3->addWidget(m_cookiesForm); } void ProfileView::showProfile() -- cgit v1.2.1