1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

run coding_style.sh

This commit is contained in:
Franz Fellner 2012-09-10 15:11:24 +02:00
parent 5ca9b8b21a
commit d70894866b

View File

@ -43,13 +43,14 @@ BookmarksWidget::BookmarksWidget(QupZilla* mainClass, WebView* view, QWidget* pa
// The locationbar's direction is direction of its text, // The locationbar's direction is direction of its text,
// it dynamically changes and so, it's not good choice for this widget. // it dynamically changes and so, it's not good choice for this widget.
setLayoutDirection(QApplication::layoutDirection()); setLayoutDirection(QApplication::layoutDirection());
m_bookmarkId = m_bookmarksModel->bookmarkId(m_url); m_bookmarkId = m_bookmarksModel->bookmarkId(m_url);
if (m_bookmarkId > 0) { if (m_bookmarkId > 0) {
connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(removeBookmark())); connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(removeBookmark()));
ui->saveRemove->setText(tr("Remove")); ui->saveRemove->setText(tr("Remove"));
} else { }
else {
connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(saveBookmark())); connect(ui->saveRemove, SIGNAL(clicked()), this, SLOT(saveBookmark()));
} }
connect(ui->speeddialButton, SIGNAL(clicked()), this, SLOT(toggleSpeedDial())); 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_2->setPalette(pal);
ui->label_3->setPalette(pal); ui->label_3->setPalette(pal);
#endif #endif
loadBookmark(); loadBookmark();
} }
@ -79,24 +80,26 @@ void BookmarksWidget::loadBookmark()
while (query.next()) { while (query.next()) {
ui->folder->addItem(style()->standardIcon(QStyle::SP_DirIcon), query.value(0).toString(), query.value(0).toString()); ui->folder->addItem(style()->standardIcon(QStyle::SP_DirIcon), query.value(0).toString(), query.value(0).toString());
} }
if (m_bookmarkId > 0) { if (m_bookmarkId > 0) {
BookmarksModel::Bookmark bookmark = m_bookmarksModel->getBookmark(m_bookmarkId); BookmarksModel::Bookmark bookmark = m_bookmarksModel->getBookmark(m_bookmarkId);
ui->name->setText(bookmark.title); ui->name->setText(bookmark.title);
ui->folder->setCurrentIndex(ui->folder->findData(bookmark.folder)); ui->folder->setCurrentIndex(ui->folder->findData(bookmark.folder));
ui->name->setEnabled(false); ui->name->setEnabled(false);
ui->folder->setEnabled(false); ui->folder->setEnabled(false);
} else { }
else {
ui->name->setText(m_view->title()); ui->name->setText(m_view->title());
ui->folder->setCurrentIndex(0); ui->folder->setCurrentIndex(0);
} }
ui->name->setCursorPosition(0); ui->name->setCursorPosition(0);
} }
namespace { namespace
const int hideDelay = 270; {
const int hideDelay = 270;
} }
void BookmarksWidget::removeBookmark() void BookmarksWidget::removeBookmark()