mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Update database column names
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
25261d5402
commit
2df74f2f05
@ -333,7 +333,7 @@ void ProfileManager::updateDatabase()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update in 22.11.00 */
|
/* Update in 22.12.00 */
|
||||||
if (prof < Updater::Version(QStringLiteral("22.11.70"))) {
|
if (prof < Updater::Version(QStringLiteral("22.11.70"))) {
|
||||||
std::cout << "Falkon: Updating database to version " << qPrintable(Qz::VERSION) << std::endl;
|
std::cout << "Falkon: Updating database to version " << qPrintable(Qz::VERSION) << std::endl;
|
||||||
|
|
||||||
@ -341,11 +341,25 @@ void ProfileManager::updateDatabase()
|
|||||||
query.prepare(QStringLiteral(
|
query.prepare(QStringLiteral(
|
||||||
"CREATE TABLE IF NOT EXISTS site_settings ("
|
"CREATE TABLE IF NOT EXISTS site_settings ("
|
||||||
"id INTEGER PRIMARY KEY,"
|
"id INTEGER PRIMARY KEY,"
|
||||||
"domain TEXT NOT NULL,"
|
"server TEXT NOT NULL,"
|
||||||
|
|
||||||
"zoom_level INTEGER DEFAULT 0,"
|
"zoom_level INTEGER DEFAULT 0,"
|
||||||
"allow_cookies INTEGER DEFAULT 0,"
|
"allow_cookies INTEGER DEFAULT 0,"
|
||||||
"allow_images INTEGER DEFAULT 0,"
|
|
||||||
"allow_javascript INTEGER DEFAULT 0,"
|
"wa_autoload_images INTEGER DEFAULT 0,"
|
||||||
|
"wa_js_enabled INTEGER DEFAULT 0,"
|
||||||
|
"wa_js_open_windows INTEGER DEFAULT 0,"
|
||||||
|
"wa_js_access_clipboard INTEGER DEFAULT 0,"
|
||||||
|
"wa_js_can_paste INTEGER DEFAULT 0,"
|
||||||
|
"wa_js_window_activation INTEGER DEFAULT 0,"
|
||||||
|
"wa_local_storage INTEGER DEFAULT 0,"
|
||||||
|
"wa_acroll_animator INTEGER DEFAULT 0,"
|
||||||
|
"wa_fullscreen_support INTEGER DEFAULT 0,"
|
||||||
|
"wa_run_insecure_content INTEGER DEFAULT 0,"
|
||||||
|
"wa_insecure_geolocation INTEGER DEFAULT 0,"
|
||||||
|
"wa_playback_needs_gesture INTEGER DEFAULT 0,"
|
||||||
|
"wa_webrtc_public_interface_only INTEGER DEFAULT 0,"
|
||||||
|
|
||||||
"allow_notifications INTEGER DEFAULT 0,"
|
"allow_notifications INTEGER DEFAULT 0,"
|
||||||
"allow_geolocation INTEGER DEFAULT 0,"
|
"allow_geolocation INTEGER DEFAULT 0,"
|
||||||
"allow_media_audio_capture INTEGER DEFAULT 0,"
|
"allow_media_audio_capture INTEGER DEFAULT 0,"
|
||||||
|
@ -58,10 +58,24 @@ CREATE UNIQUE INDEX icons_urluniqueindex ON icons (url);
|
|||||||
CREATE TABLE site_settings (
|
CREATE TABLE site_settings (
|
||||||
id INTEGER PRIMARY KEY,
|
id INTEGER PRIMARY KEY,
|
||||||
server TEXT NOT NULL,
|
server TEXT NOT NULL,
|
||||||
|
|
||||||
zoom_level INTEGER DEFAULT 0,
|
zoom_level INTEGER DEFAULT 0,
|
||||||
allow_cookies INTEGER DEFAULT 0,
|
allow_cookies INTEGER DEFAULT 0,
|
||||||
allow_images INTEGER DEFAULT 0,
|
|
||||||
allow_javascript INTEGER DEFAULT 0,
|
wa_autoload_images INTEGER DEFAULT 0,
|
||||||
|
wa_js_enabled INTEGER DEFAULT 0,
|
||||||
|
wa_js_open_windows INTEGER DEFAULT 0,
|
||||||
|
wa_js_access_clipboard INTEGER DEFAULT 0,
|
||||||
|
wa_js_can_paste INTEGER DEFAULT 0,
|
||||||
|
wa_js_window_activation INTEGER DEFAULT 0,
|
||||||
|
wa_local_storage INTEGER DEFAULT 0,
|
||||||
|
wa_acroll_animator INTEGER DEFAULT 0,
|
||||||
|
wa_fullscreen_support INTEGER DEFAULT 0,
|
||||||
|
wa_run_insecure_content INTEGER DEFAULT 0,
|
||||||
|
wa_insecure_geolocation INTEGER DEFAULT 0,
|
||||||
|
wa_playback_needs_gesture INTEGER DEFAULT 0,
|
||||||
|
wa_webrtc_public_interface_only INTEGER DEFAULT 0,
|
||||||
|
|
||||||
allow_notifications INTEGER DEFAULT 0,
|
allow_notifications INTEGER DEFAULT 0,
|
||||||
allow_geolocation INTEGER DEFAULT 0,
|
allow_geolocation INTEGER DEFAULT 0,
|
||||||
allow_media_audio_capture INTEGER DEFAULT 0,
|
allow_media_audio_capture INTEGER DEFAULT 0,
|
||||||
|
@ -29,17 +29,17 @@ SiteSettingsManager::SiteSettingsManager ( QObject* parent )
|
|||||||
|
|
||||||
supportedAttribute.append(QWebEngineSettings::AutoLoadImages);
|
supportedAttribute.append(QWebEngineSettings::AutoLoadImages);
|
||||||
supportedAttribute.append(QWebEngineSettings::JavascriptEnabled);
|
supportedAttribute.append(QWebEngineSettings::JavascriptEnabled);
|
||||||
// supportedAttribute.append(QWebEngineSettings::JavascriptCanOpenWindows);
|
supportedAttribute.append(QWebEngineSettings::JavascriptCanOpenWindows);
|
||||||
// supportedAttribute.append(QWebEngineSettings::JavascriptCanAccessClipboard);
|
supportedAttribute.append(QWebEngineSettings::JavascriptCanAccessClipboard);
|
||||||
// supportedAttribute.append(QWebEngineSettings::JavascriptCanPaste);
|
supportedAttribute.append(QWebEngineSettings::JavascriptCanPaste);
|
||||||
// supportedAttribute.append(QWebEngineSettings::AllowWindowActivationFromJavaScript);
|
supportedAttribute.append(QWebEngineSettings::AllowWindowActivationFromJavaScript);
|
||||||
// supportedAttribute.append(QWebEngineSettings::LocalStorageEnabled);
|
supportedAttribute.append(QWebEngineSettings::LocalStorageEnabled);
|
||||||
// supportedAttribute.append(QWebEngineSettings::ScrollAnimatorEnabled);
|
supportedAttribute.append(QWebEngineSettings::ScrollAnimatorEnabled);
|
||||||
// supportedAttribute.append(QWebEngineSettings::FullScreenSupportEnabled);
|
supportedAttribute.append(QWebEngineSettings::FullScreenSupportEnabled);
|
||||||
// supportedAttribute.append(QWebEngineSettings::AllowRunningInsecureContent);
|
supportedAttribute.append(QWebEngineSettings::AllowRunningInsecureContent);
|
||||||
// supportedAttribute.append(QWebEngineSettings::AllowGeolocationOnInsecureOrigins);
|
supportedAttribute.append(QWebEngineSettings::AllowGeolocationOnInsecureOrigins);
|
||||||
// supportedAttribute.append(QWebEngineSettings::PlaybackRequiresUserGesture);
|
supportedAttribute.append(QWebEngineSettings::PlaybackRequiresUserGesture);
|
||||||
// supportedAttribute.append(QWebEngineSettings::WebRTCPublicInterfacesOnly);
|
supportedAttribute.append(QWebEngineSettings::WebRTCPublicInterfacesOnly);
|
||||||
|
|
||||||
|
|
||||||
attributesSql = QSL("SELECT ");
|
attributesSql = QSL("SELECT ");
|
||||||
@ -218,9 +218,9 @@ QString SiteSettingsManager::optionToSqlColumn(const SiteSettingsManager::PageOp
|
|||||||
{
|
{
|
||||||
switch (option) {
|
switch (option) {
|
||||||
case poJavascriptEnabled:
|
case poJavascriptEnabled:
|
||||||
return QSL("allow_javascript");
|
return QSL("wa_js_enabled");
|
||||||
case poAutoloadImages:
|
case poAutoloadImages:
|
||||||
return QSL("allow_images");
|
return QSL("wa_autoload_images");
|
||||||
case poAllowCookies:
|
case poAllowCookies:
|
||||||
return QSL("allow_cookies");
|
return QSL("allow_cookies");
|
||||||
case poZoomLevel:
|
case poZoomLevel:
|
||||||
@ -491,12 +491,10 @@ QString SiteSettingsManager::webAttributeToSqlColumn(const QWebEngineSettings::W
|
|||||||
{
|
{
|
||||||
switch (attribute) {
|
switch (attribute) {
|
||||||
case QWebEngineSettings::AutoLoadImages:
|
case QWebEngineSettings::AutoLoadImages:
|
||||||
return QSL("allow_images");
|
return QSL("wa_autoload_images");
|
||||||
// return QSL("wa_autoload_images");
|
|
||||||
|
|
||||||
case QWebEngineSettings::JavascriptEnabled:
|
case QWebEngineSettings::JavascriptEnabled:
|
||||||
return QSL("allow_javascript");
|
return QSL("wa_js_enabled");
|
||||||
// return QSL("wa_js_enabled");
|
|
||||||
case QWebEngineSettings::JavascriptCanOpenWindows:
|
case QWebEngineSettings::JavascriptCanOpenWindows:
|
||||||
return QSL("wa_js_open_windows");
|
return QSL("wa_js_open_windows");
|
||||||
case QWebEngineSettings::JavascriptCanAccessClipboard:
|
case QWebEngineSettings::JavascriptCanAccessClipboard:
|
||||||
|
Loading…
Reference in New Issue
Block a user