Commit 797fc5fd authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port away from deprecated QLayout::setMargin

See https://doc.qt.io/qt-5/qlayout-obsolete.html
parent 92f28dd8
......@@ -37,7 +37,7 @@ GroupSwitcher::GroupSwitcher(View *view, GroupManager *gman, QWidget *parent)
layout->addWidget(edit_group_policy);
layout->addWidget(tool_bar);
layout->addWidget(close_tab);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
new_tab->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
new_tab->setToolButtonStyle(Qt::ToolButtonIconOnly);
......
......@@ -29,7 +29,7 @@ MagnetView::MagnetView(MagnetManager *magnetManager, QWidget *parent)
model = new MagnetModel(magnetManager, this);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
// magnets view
......
......@@ -30,10 +30,10 @@ QueueManagerWidget::QueueManagerWidget(QueueManager *qman, QWidget *parent)
, qman(qman)
{
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
QVBoxLayout *vbox = new QVBoxLayout();
vbox->setMargin(0);
vbox->setContentsMargins(0, 0, 0, 0);
vbox->setSpacing(0);
view = new QTreeView(this);
view->setUniformRowHeights(true);
......
......@@ -46,7 +46,7 @@ TorrentActivity::TorrentActivity(Core *core, GUI *gui, QWidget *parent)
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
vsplit = new QSplitter(Qt::Vertical, this);
layout->addWidget(vsplit);
hsplit = new QSplitter(Qt::Horizontal, vsplit);
......@@ -56,7 +56,7 @@ TorrentActivity::TorrentActivity(Core *core, GUI *gui, QWidget *parent)
QVBoxLayout *vlayout = new QVBoxLayout(view_part);
vlayout->setSpacing(0);
vlayout->setMargin(0);
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->addWidget(group_switcher);
vlayout->addWidget(search_bar);
vlayout->addWidget(view);
......
......@@ -21,7 +21,7 @@ TorrentSearchBar::TorrentSearchBar(View *view, QWidget *parent)
{
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
hide_search_bar = new QToolButton(this);
hide_search_bar->setIcon(QIcon::fromTheme(QStringLiteral("window-close")));
......
......@@ -58,7 +58,7 @@ TabBarWidget::TabBarWidget(QSplitter *splitter, QWidget *parent)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
tab_bar = new KToolBar(this);
tab_bar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
connect(tab_bar, &QToolBar::toolButtonStyleChanged, this, &TabBarWidget::toolButtonStyleChanged);
......
......@@ -25,7 +25,7 @@ PluginActivity::PluginActivity(PluginManager *pman)
, pman(pman)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
pmw = new KPluginWidget(this);
connect(pmw, &KPluginWidget::changed, this, &PluginActivity::update);
connect(pmw, &KPluginWidget::pluginConfigSaved, this, &PluginActivity::update);
......
......@@ -31,7 +31,7 @@ ScheduleEditor::ScheduleEditor(QWidget *parent)
QVBoxLayout *layout = new QVBoxLayout(this);
view = new WeekView(this);
layout->addWidget(view);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
setupActions();
......
......@@ -48,10 +48,10 @@ FileView::FileView(QWidget *parent)
, header_state_loaded(false)
{
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
QVBoxLayout *vbox = new QVBoxLayout();
vbox->setMargin(0);
vbox->setContentsMargins(0, 0, 0, 0);
vbox->setSpacing(0);
view = new QTreeView(this);
toolbar = new QToolBar(this);
......
......@@ -29,7 +29,7 @@ LogViewer::LogViewer(LogFlags *flags, QWidget *parent)
setToolTip(i18n("View the logging output generated by KTorrent"));
QVBoxLayout *layout = new QVBoxLayout(this);
output = new QTextBrowser(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(output);
output->document()->setMaximumBlockCount(max_block_count);
......
......@@ -48,7 +48,7 @@ MediaPlayerActivity::MediaPlayerActivity(CoreInterface *core, KActionCollection
media_player = new MediaPlayer(this);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
tabs = new QTabWidget(this);
layout->addWidget(tabs);
......
......@@ -72,11 +72,11 @@ MediaView::MediaView(MediaModel *model, QWidget *parent)
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
QHBoxLayout *hbox = new QHBoxLayout();
hbox->setSpacing(0);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
tool_bar = new KToolBar(this);
hbox->addWidget(tool_bar);
......
......@@ -31,7 +31,7 @@ PlayListWidget::PlayListWidget(kt::MediaFileCollection *collection, kt::MediaPla
, collection(collection)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
QAction *remove_action = new QAction(QIcon::fromTheme(QStringLiteral("list-remove")), i18n("Remove"), this);
......
......@@ -44,7 +44,7 @@ VideoWidget::VideoWidget(MediaPlayer *player, KActionCollection *ac, QWidget *pa
, powermanagement_cookie(0)
{
QVBoxLayout *vlayout = new QVBoxLayout(this);
vlayout->setMargin(0);
vlayout->setContentsMargins(0, 0, 0, 0);
vlayout->setSpacing(0);
video = new Phonon::VideoWidget(this);
......
......@@ -43,7 +43,7 @@ SearchActivity::SearchActivity(SearchPlugin *sp, QWidget *parent)
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
tabs = new QTabWidget(this);
tabs->setMovable(true);
layout->addWidget(tabs);
......
......@@ -47,7 +47,7 @@ SearchWidget::SearchWidget(SearchPlugin *sp)
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
webview = new WebView(this, sp->getProxy());
KActionCollection *ac = sp->getSearchActivity()->part()->actionCollection();
......
......@@ -25,14 +25,14 @@ SyndicationTab::SyndicationTab(KActionCollection *ac, FeedList *feeds, FilterLis
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
splitter = new QSplitter(Qt::Vertical, this);
layout->addWidget(splitter);
QWidget *widget = new QWidget(splitter);
layout = new QVBoxLayout(widget);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
feed_tool_bar = new KToolBar(widget);
feed_tool_bar->setToolButtonStyle(Qt::ToolButtonIconOnly);
......@@ -49,7 +49,7 @@ SyndicationTab::SyndicationTab(KActionCollection *ac, FeedList *feeds, FilterLis
widget = new QWidget(splitter);
layout = new QVBoxLayout(widget);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
filter_tool_bar = new KToolBar(widget);
filter_tool_bar->setToolButtonStyle(Qt::ToolButtonIconOnly);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment