1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-24 04:36:34 +01:00

[SpeedDial] Use page title from bookmarks when adding pages.

This commit is contained in:
nowrep 2013-05-05 12:26:47 +02:00
parent a65d7b00b3
commit 75b6d976fb
2 changed files with 4 additions and 3 deletions

View File

@ -78,7 +78,6 @@ void BookmarksTree::refreshTree()
addTopLevelItem(newItem);
}
QTreeWidgetItem* newItem = new QTreeWidgetItem(rootItem);
newItem->setText(0, _bookmarksMenu);
newItem->setData(0, Qt::UserRole, "bookmarksMenu");

View File

@ -110,12 +110,13 @@ void BookmarksWidget::toggleSpeedDial()
const SpeedDial::Page page = m_speedDial->pageForUrl(m_url);
if (page.url.isEmpty()) {
m_speedDial->addPage(m_url, m_view->title());
QString title = ui->name->text().isEmpty() ? m_view->title() : ui->name->text();
m_speedDial->addPage(m_url, title);
}
else {
m_speedDial->removePage(page);
}
QTimer::singleShot(HIDE_DELAY, this, SLOT(close()));
}
@ -148,6 +149,7 @@ void BookmarksWidget::on_saveRemove_clicked(bool)
else {
m_bookmarksModel->saveBookmark(m_url, ui->name->text(), m_view->icon(), BookmarksModel::fromTranslatedFolder(ui->folder->currentText()));
}
QTimer::singleShot(HIDE_DELAY, this, SLOT(close()));
}