Exemplo n.º 1
0
QString LocationBar::convertUrlToText(const QUrl &url) const
{
    QString stringUrl = qz_urlEncodeQueryString(url);

    if (stringUrl == QLatin1String("qupzilla:speeddial") || stringUrl == QLatin1String("about:blank")) {
        stringUrl = "";
    }

    return stringUrl;
}
Exemplo n.º 2
0
void LocationBar::showUrl(const QUrl &url)
{
    if (hasFocus() || url.isEmpty()) {
        return;
    }

    QString stringUrl = qz_urlEncodeQueryString(url);

    if (stringUrl == "qupzilla:speeddial" || stringUrl == "about:blank") {
        stringUrl = "";
    }

    if (url.toEncoded() != text()) {
        setText(stringUrl);
    }

    p_QupZilla->statusBarMessage()->clearMessage();
    hideGoButton();
    m_bookmarkIcon->checkBookmark(url);
}