fixed #725
This commit is contained in:
parent
6baa539480
commit
546a674ebf
@ -84,6 +84,8 @@ SettingsBrowserMail::SettingsBrowserMail(Settings* settings, QWidget* parent)
|
|||||||
// Remove WebEngine tab.
|
// Remove WebEngine tab.
|
||||||
m_ui->m_tabBrowserProxy->removeTab(2);
|
m_ui->m_tabBrowserProxy->removeTab(2);
|
||||||
#else
|
#else
|
||||||
|
connect(m_ui->m_cbDisableCache, &QCheckBox::stateChanged, this, &SettingsBrowserMail::dirtifySettings);
|
||||||
|
connect(m_ui->m_cbDisableCache, &QCheckBox::stateChanged, this, &SettingsBrowserMail::requireRestart);
|
||||||
connect(m_ui->m_txtWebEngineChromiumFlags, &QPlainTextEdit::textChanged, this, &SettingsBrowserMail::dirtifySettings);
|
connect(m_ui->m_txtWebEngineChromiumFlags, &QPlainTextEdit::textChanged, this, &SettingsBrowserMail::dirtifySettings);
|
||||||
connect(m_ui->m_txtWebEngineChromiumFlags, &QPlainTextEdit::textChanged, this, &SettingsBrowserMail::requireRestart);
|
connect(m_ui->m_txtWebEngineChromiumFlags, &QPlainTextEdit::textChanged, this, &SettingsBrowserMail::requireRestart);
|
||||||
#endif
|
#endif
|
||||||
@ -164,6 +166,7 @@ void SettingsBrowserMail::selectEmailExecutable() {
|
|||||||
void SettingsBrowserMail::loadSettings() {
|
void SettingsBrowserMail::loadSettings() {
|
||||||
onBeginLoadSettings();
|
onBeginLoadSettings();
|
||||||
|
|
||||||
|
m_ui->m_cbDisableCache->setChecked(settings()->value(GROUP(Browser), SETTING(Browser::DisableCache)).toBool());
|
||||||
m_ui->m_cbEnableHttp2->setChecked(settings()->value(GROUP(Network), SETTING(Network::EnableHttp2)).toBool());
|
m_ui->m_cbEnableHttp2->setChecked(settings()->value(GROUP(Network), SETTING(Network::EnableHttp2)).toBool());
|
||||||
m_ui->m_cbIgnoreAllCookies
|
m_ui->m_cbIgnoreAllCookies
|
||||||
->setChecked(settings()->value(GROUP(Network), SETTING(Network::IgnoreAllCookies)).toBool());
|
->setChecked(settings()->value(GROUP(Network), SETTING(Network::IgnoreAllCookies)).toBool());
|
||||||
@ -209,6 +212,7 @@ void SettingsBrowserMail::loadSettings() {
|
|||||||
void SettingsBrowserMail::saveSettings() {
|
void SettingsBrowserMail::saveSettings() {
|
||||||
onBeginSaveSettings();
|
onBeginSaveSettings();
|
||||||
|
|
||||||
|
settings()->setValue(GROUP(Browser), Browser::DisableCache, m_ui->m_cbDisableCache->isChecked());
|
||||||
settings()->setValue(GROUP(Network), Network::EnableHttp2, m_ui->m_cbEnableHttp2->isChecked());
|
settings()->setValue(GROUP(Network), Network::EnableHttp2, m_ui->m_cbEnableHttp2->isChecked());
|
||||||
settings()->setValue(GROUP(Network), Network::IgnoreAllCookies, m_ui->m_cbIgnoreAllCookies->isChecked());
|
settings()->setValue(GROUP(Network), Network::IgnoreAllCookies, m_ui->m_cbIgnoreAllCookies->isChecked());
|
||||||
|
|
||||||
|
@ -13,9 +13,6 @@
|
|||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="m_tabBrowserProxy">
|
<widget class="QTabWidget" name="m_tabBrowserProxy">
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="m_tabNetwork">
|
<widget class="QWidget" name="m_tabNetwork">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Network</string>
|
<string>Network</string>
|
||||||
@ -42,16 +39,23 @@
|
|||||||
<string>WebEngine</string>
|
<string>WebEngine</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QFormLayout" name="formLayout_4">
|
<layout class="QFormLayout" name="formLayout_4">
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Custom "QTWEBENGINE_CHROMIUM_FLAGS" flags</string>
|
<string>Custom "QTWEBENGINE_CHROMIUM_FLAGS" flags</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" colspan="2">
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="QPlainTextEdit" name="m_txtWebEngineChromiumFlags"/>
|
<widget class="QPlainTextEdit" name="m_txtWebEngineChromiumFlags"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="m_cbDisableCache">
|
||||||
|
<property name="text">
|
||||||
|
<string>Disable cache</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="m_tabExternalBrowser">
|
<widget class="QWidget" name="m_tabExternalBrowser">
|
||||||
@ -409,6 +413,8 @@
|
|||||||
<tabstop>m_btnDeleteTool</tabstop>
|
<tabstop>m_btnDeleteTool</tabstop>
|
||||||
<tabstop>m_cbIgnoreAllCookies</tabstop>
|
<tabstop>m_cbIgnoreAllCookies</tabstop>
|
||||||
<tabstop>m_cbEnableHttp2</tabstop>
|
<tabstop>m_cbEnableHttp2</tabstop>
|
||||||
|
<tabstop>m_cbDisableCache</tabstop>
|
||||||
|
<tabstop>m_txtWebEngineChromiumFlags</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
@ -410,6 +410,9 @@ DKEY Notifications::ID = "notifications";
|
|||||||
// Web browser.
|
// Web browser.
|
||||||
DKEY Browser::ID = "browser";
|
DKEY Browser::ID = "browser";
|
||||||
|
|
||||||
|
DKEY Browser::DisableCache = "disable_cache";
|
||||||
|
DVALUE(bool) Browser::DisableCacheDef = false;
|
||||||
|
|
||||||
DKEY Browser::WebEngineChromiumFlags = "webengine_chromium_flags";
|
DKEY Browser::WebEngineChromiumFlags = "webengine_chromium_flags";
|
||||||
|
|
||||||
#if defined(Q_OS_LINUX) && !defined(IS_FLATPAK_BUILD)
|
#if defined(Q_OS_LINUX) && !defined(IS_FLATPAK_BUILD)
|
||||||
|
@ -451,6 +451,9 @@ namespace Notifications {
|
|||||||
namespace Browser {
|
namespace Browser {
|
||||||
KEY ID;
|
KEY ID;
|
||||||
|
|
||||||
|
KEY DisableCache;
|
||||||
|
VALUE(bool) DisableCacheDef;
|
||||||
|
|
||||||
KEY WebEngineChromiumFlags;
|
KEY WebEngineChromiumFlags;
|
||||||
VALUE(QString) WebEngineChromiumFlagsDef;
|
VALUE(QString) WebEngineChromiumFlagsDef;
|
||||||
|
|
||||||
|
@ -32,7 +32,15 @@ WebFactory::WebFactory(QObject* parent) : QObject(parent), m_customUserAgent(QSt
|
|||||||
m_adBlock = new AdBlockManager(this);
|
m_adBlock = new AdBlockManager(this);
|
||||||
|
|
||||||
#if defined(USE_WEBENGINE)
|
#if defined(USE_WEBENGINE)
|
||||||
m_engineProfile = new QWebEngineProfile(QSL(APP_LOW_NAME), this);
|
if (qApp->settings()->value(GROUP(Browser), SETTING(Browser::DisableCache)).toBool()) {
|
||||||
|
qWarningNN << LOGSEC_NETWORK << "Using off-the-record WebEngine profile.";
|
||||||
|
|
||||||
|
m_engineProfile = new QWebEngineProfile(this);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_engineProfile = new QWebEngineProfile(QSL(APP_LOW_NAME), this);
|
||||||
|
}
|
||||||
|
|
||||||
m_engineSettings = nullptr;
|
m_engineSettings = nullptr;
|
||||||
m_urlInterceptor = new NetworkUrlInterceptor(this);
|
m_urlInterceptor = new NetworkUrlInterceptor(this);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user