From d70894866bde6ee580ec1f4a4b2e491dcebcbe7f Mon Sep 17 00:00:00 2001 From: Franz Fellner Date: Mon, 10 Sep 2012 15:11:24 +0200 Subject: [PATCH] run coding_style.sh --- src/lib/bookmarks/bookmarkswidget.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/lib/bookmarks/bookmarkswidget.cpp b/src/lib/bookmarks/bookmarkswidget.cpp index 6898efe23..79054ca50 100644 --- a/src/lib/bookmarks/bookmarkswidget.cpp +++ b/src/lib/bookmarks/bookmarkswidget.cpp @@ -43,13 +43,14 @@ BookmarksWidget::BookmarksWidget(QupZilla* mainClass, WebView* view, QWidget* pa // The locationbar's direction is direction of its text, // it dynamically changes and so, it's not good choice for this widget. setLayoutDirection(QApplication::layoutDirection()); - + m_bookmarkId = m_bookmarksModel->bookmarkId(m_url); if (m_bookmarkId > 0) { connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(removeBookmark())); ui->saveRemove->setText(tr("Remove")); - } else { + } + else { connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(saveBookmark())); } connect(ui->speeddialButton, SIGNAL(clicked()), this, SLOT(toggleSpeedDial())); @@ -64,7 +65,7 @@ BookmarksWidget::BookmarksWidget(QupZilla* mainClass, WebView* view, QWidget* pa ui->label_2->setPalette(pal); ui->label_3->setPalette(pal); #endif - + loadBookmark(); } @@ -79,24 +80,26 @@ void BookmarksWidget::loadBookmark() while (query.next()) { ui->folder->addItem(style()->standardIcon(QStyle::SP_DirIcon), query.value(0).toString(), query.value(0).toString()); } - + if (m_bookmarkId > 0) { BookmarksModel::Bookmark bookmark = m_bookmarksModel->getBookmark(m_bookmarkId); ui->name->setText(bookmark.title); ui->folder->setCurrentIndex(ui->folder->findData(bookmark.folder)); - + ui->name->setEnabled(false); ui->folder->setEnabled(false); - } else { + } + else { ui->name->setText(m_view->title()); ui->folder->setCurrentIndex(0); } - + ui->name->setCursorPosition(0); } -namespace { - const int hideDelay = 270; +namespace +{ +const int hideDelay = 270; } void BookmarksWidget::removeBookmark()