Exemplo n.º 1
0
/*!
    Sets the maximum number of pages to hold in the memory page cache to \a pages.

    The Page Cache allows for a nicer user experience when navigating forth or back
    to pages in the forward/back history, by pausing and resuming up to \a pages.

    For more information about the feature, please refer to:

    http://webkit.org/blog/427/webkit-page-cache-i-the-basics/
*/
void QWebSettings::setMaximumPagesInCache(int pages)
{
    QWebSettingsPrivate* global = QWebSettings::globalSettings()->d;
    WebCore::pageCache()->setCapacity(qMax(0, pages));
    global->apply();
}
Exemplo n.º 2
0
/*
    \since 4.5
    \relates QWebSettings

    Sets the path for HTML5 local storage databases to \a path.

    \a path must point to an existing directory where the cache is stored.

    Setting an empty path disables the feature.

    \sa localStorageDatabasePath()
*/
void QWEBKIT_EXPORT qt_websettings_setLocalStorageDatabasePath(QWebSettings* settings, const QString& path)
{
    QWebSettingsPrivate *d = settings->handle();
    d->localStorageDatabasePath = path;
    d->apply();
}