refactor: fix deprecation up to Qt 5.15
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -80,9 +80,7 @@ QSize LabeledToolButton::sizeHint() const
|
||||
if (popupMode() == MenuButtonPopup)
|
||||
w += style()->pixelMetric(QStyle::PM_MenuButtonIndicator, &opt, this);
|
||||
|
||||
QSize rawSize = style()->sizeFromContents(QStyle::CT_ToolButton, &opt, QSize(w, h), this);
|
||||
QSize sizeHint = rawSize.expandedTo(QApplication::globalStrut());
|
||||
return sizeHint;
|
||||
return style()->sizeFromContents(QStyle::CT_ToolButton, &opt, QSize(w, h), this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ void LogView::rowsInserted(const QModelIndex& parent, int first, int last)
|
||||
{
|
||||
format.setFont(font.value<QFont>());
|
||||
}
|
||||
auto fg = m_model->data(idx, Qt::TextColorRole);
|
||||
auto fg = m_model->data(idx, Qt::ForegroundRole);
|
||||
if(fg.isValid())
|
||||
{
|
||||
format.setForeground(fg.value<QColor>());
|
||||
|
@ -171,7 +171,7 @@ void PageContainer::createUI()
|
||||
headerHLayout->addSpacerItem(new QSpacerItem(rightMargin, 0, QSizePolicy::Fixed, QSizePolicy::Ignored));
|
||||
headerHLayout->setContentsMargins(0, 6, 0, 0);
|
||||
|
||||
m_pageStack->setMargin(0);
|
||||
m_pageStack->setContentsMargins(0, 0, 0, 0);
|
||||
m_pageStack->addWidget(new QWidget(this));
|
||||
|
||||
m_layout = new QGridLayout;
|
||||
|
@ -136,7 +136,7 @@ void VersionListView::paintInfoLabel(QPaintEvent *event) const
|
||||
auto innerBounds = bounds;
|
||||
innerBounds.adjust(10, 10, -10, -10);
|
||||
|
||||
QColor background = QApplication::palette().color(QPalette::Foreground);
|
||||
QColor background = QApplication::palette().color(QPalette::WindowText);
|
||||
QColor foreground = QApplication::palette().color(QPalette::Base);
|
||||
foreground.setAlpha(190);
|
||||
painter.setFont(font);
|
||||
|
Reference in New Issue
Block a user