summaryrefslogtreecommitdiffstats
path: root/tools/assistant
diff options
context:
space:
mode:
authorkh <qtc-committer@nokia.com>2009-06-11 10:11:11 (GMT)
committerkh <qtc-committer@nokia.com>2009-06-11 10:11:11 (GMT)
commitdd828f95c8f7bc000d808452eef062353ef7dd03 (patch)
tree67b1135ff4bbbf99d6e2ae3f8718f02958cd8db8 /tools/assistant
parent7f30a96c2b444d4350aab8c76f129eb57b3bd6a5 (diff)
downloadQt-dd828f95c8f7bc000d808452eef062353ef7dd03.zip
Qt-dd828f95c8f7bc000d808452eef062353ef7dd03.tar.gz
Qt-dd828f95c8f7bc000d808452eef062353ef7dd03.tar.bz2
No need to bookmark emty pages.
Reviewed-by: kh
Diffstat (limited to 'tools/assistant')
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp3
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 52d48d5..95e458c 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -780,6 +780,9 @@ void CentralWidget::showTabBarContextMenu(const QPoint &point)
menu.addSeparator();
QAction *newBookmark = menu.addAction(tr("Add Bookmark for this Page..."));
+ const QString &url = viewer->source().toString();
+ if (url.isEmpty() || url == QLatin1String("about:blank"))
+ newBookmark->setEnabled(false);
QAction *pickedAction = menu.exec(tabBar->mapToGlobal(point));
if (pickedAction == newPage)
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index 582eef3..ba22590 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -748,7 +748,7 @@ void MainWindow::copyAvailable(bool yes)
void MainWindow::addNewBookmark(const QString &title, const QString &url)
{
- if (url.isEmpty())
+ if (url.isEmpty() || url == QLatin1String("about:blank"))
return;
m_bookmarkManager->showBookmarkDialog(this, title, url);