Replaced deprecated QLayout::setMargins by QLayout::setContentsMargins

This commit is contained in:
thunder2 2025-07-20 03:05:02 +02:00
parent 33fc4308c4
commit 90041fc627
19 changed files with 21 additions and 21 deletions

View file

@ -49,7 +49,7 @@ AboutWidget::AboutWidget(QWidget* parent)
setupUi(this);
QHBoxLayout* l = new QHBoxLayout();
l->setMargin(0);
l->setContentsMargins(0, 0, 0, 0);
l->addStretch(1);
l->addStretch(1);
specialFrame->setContentsMargins(0, 0, 0, 0);

View file

@ -2165,7 +2165,7 @@ void IdDialog::headerContextMenuRequested(QPoint)
// create menu header
//QHBoxLayout *hbox = new QHBoxLayout(widget);
//hbox->setMargin(0);
//hbox->setContentsMargins(0, 0, 0, 0);
//hbox->setSpacing(6);
auto addEntry = [&](const QString& name,RsIdentityListModel::Columns col)
@ -2264,7 +2264,7 @@ void IdDialog::IdListCustomPopupMenu( QPoint )
// create menu header
QHBoxLayout *hbox = new QHBoxLayout(widget);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget);

View file

@ -80,7 +80,7 @@ void LogoBar::init() {
);
QGridLayout * layout = new QGridLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(FillLabel1, 0, 0);

View file

@ -261,7 +261,7 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
QWidget *widget = new QWidget();
widget->setObjectName("trans_statusComboBoxFrame");
QHBoxLayout *hbox = new QHBoxLayout();
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
hbox->addWidget(statusComboBox);
widget->setLayout(hbox);

View file

@ -219,7 +219,7 @@ QStringList GuiExprElement::getConditionOptions(ExprSearchType t)
QHBoxLayout * GuiExprElement::createLayout(QWidget * parent /*= nullptr*/)
{
QHBoxLayout * hboxLayout = new QHBoxLayout(parent);
hboxLayout->setMargin(0);
hboxLayout->setContentsMargins(0, 0, 0, 0);
hboxLayout->setSpacing(0);
return hboxLayout;
}

View file

@ -304,7 +304,7 @@ void FriendList::peerTreeWidgetCustomPopupMenu()
// create menu header
QHBoxLayout *hbox = new QHBoxLayout(widget);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget);

View file

@ -319,7 +319,7 @@ void NewFriendList::headerContextMenuRequested(QPoint /*p*/)
// create menu header
QHBoxLayout *hbox = new QHBoxLayout(widget);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget);
@ -591,7 +591,7 @@ void NewFriendList::peerTreeWidgetCustomPopupMenu()
// create menu header
QHBoxLayout *hbox = new QHBoxLayout(widget);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget);

View file

@ -260,7 +260,7 @@ QMenu *RSTreeWidget::createStandardContextMenu(QMenu *contextMenu)
// create menu header
QHBoxLayout *hbox = new QHBoxLayout(widget);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(widget);

View file

@ -32,7 +32,7 @@ SoundStatus::SoundStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(0);
imageButton = new QPushButton(this);

View file

@ -33,7 +33,7 @@ SysTrayStatus::SysTrayStatus(QWidget *parent) :
QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(0);
imageButton = new QPushButton(this);

View file

@ -32,7 +32,7 @@ ToasterDisable::ToasterDisable(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(0);
imageButton = new QPushButton(this);

View file

@ -37,7 +37,7 @@ DHTStatus::DHTStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout();
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
statusDHT = new QLabel("<strong>" + tr("DHT") + ":</strong>", this );

View file

@ -33,7 +33,7 @@ DiscStatus::DiscStatus(QWidget *parent)
hide (); // show only, when pending operations are available
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
QLabel *iconLabel = new QLabel(this);

View file

@ -34,7 +34,7 @@ HashingStatus::HashingStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
movie = new QMovie(":/images/loader/indicator-16.gif");

View file

@ -31,7 +31,7 @@ NATStatus::NATStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
statusNAT = new QLabel( tr("<strong>NAT:</strong>"), this );

View file

@ -28,7 +28,7 @@ PeerStatus::PeerStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);

View file

@ -32,7 +32,7 @@ RatesStatus::RatesStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout(this);
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
iconLabel = new QLabel( this );

View file

@ -40,7 +40,7 @@ TorStatus::TorStatus(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *hbox = new QHBoxLayout();
hbox->setMargin(0);
hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(6);
statusTor = new QLabel("<strong>" + tr("Tor") + ":</strong>", this );

View file

@ -27,7 +27,7 @@
QGridLayout * Widget::createLayout(QWidget * parent) {
QGridLayout * layout = new QGridLayout(parent);
layout->setSpacing(0);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
return layout;
}