diff --git a/korgac/alarmdialog.cpp b/korgac/alarmdialog.cpp --- a/korgac/alarmdialog.cpp +++ b/korgac/alarmdialog.cpp @@ -267,7 +267,7 @@ QWidget *suspendBox = new QWidget(topBox); QHBoxLayout *suspendBoxHBoxLayout = new QHBoxLayout(suspendBox); - suspendBoxHBoxLayout->setMargin(0); + suspendBoxHBoxLayout->setContentsMargins(0, 0, 0, 0); topLayout->addWidget(suspendBox); QLabel *l = new QLabel(i18nc("@label:spinbox", "Suspend &duration:"), suspendBox); diff --git a/src/akonadicollectionview.cpp b/src/akonadicollectionview.cpp --- a/src/akonadicollectionview.cpp +++ b/src/akonadicollectionview.cpp @@ -530,7 +530,7 @@ mManagerShowCollectionProperties = new ManageShowCollectionProperties(this, this); QVBoxLayout *topLayout = new QVBoxLayout(this); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); QLineEdit *searchCol = new QLineEdit(this); searchCol->setToolTip(i18nc("info:tooltip", "Set search keyword")); diff --git a/src/calendarview.cpp b/src/calendarview.cpp --- a/src/calendarview.cpp +++ b/src/calendarview.cpp @@ -148,7 +148,7 @@ mDateChecker = new DateChecker(this); QVBoxLayout *topLayout = new QVBoxLayout(this); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); // create the main layout frames. mPanner = new QSplitter(Qt::Horizontal, this); @@ -170,15 +170,15 @@ mEventViewerBox = new QWidget(mLeftSplitter); QVBoxLayout *mEventViewerBoxVBoxLayout = new QVBoxLayout(mEventViewerBox); - mEventViewerBoxVBoxLayout->setMargin(0); - mEventViewerBoxVBoxLayout->setMargin(0); + mEventViewerBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); + mEventViewerBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); mEventViewer = new CalendarSupport::IncidenceViewer(mCalendar.data(), mEventViewerBox); mEventViewer->setObjectName(QStringLiteral("EventViewer")); mEventViewerBoxVBoxLayout->addWidget(mEventViewer); QWidget *rightBox = new QWidget(mPanner); QVBoxLayout *rightBoxVBoxLayout = new QVBoxLayout(rightBox); - rightBoxVBoxLayout->setMargin(0); + rightBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); mNavigatorBar = new NavigatorBar(rightBox); rightBoxVBoxLayout->addWidget(mNavigatorBar); mRightFrame = new QStackedWidget(rightBox); diff --git a/src/dialog/noteeditdialog.cpp b/src/dialog/noteeditdialog.cpp --- a/src/dialog/noteeditdialog.cpp +++ b/src/dialog/noteeditdialog.cpp @@ -66,9 +66,9 @@ mOkButton->setEnabled(false); QGridLayout *layout = new QGridLayout(mainWidget); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); QHBoxLayout *hbox = new QHBoxLayout; - hbox->setMargin(0); + hbox->setContentsMargins(0, 0, 0, 0); hbox->setSpacing(2); mNoteTitle = new QLineEdit; diff --git a/src/dialog/searchdialog.cpp b/src/dialog/searchdialog.cpp --- a/src/dialog/searchdialog.cpp +++ b/src/dialog/searchdialog.cpp @@ -66,7 +66,7 @@ // Results list view QVBoxLayout *layout = new QVBoxLayout; - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); listView = new EventViews::ListView(m_calendarview->calendar(), this); layout->addWidget(listView); m_ui->listViewFrame->setLayout(layout); diff --git a/src/kcmdesignerfields.cpp b/src/kcmdesignerfields.cpp --- a/src/kcmdesignerfields.cpp +++ b/src/kcmdesignerfields.cpp @@ -295,7 +295,7 @@ void KCMDesignerFields::initGUI() { QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); bool noDesigner = QStandardPaths::findExecutable(QStringLiteral("designer")).isEmpty(); diff --git a/src/kontactplugin/korganizer/apptsummarywidget.cpp b/src/kontactplugin/korganizer/apptsummarywidget.cpp --- a/src/kontactplugin/korganizer/apptsummarywidget.cpp +++ b/src/kontactplugin/korganizer/apptsummarywidget.cpp @@ -58,7 +58,7 @@ { QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setSpacing(3); - mainLayout->setMargin(3); + mainLayout->setContentsMargins(3, 3, 3, 3); QWidget *header = createHeader( this, QStringLiteral("view-calendar-upcoming-events"), i18n("Upcoming Events")); diff --git a/src/kontactplugin/korganizer/todosummarywidget.cpp b/src/kontactplugin/korganizer/todosummarywidget.cpp --- a/src/kontactplugin/korganizer/todosummarywidget.cpp +++ b/src/kontactplugin/korganizer/todosummarywidget.cpp @@ -58,7 +58,7 @@ { QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setSpacing(3); - mainLayout->setMargin(3); + mainLayout->setContentsMargins(3, 3, 3, 3); QWidget *header = createHeader(this, QStringLiteral("korg-todo"), i18n("Pending To-dos")); mainLayout->addWidget(header); diff --git a/src/kontactplugin/specialdates/sdsummarywidget.cpp b/src/kontactplugin/specialdates/sdsummarywidget.cpp --- a/src/kontactplugin/specialdates/sdsummarywidget.cpp +++ b/src/kontactplugin/specialdates/sdsummarywidget.cpp @@ -120,7 +120,7 @@ // Create the Summary Layout QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->setSpacing(3); - mainLayout->setMargin(3); + mainLayout->setContentsMargins(3, 3, 3, 3); QWidget *header = createHeader(this, QStringLiteral("view-calendar-special-occasion"), diff --git a/src/korganizer_part.cpp b/src/korganizer_part.cpp --- a/src/korganizer_part.cpp +++ b/src/korganizer_part.cpp @@ -77,7 +77,7 @@ QVBoxLayout *topLayout = new QVBoxLayout(canvas); topLayout->addWidget(mView); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); connect(mView, &CalendarView::incidenceSelected, this, &KOrganizerPart::slotChangeInfo); diff --git a/src/prefs/koprefsdialog.cpp b/src/prefs/koprefsdialog.cpp --- a/src/prefs/koprefsdialog.cpp +++ b/src/prefs/koprefsdialog.cpp @@ -249,7 +249,7 @@ // holiday region selection QWidget *holidayRegBox = new QWidget(regionalPage); QHBoxLayout *holidayRegBoxHBoxLayout = new QHBoxLayout(holidayRegBox); - holidayRegBoxHBoxLayout->setMargin(0); + holidayRegBoxHBoxLayout->setContentsMargins(0, 0, 0, 0); holidaysLayout->addWidget(holidayRegBox, 1, 0, 1, 2); QLabel *holidayLabel = new QLabel(i18nc("@label", "Use holiday region:"), holidayRegBox); @@ -1046,7 +1046,7 @@ topTopLayout->addWidget(topFrame); QGridLayout *topLayout = new QGridLayout(topFrame); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); KPIM::KPrefsWidBool *useGroupwareBool = addWidBool( @@ -1273,7 +1273,7 @@ QWidget *buttonRow = new QWidget(this); QBoxLayout *buttonRowLayout = new QHBoxLayout(buttonRow); - buttonRowLayout->setMargin(0); + buttonRowLayout->setContentsMargins(0, 0, 0, 0); mConfigureButton = new QPushButton(buttonRow); KGuiItem::assign(mConfigureButton, KGuiItem(i18nc("@action:button", "Configure &Plugin..."), QStringLiteral("configure"), QString(), diff --git a/src/views/agendaview/koagendaview.cpp b/src/views/agendaview/koagendaview.cpp --- a/src/views/agendaview/koagendaview.cpp +++ b/src/views/agendaview/koagendaview.cpp @@ -62,7 +62,7 @@ , d(new Private(isSideBySide, this)) { QHBoxLayout *layout = new QHBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(d->mAgendaView); connect(d->mAgendaView, &EventViews::AgendaView::zoomViewHorizontally, diff --git a/src/views/monthview/monthview.cpp b/src/views/monthview/monthview.cpp --- a/src/views/monthview/monthview.cpp +++ b/src/views/monthview/monthview.cpp @@ -37,7 +37,7 @@ : KOEventView(parent) { QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); mMonthView = new EventViews::MonthView(EventViews::MonthView::Visible, this); mMonthView->setPreferences(KOPrefs::instance()->eventViewsPreferences()); layout->addWidget(mMonthView); diff --git a/src/views/timelineview/kotimelineview.cpp b/src/views/timelineview/kotimelineview.cpp --- a/src/views/timelineview/kotimelineview.cpp +++ b/src/views/timelineview/kotimelineview.cpp @@ -36,7 +36,7 @@ : KOEventView(parent) { QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); + vbox->setContentsMargins(0, 0, 0, 0); mTimeLineView = new EventViews::TimelineView(this); vbox->addWidget(mTimeLineView); mEventPopup = eventPopup(); diff --git a/src/widgets/kdatenavigator.cpp b/src/widgets/kdatenavigator.cpp --- a/src/widgets/kdatenavigator.cpp +++ b/src/widgets/kdatenavigator.cpp @@ -41,7 +41,7 @@ , mBaseDate(1970, 1, 1) { QGridLayout *topLayout = new QGridLayout(this); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); topLayout->setSpacing(0); mNavigatorBar = new NavigatorBar(this); diff --git a/src/widgets/navigatorbar.cpp b/src/widgets/navigatorbar.cpp --- a/src/widgets/navigatorbar.cpp +++ b/src/widgets/navigatorbar.cpp @@ -81,7 +81,7 @@ // set up control frame layout QHBoxLayout *ctrlLayout = new QHBoxLayout(this); - ctrlLayout->setMargin(0); + ctrlLayout->setContentsMargins(0, 0, 0, 0); ctrlLayout->addWidget(mPrevYear); ctrlLayout->addWidget(mPrevMonth); ctrlLayout->addStretch();