Commit 806bd5a0 authored by Ahmad Samir's avatar Ahmad Samir Committed by Tomaz Canabrava
Browse files

Port away from deprecated Qt API

parent 260abc1e
......@@ -1825,7 +1825,11 @@ int EditProfileDialog::maxSpinBoxWidth(const KPluralHandlingSpinBox *spinBox, co
opt.frame = spinBox->hasFrame();
const QSize hint(width, spinBox->sizeHint().height());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
const QSize spinBoxSize = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, spinBox);
#else
const QSize spinBoxSize = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, spinBox).expandedTo(QApplication::globalStrut());
#endif
return spinBoxSize.width();
}
......
......@@ -205,7 +205,7 @@ void TerminalHeaderBar::paintEvent(QPaintEvent *paintEvent)
if ((widget != nullptr) && !isTabbar && !isTerminalWidget && !isSplitter) {
QStyleOptionTabBarBase optTabBase;
QStylePainter p(this);
optTabBase.init(this);
optTabBase.initFrom(this);
optTabBase.shape = QTabBar::Shape::RoundedSouth;
optTabBase.documentMode = false;
p.drawPrimitive(QStyle::PE_FrameTabBarBase, optTabBase);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment