use QT_VERSION for new features; refs #160

master
Marc Wäckerlin 12 years ago
parent a3bf97fbd4
commit e5df2889af
  1. 26
      src/qbrowserlib/settings.hxx

@ -62,8 +62,12 @@ namespace qbrowserlib {
_settingJavascriptCanAccessClipboard; _settingJavascriptCanAccessClipboard;
_attributes[QWebSettings::DeveloperExtrasEnabled] = _attributes[QWebSettings::DeveloperExtrasEnabled] =
_settingDeveloperExtrasEnabled; _settingDeveloperExtrasEnabled;
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
_attributes[QWebSettings::SpatialNavigationEnabled] = _attributes[QWebSettings::SpatialNavigationEnabled] =
_settingSpatialNavigationEnabled; _settingSpatialNavigationEnabled;
#else
_settingSpatialNavigationEnabled->hide();
#fi
_attributes[QWebSettings::LinksIncludedInFocusChain] = _attributes[QWebSettings::LinksIncludedInFocusChain] =
_settingLinksIncludedInFocusChain; _settingLinksIncludedInFocusChain;
_attributes[QWebSettings::ZoomTextOnly] = _attributes[QWebSettings::ZoomTextOnly] =
@ -78,20 +82,30 @@ namespace qbrowserlib {
_settingLocalStorageEnabled; _settingLocalStorageEnabled;
_attributes[QWebSettings::LocalContentCanAccessRemoteUrls] = _attributes[QWebSettings::LocalContentCanAccessRemoteUrls] =
_settingLocalContentCanAccessRemoteUrls; _settingLocalContentCanAccessRemoteUrls;
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
_attributes[QWebSettings::LocalContentCanAccessFileUrls] = _attributes[QWebSettings::LocalContentCanAccessFileUrls] =
_settingLocalContentCanAccessFileUrls; _settingLocalContentCanAccessFileUrls;
// not in qt 4.7.0 (mac)
// _attributes[QWebSettings::XSSAuditingEnabled] =
// _settingXSSAuditingEnabled;
_attributes[QWebSettings::AcceleratedCompositingEnabled] = _attributes[QWebSettings::AcceleratedCompositingEnabled] =
_settingAcceleratedCompositingEnabled; _settingAcceleratedCompositingEnabled;
_attributes[QWebSettings::TiledBackingStoreEnabled] = _attributes[QWebSettings::TiledBackingStoreEnabled] =
_settingTiledBackingStoreEnabled; _settingTiledBackingStoreEnabled;
_attributes[QWebSettings::FrameFlatteningEnabled] = _attributes[QWebSettings::FrameFlatteningEnabled] =
_settingFrameFlatteningEnabled; _settingFrameFlatteningEnabled;
// not in qt 4.7.0 (mac) #else
// _attributes[QWebSettings::SiteSpecificQuirksEnabled] = _settingLocalContentCanAccessFileUrls->hide();
// _settingSiteSpecificQuirksEnabled; _settingAcceleratedCompositingEnabled->hide();
_settingTiledBackingStoreEnabled->hide();
_settingFrameFlatteningEnabled->hide();
#fi
#if QT_VERSION >= QT_VERSION_CHECK(4, 8, 0)
_attributes[QWebSettings::XSSAuditingEnabled] =
_settingXSSAuditingEnabled;
_attributes[QWebSettings::SiteSpecificQuirksEnabled] =
_settingSiteSpecificQuirksEnabled;
#else
_settingXSSAuditingEnabled->hide();
_settingSiteSpecificQuirksEnabled->hide();
#fi
// CheckBoxes // CheckBoxes
_checkboxes["SaveWindowState"] = _checkboxes["SaveWindowState"] =

Loading…
Cancel
Save