diff --git a/src/lib/adblock/adblockrule.cpp b/src/lib/adblock/adblockrule.cpp index 12aca4d32..ed806179b 100644 --- a/src/lib/adblock/adblockrule.cpp +++ b/src/lib/adblock/adblockrule.cpp @@ -58,7 +58,7 @@ // Version for Qt < 4.8 has one issue, it will wrongly // count .co.uk (and others) as second-level domain -QString toSecondLevelDomain(const QUrl &url) +static QString toSecondLevelDomain(const QUrl &url) { #if QT_VERSION >= 0x040800 const QString &topLevelDomain = url.topLevelDomain(); diff --git a/src/lib/cookies/cookiejar.cpp b/src/lib/cookies/cookiejar.cpp index eb15fd171..84babe7e3 100644 --- a/src/lib/cookies/cookiejar.cpp +++ b/src/lib/cookies/cookiejar.cpp @@ -28,7 +28,8 @@ //#define COOKIE_DEBUG -bool blockThirdParty(QString string, QString domain) +#if QTWEBKIT_TO_2_3 +static bool blockThirdParty(QString string, QString domain) { if (string.isEmpty()) { // Some cookies have empty domain() ... bug? @@ -45,8 +46,9 @@ bool blockThirdParty(QString string, QString domain) return !domain.endsWith(string); } +#endif -bool matchDomain(const QString &domain, const QString &filter) +static bool matchDomain(const QString &domain, const QString &filter) { // According to RFC 6265 @@ -63,7 +65,7 @@ bool matchDomain(const QString &domain, const QString &filter) return (index > 0 && filter[0] == QLatin1Char('.')); } -int listContainsDomain(const QStringList &list, const QString &domain) +static int listContainsDomain(const QStringList &list, const QString &domain) { if (domain.isEmpty()) { return -1; @@ -136,7 +138,7 @@ bool CookieJar::rejectCookie(const QString &domain, const QNetworkCookie &cookie } } -// This feature is now natively in QtWebKit in Qt 5 +// This feature is now natively in QtWebKit 2.3 #if QTWEBKIT_TO_2_3 if (m_blockThirdParty) { bool result = blockThirdParty(cookieDomain, domain); diff --git a/src/lib/history/historymodel.cpp b/src/lib/history/historymodel.cpp index aff160bd5..4e52a7018 100644 --- a/src/lib/history/historymodel.cpp +++ b/src/lib/history/historymodel.cpp @@ -24,7 +24,7 @@ #include #include -QString dateTimeToString(const QDateTime &dateTime) +static QString dateTimeToString(const QDateTime &dateTime) { const QDateTime ¤t = QDateTime::currentDateTime(); if (current.date() == dateTime.date()) { diff --git a/src/lib/navigation/completer/locationcompleterdelegate.cpp b/src/lib/navigation/completer/locationcompleterdelegate.cpp index b566b806a..10626d9c4 100644 --- a/src/lib/navigation/completer/locationcompleterdelegate.cpp +++ b/src/lib/navigation/completer/locationcompleterdelegate.cpp @@ -132,7 +132,7 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI } } -bool sizeBiggerThan(const QString &s1, const QString &s2) +static bool sizeBiggerThan(const QString &s1, const QString &s2) { return s1.size() > s2.size(); } diff --git a/src/lib/navigation/completer/locationcompletermodel.cpp b/src/lib/navigation/completer/locationcompletermodel.cpp index 56c9810ba..544b50366 100644 --- a/src/lib/navigation/completer/locationcompletermodel.cpp +++ b/src/lib/navigation/completer/locationcompletermodel.cpp @@ -30,7 +30,7 @@ LocationCompleterModel::LocationCompleterModel(QObject* parent) { } -bool countBiggerThan(const QStandardItem* i1, const QStandardItem* i2) +static bool countBiggerThan(const QStandardItem* i1, const QStandardItem* i2) { return i1->data(LocationCompleterModel::CountRole).toInt() > i2->data(LocationCompleterModel::CountRole).toInt(); diff --git a/src/lib/network/networkmanager.cpp b/src/lib/network/networkmanager.cpp index eb49d719b..d9487b1aa 100644 --- a/src/lib/network/networkmanager.cpp +++ b/src/lib/network/networkmanager.cpp @@ -48,12 +48,17 @@ #include #include -QString fileNameForCert(const QSslCertificate &cert) +static QString fileNameForCert(const QSslCertificate &cert) { QString certFileName = CertificateInfoWidget::certificateItemText(cert); certFileName.remove(QLatin1Char(' ')); certFileName.append(QLatin1String(".crt")); certFileName = qz_filterCharsFromFilename(certFileName); + + while (certFileName.startsWith(QLatin1Char('.'))) { + certFileName = certFileName.mid(1); + } + return certFileName; } diff --git a/src/lib/network/schemehandlers/qupzillaschemehandler.cpp b/src/lib/network/schemehandlers/qupzillaschemehandler.cpp index 81d948621..097f7ee2c 100644 --- a/src/lib/network/schemehandlers/qupzillaschemehandler.cpp +++ b/src/lib/network/schemehandlers/qupzillaschemehandler.cpp @@ -31,7 +31,7 @@ #include #include -QString authorString(const char* name, const QString &mail) +static QString authorString(const char* name, const QString &mail) { return QString("%1 <%2>").arg(QString::fromUtf8(name), mail); }