diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-10-10 19:25:44 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-10-10 19:25:44 +0200 |
commit | 442ba9f09a8ee18609361f3971b5da7f40eb5c35 (patch) | |
tree | fd612714e7df77ff3523a6773b6e9c3e60084809 /src/lib/bookmarks | |
parent | Cleaned up WebViewTabBar (diff) | |
download | smolbote-442ba9f09a8ee18609361f3971b5da7f40eb5c35.tar.xz |
Split off DownloadsWidget into library
Fixed bug with BookmarksWidget crashing the program on exit
Diffstat (limited to 'src/lib/bookmarks')
-rw-r--r-- | src/lib/bookmarks/bookmarkswidget.cpp | 9 | ||||
-rw-r--r-- | src/lib/bookmarks/bookmarkswidget.h | 5 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/bookmarks/bookmarkswidget.cpp b/src/lib/bookmarks/bookmarkswidget.cpp index 38716ce..f2781da 100644 --- a/src/lib/bookmarks/bookmarkswidget.cpp +++ b/src/lib/bookmarks/bookmarkswidget.cpp @@ -24,11 +24,12 @@ #include <QUrl> BookmarksWidget::BookmarksWidget(const QString &path, QWidget *parent) : - DockingWidget(tr("Bookmarks"), parent), + QWidget(parent), ui(new Ui::BookmarksDialog) { // make sure this dialog does not get deleted on close setAttribute(Qt::WA_DeleteOnClose, false); + setWindowTitle(tr("Bookmarks")); ui->setupUi(this); ui->treeWidget->header()->setSectionResizeMode(QHeaderView::Stretch); @@ -49,13 +50,13 @@ BookmarksWidget::BookmarksWidget(const QString &path, QWidget *parent) : xbel = new Xbel(ui->treeWidget); xbel->read(m_path); - connect(ui->addFolder_toolButton, &QToolButton::clicked, [this]() { + connect(ui->addFolder_toolButton, &QToolButton::clicked, this, [&]() { xbel->addFolder(ui->treeWidget->currentItem()); }); - connect(ui->addBookmark_toolButton, &QToolButton::clicked, [this]() { + connect(ui->addBookmark_toolButton, &QToolButton::clicked, this, [&]() { xbel->addBookmark(ui->treeWidget->currentItem()); }); - connect(ui->addSeparator_toolButton, &QToolButton::clicked, [this]() { + connect(ui->addSeparator_toolButton, &QToolButton::clicked, this, [&]() { xbel->addSeparator(ui->treeWidget->currentItem()); }); } diff --git a/src/lib/bookmarks/bookmarkswidget.h b/src/lib/bookmarks/bookmarkswidget.h index a31cfea..86f83be 100644 --- a/src/lib/bookmarks/bookmarkswidget.h +++ b/src/lib/bookmarks/bookmarkswidget.h @@ -21,15 +21,14 @@ #ifndef BOOKMARKSDIALOG_H #define BOOKMARKSDIALOG_H -#include "widgets/dockingwidget.h" -#include <QDockWidget> +#include <QWidget> #include "xbel.h" namespace Ui { class BookmarksDialog; } -class BookmarksWidget : public DockingWidget +class BookmarksWidget : public QWidget { Q_OBJECT |