Commit b5b48b60 authored by Laurent Montel's avatar Laurent Montel 😁

Rename settings

parent d06c36f5
...@@ -6,7 +6,7 @@ set(webengineviewer_webengineurlinterceptor_donottrack_SRCS ...@@ -6,7 +6,7 @@ set(webengineviewer_webengineurlinterceptor_donottrack_SRCS
ecm_qt_declare_logging_category(webengineviewer_webengineurlinterceptor_donottrack_SRCS HEADER donottrackinterceptor_debug.h IDENTIFIER DONOTTRACKINTERCEPTOR_LOG CATEGORY_NAME log_donottrackinterceptor) ecm_qt_declare_logging_category(webengineviewer_webengineurlinterceptor_donottrack_SRCS HEADER donottrackinterceptor_debug.h IDENTIFIER DONOTTRACKINTERCEPTOR_LOG CATEGORY_NAME log_donottrackinterceptor)
kconfig_add_kcfg_files(webengineviewer_webengineurlinterceptor_donottrack_SRCS kconfig_add_kcfg_files(webengineviewer_webengineurlinterceptor_donottrack_SRCS
settings/donottrack.kcfgc settings/donottracksettings.kcfgc
) )
......
set( donottrackpluginurlinterceptortest_SRCS donottrackpluginurlinterceptortest.cpp ../donottrackpluginurlinterceptor.cpp ../donottrackinterceptorinterface.cpp) set( donottrackpluginurlinterceptortest_SRCS donottrackpluginurlinterceptortest.cpp ../donottrackpluginurlinterceptor.cpp ../donottrackinterceptorinterface.cpp)
kconfig_add_kcfg_files(donottrackpluginurlinterceptortest_SRCS kconfig_add_kcfg_files(donottrackpluginurlinterceptortest_SRCS
../settings/donottrack.kcfgc ../settings/donottracksettings.kcfgc
) )
add_executable( donottrackpluginurlinterceptortest ${donottrackpluginurlinterceptortest_SRCS}) add_executable( donottrackpluginurlinterceptortest ${donottrackpluginurlinterceptortest_SRCS})
add_test(donottrackpluginurlinterceptortest donottrackpluginurlinterceptortest) add_test(donottrackpluginurlinterceptortest donottrackpluginurlinterceptortest)
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include "donottrackinterceptorinterface.h" #include "donottrackinterceptorinterface.h"
#include <QtWebEngineCore/qwebengineurlrequestinfo.h> #include <QtWebEngineCore/qwebengineurlrequestinfo.h>
#include "donottrack.h" #include "donottracksettings.h"
//#define BUG_FIXED 1
DoNotTrackInterceptorInterface::DoNotTrackInterceptorInterface(QObject *parent) DoNotTrackInterceptorInterface::DoNotTrackInterceptorInterface(QObject *parent)
: WebEngineViewer::NetworkPluginUrlInterceptorInterface(parent) : WebEngineViewer::NetworkPluginUrlInterceptorInterface(parent)
...@@ -35,7 +37,11 @@ bool DoNotTrackInterceptorInterface::interceptRequest(QWebEngineUrlRequestInfo & ...@@ -35,7 +37,11 @@ bool DoNotTrackInterceptorInterface::interceptRequest(QWebEngineUrlRequestInfo &
{ {
if (DoNotTrackSettings::doNotTrack()) { if (DoNotTrackSettings::doNotTrack()) {
//Laurent Comment it for the moment workaround a bug for QtWebEngine //Laurent Comment it for the moment workaround a bug for QtWebEngine
#ifdef BUG_FIXED
//info.setHttpHeader(QByteArrayLiteral("DNT"), QByteArrayLiteral("1")); //info.setHttpHeader(QByteArrayLiteral("DNT"), QByteArrayLiteral("1"));
#else
Q_UNUSED(info);
#endif
} }
return false; return false;
} }
File=donottrack.kcfg File=donottracksettings.kcfg
ClassName=DoNotTrackSettings ClassName=DoNotTrackSettings
Mutators=true Mutators=true
Singleton=true Singleton=true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment