diff --git a/src/composer-ng/richtextcomposerwidget.cpp b/src/composer-ng/richtextcomposerwidget.cpp --- a/src/composer-ng/richtextcomposerwidget.cpp +++ b/src/composer-ng/richtextcomposerwidget.cpp @@ -39,7 +39,7 @@ , d(new KPIMTextEdit::RichTextComposerWidgetPrivate) { QHBoxLayout *layout = new QHBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); d->richTextComposer = new KPIMTextEdit::RichTextComposer(this); d->richTextComposer->setObjectName(QStringLiteral("richtextcomposer")); RichTextEditorWidget *editorWidget = new RichTextEditorWidget(d->richTextComposer, this); diff --git a/src/insertimagewidget.cpp b/src/insertimagewidget.cpp --- a/src/insertimagewidget.cpp +++ b/src/insertimagewidget.cpp @@ -47,7 +47,7 @@ : q(qq) { QVBoxLayout *lay = new QVBoxLayout(q); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); QHBoxLayout *hbox = new QHBoxLayout; QLabel *lab = new QLabel(i18n("Image Location:")); imageUrlRequester = new KUrlRequester; diff --git a/src/inserttablewidget.cpp b/src/inserttablewidget.cpp --- a/src/inserttablewidget.cpp +++ b/src/inserttablewidget.cpp @@ -49,7 +49,7 @@ mBorder->setSuffix(i18n(" px")); QGridLayout *gridLayout = new QGridLayout; - gridLayout->setMargin(0); + gridLayout->setContentsMargins(0, 0, 0, 0); gridLayout->addWidget(new QLabel(i18n("Rows:")), 0, 0); gridLayout->addWidget(mRows, 0, 1); diff --git a/src/tableformatdialog.cpp b/src/tableformatdialog.cpp --- a/src/tableformatdialog.cpp +++ b/src/tableformatdialog.cpp @@ -46,7 +46,7 @@ QWidget *page = new QWidget(q); QVBoxLayout *lay = new QVBoxLayout(page); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); tableWidget = new InsertTableWidget; lay->addWidget(tableWidget); diff --git a/src/texteditor/commonwidget/textfindreplacewidget.cpp b/src/texteditor/commonwidget/textfindreplacewidget.cpp --- a/src/texteditor/commonwidget/textfindreplacewidget.cpp +++ b/src/texteditor/commonwidget/textfindreplacewidget.cpp @@ -36,8 +36,9 @@ QHBoxLayout *lay = new QHBoxLayout(this); QLabel *label = new QLabel(i18nc("Replace text", "Replace:"), this); lay->addWidget(label); - const int marg = lay->margin(); - lay->setContentsMargins(marg, 0, marg, 0); + const int marg1 = lay->contentsMargins().left(); + const int marg2 = lay->contentsMargins().right(); + lay->setContentsMargins(marg1, 0, marg2, 0); mReplace = new QLineEdit(this); mReplace->setClearButtonEnabled(true); @@ -71,8 +72,9 @@ : QWidget(parent) { QHBoxLayout *lay = new QHBoxLayout(this); - const int marg = lay->margin(); - lay->setContentsMargins(marg, 0, marg, 0); + const int marg1 = lay->contentsMargins().left(); + const int marg2 = lay->contentsMargins().right(); + lay->setContentsMargins(marg1, 0, marg2, 0); QLabel *label = new QLabel(i18nc("Find text", "F&ind:"), this); lay->addWidget(label); diff --git a/src/texteditor/commonwidget/textgotolinewidget.cpp b/src/texteditor/commonwidget/textgotolinewidget.cpp --- a/src/texteditor/commonwidget/textgotolinewidget.cpp +++ b/src/texteditor/commonwidget/textgotolinewidget.cpp @@ -47,7 +47,7 @@ , d(new KPIMTextEdit::TextGoToLineWidgetPrivate) { QHBoxLayout *hbox = new QHBoxLayout(this); - hbox->setMargin(2); + hbox->setContentsMargins(2, 2, 2, 2); QToolButton *closeBtn = new QToolButton(this); closeBtn->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close"))); closeBtn->setIconSize(QSize(16, 16)); diff --git a/src/texteditor/commonwidget/textmessageindicator.cpp b/src/texteditor/commonwidget/textmessageindicator.cpp --- a/src/texteditor/commonwidget/textmessageindicator.cpp +++ b/src/texteditor/commonwidget/textmessageindicator.cpp @@ -186,7 +186,7 @@ painter.setPen(Qt::black); painter.setBrush(palette().color(QPalette::Window)); painter.translate(0.5, 0.5); - painter.drawRoundRect(1, 1, width() - 2, height() - 2, 1600 / width(), 1600 / height()); + painter.drawRoundedRect(1, 1, width() - 2, height() - 2, 1600 / width(), 1600 / height(), Qt::RelativeSize); // draw icon if present if (!mSymbol.isNull()) { diff --git a/src/texteditor/plaintexteditor/plaintexteditor.cpp b/src/texteditor/plaintexteditor/plaintexteditor.cpp --- a/src/texteditor/plaintexteditor/plaintexteditor.cpp +++ b/src/texteditor/plaintexteditor/plaintexteditor.cpp @@ -320,16 +320,16 @@ d->customPalette = testAttribute(Qt::WA_SetPalette); QPalette p = palette(); - QColor color = p.color(QPalette::Disabled, QPalette::Background); + QColor color = p.color(QPalette::Disabled, QPalette::Window); p.setColor(QPalette::Base, color); - p.setColor(QPalette::Background, color); + p.setColor(QPalette::Window, color); setPalette(p); } else { if (d->customPalette && testAttribute(Qt::WA_SetPalette)) { QPalette p = palette(); QColor color = p.color(QPalette::Normal, QPalette::Base); p.setColor(QPalette::Base, color); - p.setColor(QPalette::Background, color); + p.setColor(QPalette::Window, color); setPalette(p); } else { setPalette(QPalette()); diff --git a/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp b/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp --- a/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp +++ b/src/texteditor/plaintexteditor/plaintexteditorwidget.cpp @@ -92,7 +92,7 @@ void PlainTextEditorWidget::init(PlainTextEditor *customEditor) { QVBoxLayout *lay = new QVBoxLayout(this); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); d->mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this); lay->addWidget(d->mTextToSpeechWidget); if (customEditor) { diff --git a/src/texteditor/richtexteditor/richtexteditor.cpp b/src/texteditor/richtexteditor/richtexteditor.cpp --- a/src/texteditor/richtexteditor/richtexteditor.cpp +++ b/src/texteditor/richtexteditor/richtexteditor.cpp @@ -399,16 +399,16 @@ d->customPalette = testAttribute(Qt::WA_SetPalette); QPalette p = palette(); - QColor color = p.color(QPalette::Disabled, QPalette::Background); + QColor color = p.color(QPalette::Disabled, QPalette::Window); p.setColor(QPalette::Base, color); - p.setColor(QPalette::Background, color); + p.setColor(QPalette::Window, color); setPalette(p); } else { if (d->customPalette && testAttribute(Qt::WA_SetPalette)) { QPalette p = palette(); QColor color = p.color(QPalette::Normal, QPalette::Base); p.setColor(QPalette::Base, color); - p.setColor(QPalette::Background, color); + p.setColor(QPalette::Window, color); setPalette(p); } else { setPalette(QPalette()); diff --git a/src/texteditor/richtexteditor/richtexteditorwidget.cpp b/src/texteditor/richtexteditor/richtexteditorwidget.cpp --- a/src/texteditor/richtexteditor/richtexteditorwidget.cpp +++ b/src/texteditor/richtexteditor/richtexteditorwidget.cpp @@ -114,7 +114,7 @@ void RichTextEditorWidget::init(RichTextEditor *customEditor) { QVBoxLayout *lay = new QVBoxLayout(this); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); d->mTextToSpeechWidget = new KPIMTextEdit::TextToSpeechWidget(this); lay->addWidget(d->mTextToSpeechWidget); if (customEditor) {