本文整理汇总了C++中webcore::Settings::setCaretBrowsingEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ Settings::setCaretBrowsingEnabled方法的具体用法?C++ Settings::setCaretBrowsingEnabled怎么用?C++ Settings::setCaretBrowsingEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webcore::Settings
的用法示例。
在下文中一共展示了Settings::setCaretBrowsingEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: apply
//.........这里部分代码省略.........
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
value = attributes.value(QWebSettings::PluginsEnabled,
global->attributes.value(QWebSettings::PluginsEnabled));
settings->setPluginsEnabled(value);
value = attributes.value(QWebSettings::PrivateBrowsingEnabled,
global->attributes.value(QWebSettings::PrivateBrowsingEnabled));
settings->setPrivateBrowsingEnabled(value);
value = attributes.value(QWebSettings::SpatialNavigationEnabled,
global->attributes.value(QWebSettings::SpatialNavigationEnabled));
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
value = attributes.value(QWebSettings::FrameFlatteningEnabled,
global->attributes.value(QWebSettings::FrameFlatteningEnabled));
settings->setFrameFlatteningEnabled(value);
QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
settings->setUserStyleSheetLocation(WebCore::KURL(location));
QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
settings->setDefaultTextEncodingName(encoding);
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
value = attributes.value(QWebSettings::PrintElementBackgrounds,
global->attributes.value(QWebSettings::PrintElementBackgrounds));
settings->setShouldPrintBackgrounds(value);
#if ENABLE(SQL_DATABASE)
value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled));
WebCore::DatabaseManager::manager().setIsAvailable(value);
#endif
value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled,
global->attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled));
settings->setOfflineWebApplicationCacheEnabled(value);
value = attributes.value(QWebSettings::LocalStorageEnabled,
global->attributes.value(QWebSettings::LocalStorageEnabled));
settings->setLocalStorageEnabled(value);
value = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(value);
value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
settings->setAllowFileAccessFromFileURLs(value);
value = attributes.value(QWebSettings::XSSAuditingEnabled,
global->attributes.value(QWebSettings::XSSAuditingEnabled));
settings->setXSSAuditorEnabled(value);
#if USE(TILED_BACKING_STORE)
value = attributes.value(QWebSettings::TiledBackingStoreEnabled,
global->attributes.value(QWebSettings::TiledBackingStoreEnabled));
settings->setTiledBackingStoreEnabled(value);
#endif
#if ENABLE(SMOOTH_SCROLLING)
value = attributes.value(QWebSettings::ScrollAnimatorEnabled,
global->attributes.value(QWebSettings::ScrollAnimatorEnabled));
settings->setEnableScrollAnimator(value);
#endif
value = attributes.value(QWebSettings::CaretBrowsingEnabled,
global->attributes.value(QWebSettings::CaretBrowsingEnabled));
settings->setCaretBrowsingEnabled(value);
value = attributes.value(QWebSettings::NotificationsEnabled,
global->attributes.value(QWebSettings::NotificationsEnabled));
settings->setNotificationsEnabled(value);
value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled,
global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled));
settings->setNeedsSiteSpecificQuirks(value);
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
for (int i = 0; i < settings.count(); ++i)
settings[i]->apply();
}
}
示例2: apply
//.........这里部分代码省略.........
settings->setSpatialNavigationEnabled(value);
value = attributes.value(QWebSettings::JavascriptCanAccessClipboard,
global->attributes.value(QWebSettings::JavascriptCanAccessClipboard));
settings->setDOMPasteAllowed(value);
settings->setJavaScriptCanAccessClipboard(value);
value = attributes.value(QWebSettings::DeveloperExtrasEnabled,
global->attributes.value(QWebSettings::DeveloperExtrasEnabled));
settings->setDeveloperExtrasEnabled(value);
value = attributes.value(QWebSettings::FrameFlatteningEnabled,
global->attributes.value(QWebSettings::FrameFlatteningEnabled));
settings->setFrameFlatteningEnabled(value);
QUrl location = !userStyleSheetLocation.isEmpty() ? userStyleSheetLocation : global->userStyleSheetLocation;
settings->setUserStyleSheetLocation(WebCore::KURL(location));
QString encoding = !defaultTextEncoding.isEmpty() ? defaultTextEncoding: global->defaultTextEncoding;
settings->setDefaultTextEncodingName(encoding);
QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
settings->setLocalStorageDatabasePath(storagePath);
if (mediaType.isEmpty())
mediaType = global->mediaType;
value = attributes.value(QWebSettings::PrintElementBackgrounds,
global->attributes.value(QWebSettings::PrintElementBackgrounds));
settings->setShouldPrintBackgrounds(value);
value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled));
#if ENABLE(SQL_DATABASE)
WebCore::DatabaseManager::manager().setIsAvailable(value);
#endif
#if ENABLE(INDEXED_DATABASE)
QString path = !offlineDatabasePath.isEmpty() ? offlineDatabasePath : global->offlineDatabasePath;
Q_ASSERT(groupSettings);
// Setting the path to empty string disables persistent storage of the indexed database.
if (!value)
path = QString();
groupSettings->setIndexedDBDatabasePath(path);
qint64 quota = offlineStorageDefaultQuota ? offlineStorageDefaultQuota : global->offlineStorageDefaultQuota;
groupSettings->setIndexedDBQuotaBytes(quota);
#endif
value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled,
global->attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled));
settings->setOfflineWebApplicationCacheEnabled(value);
value = attributes.value(QWebSettings::LocalStorageEnabled,
global->attributes.value(QWebSettings::LocalStorageEnabled));
settings->setLocalStorageEnabled(value);
bool remoteAccess = attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessRemoteUrls));
settings->setAllowUniversalAccessFromFileURLs(remoteAccess);
settings->setAllowRemoteAccessFromFileURLs(remoteAccess);
value = attributes.value(QWebSettings::LocalContentCanAccessFileUrls,
global->attributes.value(QWebSettings::LocalContentCanAccessFileUrls));
settings->setAllowFileAccessFromFileURLs(value);
value = attributes.value(QWebSettings::XSSAuditingEnabled,
global->attributes.value(QWebSettings::XSSAuditingEnabled));
settings->setXSSAuditorEnabled(value);
#if USE(TILED_BACKING_STORE)
value = attributes.value(QWebSettings::TiledBackingStoreEnabled,
global->attributes.value(QWebSettings::TiledBackingStoreEnabled));
settings->setTiledBackingStoreEnabled(value);
#endif
#if ENABLE(SMOOTH_SCROLLING)
value = attributes.value(QWebSettings::ScrollAnimatorEnabled,
global->attributes.value(QWebSettings::ScrollAnimatorEnabled));
settings->setScrollAnimatorEnabled(value);
#endif
value = attributes.value(QWebSettings::CaretBrowsingEnabled,
global->attributes.value(QWebSettings::CaretBrowsingEnabled));
settings->setCaretBrowsingEnabled(value);
value = attributes.value(QWebSettings::NotificationsEnabled,
global->attributes.value(QWebSettings::NotificationsEnabled));
settings->setNotificationsEnabled(value);
value = attributes.value(QWebSettings::SiteSpecificQuirksEnabled,
global->attributes.value(QWebSettings::SiteSpecificQuirksEnabled));
settings->setNeedsSiteSpecificQuirks(value);
settings->setUsesPageCache(WebCore::pageCache()->capacity());
} else {
QList<QWebSettingsPrivate*> settings = *::allSettings();
for (int i = 0; i < settings.count(); ++i)
settings[i]->apply();
}
}