diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-29 10:36:01 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-09-02 13:01:07 +0000 |
commit | 8e31932c295b158805410a9991bef8edc869d21b (patch) | |
tree | f12f6fcdccecf70760b0ae9c1fedaefef5e5a807 /src/shared | |
parent | 228f5fc319e33ed32cb1f997c65b68b5ddc18fd7 (diff) | |
download | qt-creator-8e31932c295b158805410a9991bef8edc869d21b.tar.gz |
Remove usages of deprecated APIs of QLayout
Replaced:
QLayout::setMargin() -> QLayout::setContentsMargins()
QLayout::margin() -> QLayout::getContentsMargins()
Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/designerintegrationv2/formresizer.cpp | 5 | ||||
-rw-r--r-- | src/shared/help/bookmarkmanager.cpp | 4 | ||||
-rw-r--r-- | src/shared/help/contentwindow.cpp | 2 | ||||
-rw-r--r-- | src/shared/help/indexwindow.cpp | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/shared/designerintegrationv2/formresizer.cpp b/src/shared/designerintegrationv2/formresizer.cpp index a88f0ac6e3..34de90a477 100644 --- a/src/shared/designerintegrationv2/formresizer.cpp +++ b/src/shared/designerintegrationv2/formresizer.cpp @@ -50,12 +50,13 @@ FormResizer::FormResizer(QWidget *parent) : setBackgroundRole(QPalette::Base); QVBoxLayout *handleLayout = new QVBoxLayout(this); - handleLayout->setMargin(SELECTION_MARGIN); + handleLayout->setContentsMargins(SELECTION_MARGIN, SELECTION_MARGIN, + SELECTION_MARGIN, SELECTION_MARGIN); handleLayout->addWidget(m_frame); m_frame->setFrameStyle(QFrame::Panel | QFrame::Raised); QVBoxLayout *layout = new QVBoxLayout(m_frame); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); // handles m_handles.reserve(SizeHandleRect::Left); for (int i = SizeHandleRect::LeftTop; i <= SizeHandleRect::Left; ++i) { diff --git a/src/shared/help/bookmarkmanager.cpp b/src/shared/help/bookmarkmanager.cpp index dc19b8e92a..7f652b41cf 100644 --- a/src/shared/help/bookmarkmanager.cpp +++ b/src/shared/help/bookmarkmanager.cpp @@ -411,7 +411,7 @@ void BookmarkWidget::setup() regExp.setCaseSensitivity(Qt::CaseInsensitive); QLayout *vlayout = new QVBoxLayout(this); - vlayout->setMargin(0); + vlayout->setContentsMargins(0, 0, 0, 0); vlayout->setSpacing(0); searchField = new Utils::FancyLineEdit(this); @@ -421,7 +421,7 @@ void BookmarkWidget::setup() Utils::StyledBar *toolbar = new Utils::StyledBar(this); toolbar->setSingleRow(false); QLayout *tbLayout = new QHBoxLayout(); - tbLayout->setMargin(4); + tbLayout->setContentsMargins(4, 4, 4, 4); tbLayout->addWidget(searchField); toolbar->setLayout(tbLayout); diff --git a/src/shared/help/contentwindow.cpp b/src/shared/help/contentwindow.cpp index e50a47c25d..16f7aaccbd 100644 --- a/src/shared/help/contentwindow.cpp +++ b/src/shared/help/contentwindow.cpp @@ -56,7 +56,7 @@ ContentWindow::ContentWindow() setFocusProxy(m_contentWidget); QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(m_contentWidget); connect(m_contentWidget, &QWidget::customContextMenuRequested, diff --git a/src/shared/help/indexwindow.cpp b/src/shared/help/indexwindow.cpp index 5139c8574d..324a071ab6 100644 --- a/src/shared/help/indexwindow.cpp +++ b/src/shared/help/indexwindow.cpp @@ -69,14 +69,14 @@ IndexWindow::IndexWindow() QLabel *l = new QLabel(tr("&Look for:")); l->setBuddy(m_searchLineEdit); layout->addWidget(l); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); Utils::StyledBar *toolbar = new Utils::StyledBar(this); toolbar->setSingleRow(false); QLayout *tbLayout = new QHBoxLayout(); tbLayout->setSpacing(6); - tbLayout->setMargin(4); + tbLayout->setContentsMargins(4, 4, 4, 4); tbLayout->addWidget(l); tbLayout->addWidget(m_searchLineEdit); toolbar->setLayout(tbLayout); |