mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Some optimalizations
This commit is contained in:
parent
a8add4a5b3
commit
cd4763d2d9
|
@ -204,7 +204,7 @@ void TabWidget::actionChangeIndex()
|
|||
}
|
||||
}
|
||||
|
||||
int TabWidget::addView(QUrl url, QString title, OpenUrlIn openIn, bool selectLine)
|
||||
int TabWidget::addView(QUrl url, const QString &title, OpenUrlIn openIn, bool selectLine)
|
||||
{
|
||||
if (url.isEmpty())
|
||||
url = m_urlOnNewTab;
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void closeTab(int index=-1);
|
||||
int addView(QUrl url = QUrl(), QString title = tr("New tab"), OpenUrlIn openIn = NewTab, bool selectLine = false);
|
||||
int addView(QUrl url = QUrl(), const QString &title = tr("New tab"), OpenUrlIn openIn = NewTab, bool selectLine = false);
|
||||
void reloadTab(int index) { weView(index)->reload(); }
|
||||
void reloadAllTabs();
|
||||
void stopTab(int index) { weView(index)->stop(); }
|
||||
|
|
|
@ -60,7 +60,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply* reply)
|
|||
qDebug() << "WebPage::UnsupportedContent error" << reply->errorString();
|
||||
}
|
||||
|
||||
void WebPage::setSSLCertificate(QSslCertificate cert)
|
||||
void WebPage::setSSLCertificate(const QSslCertificate &cert)
|
||||
{
|
||||
// if (cert != m_SslCert) -- crashing on linux :-|
|
||||
m_SslCert = cert;
|
||||
|
@ -140,7 +140,7 @@ void WebPage::addAdBlockRule(const QString &filter, const QUrl &url)
|
|||
m_adBlockedEntries.append(entry);
|
||||
}
|
||||
|
||||
bool WebPage::extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output)
|
||||
bool WebPage::extension(const Extension &extension, const ExtensionOption* option, ExtensionReturn* output)
|
||||
{
|
||||
if (extension == ChooseMultipleFilesExtension)
|
||||
return QWebPage::extension(extension, option, output);
|
||||
|
|
|
@ -45,11 +45,11 @@ public:
|
|||
void populateNetworkRequest(QNetworkRequest &request);
|
||||
~WebPage();
|
||||
|
||||
void setSSLCertificate(QSslCertificate cert);
|
||||
void setSSLCertificate(const QSslCertificate &cert);
|
||||
QSslCertificate sslCertificate();
|
||||
QString userAgentForUrl(const QUrl &url) const;
|
||||
bool supportsExtension(Extension extension) const { return (extension == ErrorPageExtension); }
|
||||
bool extension(Extension extension, const ExtensionOption* option, ExtensionReturn* output);
|
||||
bool supportsExtension(const Extension &extension) const { return (extension == ErrorPageExtension); }
|
||||
bool extension(const Extension &extension, const ExtensionOption* option, ExtensionReturn* output);
|
||||
|
||||
void addAdBlockRule(const QString &filter, const QUrl &url);
|
||||
QList<AdBlockedEntry> adBlockedEntries() { return m_adBlockedEntries; }
|
||||
|
|
|
@ -182,7 +182,7 @@ void WebView::stopAnimation()
|
|||
}
|
||||
}
|
||||
|
||||
void WebView::setIp(QHostInfo info)
|
||||
void WebView::setIp(const QHostInfo &info)
|
||||
{
|
||||
if (info.addresses().isEmpty())
|
||||
return;
|
||||
|
@ -695,7 +695,7 @@ void WebView::closeTab()
|
|||
}
|
||||
}
|
||||
|
||||
void WebView::load(QUrl url)
|
||||
void WebView::load(const QUrl &url)
|
||||
{
|
||||
if (url.toString().startsWith("javascript:")) {
|
||||
page()->mainFrame()->evaluateJavaScript(url.toString());
|
||||
|
|
|
@ -46,7 +46,7 @@ public:
|
|||
int getLoading() { return m_progress; }
|
||||
|
||||
void zoomReset();
|
||||
void load(QUrl url);
|
||||
void load(const QUrl &url);
|
||||
QUrl url() const;
|
||||
QString title() const;
|
||||
void reload();
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
QIcon siteIcon();
|
||||
void addNotification(QWidget* notif);
|
||||
bool hasRss() { return !m_rss.isEmpty(); }
|
||||
QList<QPair<QString,QString> > getRss() { return m_rss; }
|
||||
QList<QPair<QString,QString> > getRss() { return m_rss; } //FIXME: Make RSS as struct
|
||||
|
||||
static QUrl guessUrlFromString(const QString &string);
|
||||
static bool isUrlValid(const QUrl &url);
|
||||
|
@ -99,7 +99,7 @@ private slots:
|
|||
void getFocus(const QUrl &urla);
|
||||
void showInspector();
|
||||
void stopAnimation();
|
||||
void setIp(QHostInfo info);
|
||||
void setIp(const QHostInfo &info);
|
||||
void checkRss();
|
||||
void slotIconChanged();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user