diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-01-19 09:32:07 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-01-19 09:32:07 +0100 |
commit | 9b0dc8d98fb232cabb683d5681dc0252b9532c32 (patch) | |
tree | f2d9421f8bb6cc8a60f7f8db718b89cca2061a10 /src/tabbar.cpp | |
parent | Moved access keys activation to release key event (diff) | |
download | rekonq-9b0dc8d98fb232cabb683d5681dc0252b9532c32.tar.xz |
Krazy fixes
- QL1S/QL1C
- single-char QString efficiency
- explicit ctors
- normalized signals & slots
Diffstat (limited to 'src/tabbar.cpp')
-rw-r--r-- | src/tabbar.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tabbar.cpp b/src/tabbar.cpp index c0cfa896..74e549e5 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -82,8 +82,8 @@ TabBar::TabBar(QWidget *parent) setContextMenuPolicy(Qt::CustomContextMenu); - connect(this, SIGNAL(contextMenu(int, const QPoint &)), this, SLOT(contextMenu(int, const QPoint &))); - connect(this, SIGNAL(emptyAreaContextMenu(const QPoint &)), this, SLOT(emptyAreaContextMenu(const QPoint &))); + connect(this, SIGNAL(contextMenu(int, QPoint)), this, SLOT(contextMenu(int, QPoint))); + connect(this, SIGNAL(emptyAreaContextMenu(QPoint)), this, SLOT(emptyAreaContextMenu(QPoint))); connect(m_animationMapper, SIGNAL(mapped(int)), this, SLOT(removeAnimation(int))); setGraphicsEffect(m_tabHighlightEffect); @@ -498,7 +498,7 @@ void TabBar::dropEvent(QDropEvent* event) int urlCount = event->mimeData()->urls().count(); if (urlCount > 1) { - Q_FOREACH(const QUrl url, event->mimeData()->urls()) + Q_FOREACH(const QUrl & url, event->mimeData()->urls()) rApp->loadUrl(url, Rekonq::NewTab); } else @@ -533,9 +533,9 @@ bool TabBar::isURLValid(const QString &url) { QString editedURL = url; bool isValid = false; - if (editedURL.startsWith("http://") || editedURL.startsWith("https://") || editedURL.startsWith("ftp://")) + if (editedURL.startsWith(QL1S("http://")) || editedURL.startsWith(QL1S("https://")) || editedURL.startsWith(QL1S("ftp://"))) editedURL = editedURL.remove(QRegExp("(http|https|ftp)://")); - if (editedURL.contains('.') && editedURL.indexOf('.') > 0 && editedURL.indexOf('.') < editedURL.length() && !editedURL.trimmed().contains(" ") + if (editedURL.contains(QL1C('.')) && editedURL.indexOf(QL1C('.')) > 0 && editedURL.indexOf(QL1C('.')) < editedURL.length() && !editedURL.trimmed().contains(QL1C(' ')) && QUrl::fromUserInput(editedURL).isValid()) isValid = true; return isValid; |