summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorCedric Bellegarde <gnumdk@gmail.com>2011-10-17 08:34:17 +0200
committerCedric Bellegarde <gnumdk@gmail.com>2011-10-17 08:34:17 +0200
commit2b2adbcfcb6ed81edb2e4646735285935e61c624 (patch)
tree52f983051b7c81e06c00ab20d64471c429320b1d /src/urlbar
parentUpdate menu bar tools (useful for people using plasma-menubar/oxygen-appmenu) (diff)
parentrekonq 0.8.50: First development version on the road to 0.9... (diff)
downloadrekonq-2b2adbcfcb6ed81edb2e4646735285935e61c624.tar.xz
Merge branch 'master' of git.kde.org:rekonq
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/sslwidget.cpp14
-rw-r--r--src/urlbar/urlbar.cpp16
2 files changed, 20 insertions, 10 deletions
diff --git a/src/urlbar/sslwidget.cpp b/src/urlbar/sslwidget.cpp
index 525df7a1..708c1259 100644
--- a/src/urlbar/sslwidget.cpp
+++ b/src/urlbar/sslwidget.cpp
@@ -81,7 +81,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
label->setWordWrap(true);
if (cert.isNull())
{
- label->setText(i18n("Warning: this site is NOT carrying a certificate!"));
+ label->setText(i18n("Warning: this site is NOT carrying a certificate."));
imageLabel->setPixmap(KIcon("security-low").pixmap(32));
layout->addWidget(label, rows++, 1);
}
@@ -103,7 +103,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
}
c += QL1S("</ul>");
- label->setText(i18n("The certificate for this site is NOT valid, for the following reasons:\n%1", c));
+ label->setText(i18n("The certificate for this site is NOT valid, for the following reasons:\n%1.", c));
label->setTextFormat(Qt::RichText);
imageLabel->setPixmap(KIcon("security-low").pixmap(32));
}
@@ -112,7 +112,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
label = new QLabel(this);
label->setWordWrap(true);
- label->setText("<a href=\"moresslinfos\">Certificate Information</a>");
+ label->setText(QL1S("\"<a href=\"moresslinfos\">") + i18n("Certificate Information") + QL1S("</a>"));
connect(label, SIGNAL(linkActivated(const QString &)), this, SLOT(showMoreSslInfos(const QString &)));
layout->addWidget(label, rows++, 1);
}
@@ -134,7 +134,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
{
label = new QLabel(this);
label->setWordWrap(true);
- label->setText(i18n("Your connection to %1 is NOT encrypted!!\n", m_url.host()));
+ label->setText(i18n("Your connection to %1 is NOT encrypted.\n", m_url.host()));
layout->addWidget(label, rows++ , 1);
imageLabel->setPixmap(KIcon("security-low").pixmap(32));
@@ -143,7 +143,7 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
{
label = new QLabel(this);
label->setWordWrap(true);
- label->setText(i18n("Your connection to \"%1\" is encrypted!\n", m_url.host()));
+ label->setText(i18n("Your connection to \"%1\" is encrypted.\n", m_url.host()));
layout->addWidget(label, rows++, 1);
QString vers = m_info.protocol();
@@ -211,12 +211,12 @@ SSLWidget::SSLWidget(const QUrl &url, const WebSslInfo &info, QWidget *parent)
if (firstVisit.visitCount == 1)
{
- label->setText(i18n("It is your first time visiting this site!"));
+ label->setText(i18n("It is your first time visiting this site."));
imageLabel->setPixmap(KIcon("security-medium").pixmap(32));
}
else
{
- label->setText(i18n("You just visited this site!\nYour first visit was on %1.\n", firstVisit.firstDateTimeVisit.toString()));
+ label->setText(i18n("You just visited this site.\nYour first visit was on %1.\n", firstVisit.firstDateTimeVisit.toString()));
imageLabel->setPixmap(KIcon("security-high").pixmap(32));
}
layout->addWidget(label, rows++, 1);
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index 0515f58b..7b77f3db 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -294,7 +294,7 @@ void UrlBar::keyPressEvent(QKeyEvent *event)
{
clearFocus();
if (text() != rApp->mainWindow()->currentTab()->view()->url().toString()
- && !rApp->mainWindow()->currentTab()->view()->url().toString().startsWith("about"))
+ && !rApp->mainWindow()->currentTab()->view()->url().toString().startsWith(QL1S("about")))
setText(rApp->mainWindow()->currentTab()->view()->url().toString());
event->accept();
}
@@ -518,10 +518,20 @@ void UrlBar::contextMenuEvent(QContextMenuEvent* event)
bool UrlBar::isValidURL(QString url)
{
bool isValid = false;
- if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("ftp://"))
+ if (url.startsWith(QL1S("http://"))
+ || url.startsWith(QL1S("https://"))
+ || url.startsWith(QL1S("ftp://"))
+ )
url = url.remove(QRegExp("(http|https|ftp)://"));
- if (url.contains('.') && url.indexOf('.') > 0 && url.indexOf('.') < url.length() && !url.trimmed().contains(" ") && QUrl::fromUserInput(url).isValid())
+
+ if (url.contains(QL1C('.'))
+ && url.indexOf(QL1C('.')) > 0
+ && url.indexOf(QL1C('.')) < url.length()
+ && !url.trimmed().contains(QL1C(' '))
+ && QUrl::fromUserInput(url).isValid()
+ )
isValid = true;
+
return isValid;
}