Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KTorrent
Commits
797fc5fd
Commit
797fc5fd
authored
Dec 27, 2021
by
Alexander Lohnau
💬
Browse files
Port away from deprecated QLayout::setMargin
See
https://doc.qt.io/qt-5/qlayout-obsolete.html
parent
92f28dd8
Changes
17
Hide whitespace changes
Inline
Side-by-side
ktorrent/groups/groupswitcher.cpp
View file @
797fc5fd
...
...
@@ -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
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
new_tab
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"list-add"
)));
new_tab
->
setToolButtonStyle
(
Qt
::
ToolButtonIconOnly
);
...
...
ktorrent/tools/magnetview.cpp
View file @
797fc5fd
...
...
@@ -29,7 +29,7 @@ MagnetView::MagnetView(MagnetManager *magnetManager, QWidget *parent)
model
=
new
MagnetModel
(
magnetManager
,
this
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
// magnets view
...
...
ktorrent/tools/queuemanagerwidget.cpp
View file @
797fc5fd
...
...
@@ -30,10 +30,10 @@ QueueManagerWidget::QueueManagerWidget(QueueManager *qman, QWidget *parent)
,
qman
(
qman
)
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
QVBoxLayout
*
vbox
=
new
QVBoxLayout
();
vbox
->
set
Margin
(
0
);
vbox
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setSpacing
(
0
);
view
=
new
QTreeView
(
this
);
view
->
setUniformRowHeights
(
true
);
...
...
ktorrent/torrentactivity.cpp
View file @
797fc5fd
...
...
@@ -46,7 +46,7 @@ TorrentActivity::TorrentActivity(Core *core, GUI *gui, QWidget *parent)
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
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
->
set
Margin
(
0
);
vlayout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
vlayout
->
addWidget
(
group_switcher
);
vlayout
->
addWidget
(
search_bar
);
vlayout
->
addWidget
(
view
);
...
...
ktorrent/view/torrentsearchbar.cpp
View file @
797fc5fd
...
...
@@ -21,7 +21,7 @@ TorrentSearchBar::TorrentSearchBar(View *view, QWidget *parent)
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
hide_search_bar
=
new
QToolButton
(
this
);
hide_search_bar
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"window-close"
)));
...
...
libktcore/gui/tabbarwidget.cpp
View file @
797fc5fd
...
...
@@ -58,7 +58,7 @@ TabBarWidget::TabBarWidget(QSplitter *splitter, QWidget *parent)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
tab_bar
=
new
KToolBar
(
this
);
tab_bar
->
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
connect
(
tab_bar
,
&
QToolBar
::
toolButtonStyleChanged
,
this
,
&
TabBarWidget
::
toolButtonStyleChanged
);
...
...
libktcore/plugin/pluginactivity.cpp
View file @
797fc5fd
...
...
@@ -25,7 +25,7 @@ PluginActivity::PluginActivity(PluginManager *pman)
,
pman
(
pman
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
pmw
=
new
KPluginWidget
(
this
);
connect
(
pmw
,
&
KPluginWidget
::
changed
,
this
,
&
PluginActivity
::
update
);
connect
(
pmw
,
&
KPluginWidget
::
pluginConfigSaved
,
this
,
&
PluginActivity
::
update
);
...
...
plugins/bwscheduler/scheduleeditor.cpp
View file @
797fc5fd
...
...
@@ -31,7 +31,7 @@ ScheduleEditor::ScheduleEditor(QWidget *parent)
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
view
=
new
WeekView
(
this
);
layout
->
addWidget
(
view
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
setupActions
();
...
...
plugins/infowidget/fileview.cpp
View file @
797fc5fd
...
...
@@ -48,10 +48,10 @@ FileView::FileView(QWidget *parent)
,
header_state_loaded
(
false
)
{
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
QVBoxLayout
*
vbox
=
new
QVBoxLayout
();
vbox
->
set
Margin
(
0
);
vbox
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setSpacing
(
0
);
view
=
new
QTreeView
(
this
);
toolbar
=
new
QToolBar
(
this
);
...
...
plugins/logviewer/logviewer.cpp
View file @
797fc5fd
...
...
@@ -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
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
layout
->
addWidget
(
output
);
output
->
document
()
->
setMaximumBlockCount
(
max_block_count
);
...
...
plugins/mediaplayer/mediaplayeractivity.cpp
View file @
797fc5fd
...
...
@@ -48,7 +48,7 @@ MediaPlayerActivity::MediaPlayerActivity(CoreInterface *core, KActionCollection
media_player
=
new
MediaPlayer
(
this
);
QHBoxLayout
*
layout
=
new
QHBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
tabs
=
new
QTabWidget
(
this
);
layout
->
addWidget
(
tabs
);
...
...
plugins/mediaplayer/mediaview.cpp
View file @
797fc5fd
...
...
@@ -72,11 +72,11 @@ MediaView::MediaView(MediaModel *model, QWidget *parent)
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
QHBoxLayout
*
hbox
=
new
QHBoxLayout
();
hbox
->
setSpacing
(
0
);
hbox
->
set
Margin
(
0
);
hbox
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
tool_bar
=
new
KToolBar
(
this
);
hbox
->
addWidget
(
tool_bar
);
...
...
plugins/mediaplayer/playlistwidget.cpp
View file @
797fc5fd
...
...
@@ -31,7 +31,7 @@ PlayListWidget::PlayListWidget(kt::MediaFileCollection *collection, kt::MediaPla
,
collection
(
collection
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setSpacing
(
0
);
QAction
*
remove_action
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"list-remove"
)),
i18n
(
"Remove"
),
this
);
...
...
plugins/mediaplayer/videowidget.cpp
View file @
797fc5fd
...
...
@@ -44,7 +44,7 @@ VideoWidget::VideoWidget(MediaPlayer *player, KActionCollection *ac, QWidget *pa
,
powermanagement_cookie
(
0
)
{
QVBoxLayout
*
vlayout
=
new
QVBoxLayout
(
this
);
vlayout
->
set
Margin
(
0
);
vlayout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
vlayout
->
setSpacing
(
0
);
video
=
new
Phonon
::
VideoWidget
(
this
);
...
...
plugins/search/searchactivity.cpp
View file @
797fc5fd
...
...
@@ -43,7 +43,7 @@ SearchActivity::SearchActivity(SearchPlugin *sp, QWidget *parent)
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
tabs
=
new
QTabWidget
(
this
);
tabs
->
setMovable
(
true
);
layout
->
addWidget
(
tabs
);
...
...
plugins/search/searchwidget.cpp
View file @
797fc5fd
...
...
@@ -47,7 +47,7 @@ SearchWidget::SearchWidget(SearchPlugin *sp)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
webview
=
new
WebView
(
this
,
sp
->
getProxy
());
KActionCollection
*
ac
=
sp
->
getSearchActivity
()
->
part
()
->
actionCollection
();
...
...
plugins/syndication/syndicationtab.cpp
View file @
797fc5fd
...
...
@@ -25,14 +25,14 @@ SyndicationTab::SyndicationTab(KActionCollection *ac, FeedList *feeds, FilterLis
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setSpacing
(
0
);
layout
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
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
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
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
->
set
Margin
(
0
);
layout
->
set
ContentsMargins
(
0
,
0
,
0
,
0
);
filter_tool_bar
=
new
KToolBar
(
widget
);
filter_tool_bar
->
setToolButtonStyle
(
Qt
::
ToolButtonIconOnly
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment