@@ -53,7 +53,7 @@ TorrentTagsDialog::TorrentTagsDialog(const TagSet &initialTags, QWidget *parent)
53
53
connect (m_ui->buttonBox , &QDialogButtonBox::accepted, this , &QDialog::accept);
54
54
connect (m_ui->buttonBox , &QDialogButtonBox::rejected, this , &QDialog::reject);
55
55
56
- auto *tagsLayout = new FlowLayout (m_ui->scrollArea );
56
+ auto *tagsLayout = new FlowLayout (m_ui->scrollArea -> widget () );
57
57
for (const Tag &tag : asConst (initialTags.united (BitTorrent::Session::instance ()->tags ())))
58
58
{
59
59
auto *tagWidget = new QCheckBox (Utils::Gui::tagToWidgetText (tag));
@@ -79,7 +79,7 @@ TorrentTagsDialog::~TorrentTagsDialog()
79
79
TagSet TorrentTagsDialog::tags () const
80
80
{
81
81
TagSet tags;
82
- auto *layout = m_ui->scrollArea ->layout ();
82
+ auto *layout = m_ui->scrollArea ->widget ()-> layout ();
83
83
for (int i = 0 ; i < (layout->count () - 1 ); ++i)
84
84
{
85
85
const auto *tagWidget = static_cast <QCheckBox *>(layout->itemAt (i)->widget ());
@@ -112,7 +112,7 @@ void TorrentTagsDialog::addNewTag()
112
112
}
113
113
else
114
114
{
115
- auto *layout = m_ui->scrollArea ->layout ();
115
+ auto *layout = m_ui->scrollArea ->widget ()-> layout ();
116
116
auto *btn = layout->takeAt (layout->count () - 1 );
117
117
auto *tagWidget = new QCheckBox (Utils::Gui::tagToWidgetText (tag));
118
118
tagWidget->setChecked (true );
0 commit comments