From 8893e39a048a68864770403e4b99feda67464d70 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 14 Oct 2011 17:00:35 +0200 Subject: Sanitizing strings... --- src/mainwindow.cpp | 7 +++++-- src/protocolhandler.cpp | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index abd5455a..23ccf25d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -99,6 +99,7 @@ #include #include +#include MainWindow::MainWindow() @@ -1196,6 +1197,8 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) break; } + QString msgToShow = Qt::escape(msg); + // useful values WebTab *tab = m_view->currentWebTab(); @@ -1208,13 +1211,13 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) // Set Popup size QFontMetrics fm = m_popup->fontMetrics(); - QSize labelSize(fm.width(msg) + 2 * margin, fm.height() + 2 * margin); + QSize labelSize(fm.width(msgToShow) + 2 * margin, fm.height() + 2 * margin); if (labelSize.width() > halfWidth) labelSize.setWidth(halfWidth); m_popup->setFixedSize(labelSize); - m_popup->setText(fm.elidedText(msg, Qt::ElideMiddle, labelSize.width() - 2 * margin)); + m_popup->setText(fm.elidedText(msgToShow, Qt::ElideMiddle, labelSize.width() - 2 * margin)); const bool horizontalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Horizontal); const bool verticalScrollbarIsVisible = tab->page()->currentFrame()->scrollBarMaximum(Qt::Vertical); diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 2af4214f..9bd029f2 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -55,6 +55,7 @@ // Qt Includes #include #include +#include static bool fileItemListLessThan(const KFileItem &s1, const KFileItem &s2) @@ -298,14 +299,14 @@ QString ProtocolHandler::dirHandling(const KFileItemList &list) Q_FOREACH(const KFileItem & item, orderedList) { msg += ""; - QString fullPath = item.url().prettyUrl(); + QString fullPath = Qt::escape(item.url().prettyUrl()); QString iconName = item.iconName(); QString icon = QString("file://") + KIconLoader::global()->iconPath(iconName, KIconLoader::Small); msg += ""; msg += "\"" "; - msg += "" + item.name() + ""; + msg += "" + Qt::escape(item.name()) + ""; msg += ""; msg += ""; -- cgit v1.2.1 From 1557a5f87b7fbb0bbfe55f154291cb403ebfa2a1 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 14 Oct 2011 17:30:21 +0200 Subject: EBN Krazy fixes It seems now we are really ready for the stable release... --- src/application.cpp | 1 - src/mainview.cpp | 2 +- src/newtabpage.cpp | 2 +- src/opensearch/suggestionparser.h | 12 ++++++------ src/urlbar/urlbar.cpp | 16 +++++++++++++--- src/useragent/useragentinfo.cpp | 4 ++-- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index 6f9df43a..e1802099 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -61,7 +61,6 @@ #include #include #include -#include // Qt Includes #include diff --git a/src/mainview.cpp b/src/mainview.cpp index 0cd61ddd..2b5a8202 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -644,7 +644,7 @@ void MainView::openClosedTab() { WebView *view = rApp->mainWindow()->mainView()->newWebTab()->view(); TabHistory history; - Q_FOREACH(TabHistory item, m_recentlyClosedTabs) + Q_FOREACH(const TabHistory & item, m_recentlyClosedTabs) { if (item.history == action->data().toByteArray()) { diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp index ba0c37ce..f797e497 100644 --- a/src/newtabpage.cpp +++ b/src/newtabpage.cpp @@ -632,4 +632,4 @@ void NewTabPage::updateWindowIcon() { int currentIndex = rApp->mainWindow()->mainView()->currentIndex(); rApp->mainWindow()->changeWindowIcon(currentIndex); -} \ No newline at end of file +} diff --git a/src/opensearch/suggestionparser.h b/src/opensearch/suggestionparser.h index 523a4e6f..c8a61b99 100644 --- a/src/opensearch/suggestionparser.h +++ b/src/opensearch/suggestionparser.h @@ -67,12 +67,12 @@ public: {}; - Response(const QString &_title = QString(), - const QString &_description = QString(), - const QString &_url = QString(), - const QString &_image = QString(), - const int &_image_width = 0, - const int &_image_height = 0) : title(_title), + explicit Response(const QString &_title = QString(), + const QString &_description = QString(), + const QString &_url = QString(), + const QString &_image = QString(), + const int &_image_width = 0, + const int &_image_height = 0) : title(_title), description(_description), url(_url), image(_image), 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; } diff --git a/src/useragent/useragentinfo.cpp b/src/useragent/useragentinfo.cpp index d7defd59..0829a7e1 100644 --- a/src/useragent/useragentinfo.cpp +++ b/src/useragent/useragentinfo.cpp @@ -137,10 +137,10 @@ QString UserAgentInfo::userAgentDescription(int i) if (!systemName.isEmpty() && !systemRelease.isEmpty()) { // FIXME: needs a proper translation after stable release - systemSummary = " " % QL1S("on") % " " % systemName % " " % systemRelease; + systemSummary = QL1C(' ') % QL1S("on") % QL1C(' ') % systemName % QL1C(' ') % systemRelease; } - return userAgentName(i) % " " % userAgentVersion(i) % systemSummary; + return userAgentName(i) % QL1C(' ') % userAgentVersion(i) % systemSummary; } -- cgit v1.2.1 From 0506e61270dfad255319c67023d6990a2dcdcbf8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 15 Oct 2011 00:52:53 +0200 Subject: rekonq 0.8.0. Yeah! --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 59939ded..3b8d7c48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.7.92" ) +SET(REKONQ_VERSION "0.8.0" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) -- cgit v1.2.1 From 225cebd5be99aae02a4a7ef51bbdfbec3be2ee61 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 15 Oct 2011 01:03:23 +0200 Subject: Forgot INSTALL file update... --- INSTALL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL b/INSTALL index d7c0b983..f6be9f06 100644 --- a/INSTALL +++ b/INSTALL @@ -3,7 +3,7 @@ === Prerequisites === -rekonq needs at least KDE SC 4.5.x and Qt 4.7.x to build. +rekonq needs at least KDE SC 4.6.90 and Qt 4.7.x to build. Qt: -- cgit v1.2.1 From afc4eeceb6f716043543621c7bcd2f1cc4685583 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 16 Oct 2011 10:59:01 +0200 Subject: Fix strings as suggested in i18n-doc ml CCMAIL: aspotashev@gmail.com --- src/application.cpp | 2 +- src/sslinfo.ui | 6 +----- src/urlbar/sslwidget.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index e1802099..d770b3d1 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -732,7 +732,7 @@ void Application::queryQuit() { int answer = KMessageBox::questionYesNoCancel( mainWindow(), - i18n("Wanna close the window or the whole app?"), + i18n("Do you want to close the window or the whole application?"), i18n("Application/Window closing..."), KGuiItem(i18n("C&lose Current Window"), KIcon("window-close")), diff --git a/src/sslinfo.ui b/src/sslinfo.ui index 41393bb4..3ed117a8 100644 --- a/src/sslinfo.ui +++ b/src/sslinfo.ui @@ -298,11 +298,7 @@ - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:8pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:medium; font-weight:600;">Digests:</span></p></body></html> + <h4>Digests:</h4> 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(""); - 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("Certificate Information"); + label->setText(QL1S("\"") + i18n("Certificate Information") + QL1S("")); 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); -- cgit v1.2.1 From c3b88239bc11382859999b4ad7ff15029398d6a5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 16 Oct 2011 23:12:11 +0200 Subject: Fix download_i18n.sh script --- scripts/download_i18n.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/download_i18n.sh b/scripts/download_i18n.sh index 2a2685a1..c26b35ab 100644 --- a/scripts/download_i18n.sh +++ b/scripts/download_i18n.sh @@ -4,7 +4,15 @@ # # 1. Update the lists of the ready (about 80%) translations # check the situation here: http://l10n.kde.org/stats/gui/trunk-kde4/po/rekonq.po/ -LIST="af ar as ast be be@latin bg bn bn_IN br ca ca@valencia crh cs csb cy da de el en_GB eo es et eu fa fi fr fy ga gl gu ha he hi hne hr hsb hu hy ia id is it ja ka kk km kn ko ku lb lt lv mai mk ml mr ms mt nb nds ne nl nn nso oc or pa pl ps pt pt_BR ro ru rw se si sk sl sq sr sr@ijekavian sr@ijekavianlatin sr@latin sv ta te tg th tr uk uz uz@cyrillic vi wa xh zh_CN zh_HK zh_TW" +LIST="af ar as ast az be be@latin bg bn bn_IN bo br bs ca ca@valencia crh cs csb +cy da de el en_GB eo es et eu fa fi fo fr fy ga gl gu ha he hi hne hr hsb hu hy +ia id is it ja ka kk km kn ko ku lb lo lt lv mai mi mk ml mn mr ms mt nb nds ne +nl nn nso oc or pa pl ps pt pt_BR ro ru rw se si sk sl sq sr sr@ijekavian +sr@ijekavianlatin sr@latin ss sv ta te tg th tr tt ug uk uz uz@cyrillic ven vi +wa xh zh_CN zh_HK zh_TW zu" + +# translation percentual +TRxCENT=80 # 2. run this script. It will create an i18n dir in rekonq sources ($RK_SRCS variable, set it to your source path) # dir with all the listed translations (eg: italian translation = rekonq_it.po file) @@ -57,7 +65,7 @@ do else PERC=$(echo $TRANS/$TOT | bc -l) - RESULT=$(echo $PERC '>' .80 | bc -l) + RESULT=$(echo $PERC '>' .$TRxCENT | bc -l) if [ $RESULT -eq 0 ]; then echo removing $lang... rm rekonq_$lang.po -- cgit v1.2.1 From e4316c3bddda588b48594ebcb42b7d5f3d64ec4f Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 16 Oct 2011 23:13:15 +0200 Subject: rekonq 0.8.50: First development version on the road to 0.9... --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b8d7c48..0c52471b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ PROJECT( rekonq ) # Informations to update before to release this package. # rekonq info -SET(REKONQ_VERSION "0.8.0" ) +SET(REKONQ_VERSION "0.8.50" ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h ) -- cgit v1.2.1