Source/WebKit/gtk/webkit/webkitdownload.cpp
const gchar* webkit_download_get_suggested_filename(WebKitDownload* download)
{
    g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), NULL);

    WebKitDownloadPrivate* priv = download->priv;
    if (priv->suggestedFilename)
        return priv->suggestedFilename;

    KURL url = KURL(KURL(), webkit_network_request_get_uri(priv->networkRequest));
    url.setQuery(String());
    url.removeFragmentIdentifier();
    priv->suggestedFilename = g_strdup(decodeURLEscapeSequences(url.lastPathComponent()).utf8().data());
    return priv->suggestedFilename;
}
/**
 * webkit_download_get_suggested_filename:
 * @download: the #WebKitDownload
 *
 * Retrieves the filename that was suggested by the server, or the one
 * derived by WebKit from the URI.
 *
 * Returns: the suggested filename
 *
 * Since: 1.1.2
 */


Retrieves the filename that was suggested by the server, or the one
derived by WebKit from the URI.

the suggested filename


Retrieves the filename that was suggested by the server or the one derived by WebKit from the URI . the suggested filename
const gchar* webkit_download_get_suggested_filename(WebKitDownload* download)
{
    g_return_val_if_fail(WEBKIT_IS_DOWNLOAD(download), NULL);
    WebKitDownloadPrivate* priv = download->priv;
    if (priv->suggestedFilename)
        return priv->suggestedFilename;
    KURL url = KURL(KURL(), webkit_network_request_get_uri(priv->networkRequest));
    url.setQuery(String());
    url.removeFragmentIdentifier();
    priv->suggestedFilename = g_strdup(decodeURLEscapeSequences(url.lastPathComponent()).utf8().data());
    return priv->suggestedFilename;
}
const gchar * webkit_download_get_suggested_filename ( WebKitDownload * download ) { g_return_val_if_fail ( WEBKIT_IS_DOWNLOAD ( download ) , NULL ) ; WebKitDownloadPrivate * priv = download -> priv ; if ( priv -> suggestedFilename ) return priv -> suggestedFilename ; KURL url = KURL ( KURL ( ) , webkit_network_request_get_uri ( priv -> networkRequest ) ) ; url . setQuery ( String ( ) ) ; url . removeFragmentIdentifier ( ) ; priv -> suggestedFilename = g_strdup ( decodeURLEscapeSequences ( url . lastPathComponent ( ) ) . utf8 ( ) . data ( ) ) ; return priv -> suggestedFilename ; }
webkit_download_get_suggested_filename:
 @download: the #WebKitDownload
webkit_download_get_suggested_filename : @download : the #WebKitDownload