Don't use functions obsoleted in Qt 5.13.0

This commit is contained in:
Martchus 2019-06-25 14:00:09 +02:00
parent 940deda0f3
commit 72d31c568e
5 changed files with 9 additions and 9 deletions

View File

@ -588,7 +588,7 @@ void DbQueryWidget::showCover(const QByteArray &data)
dlg.setWindowFlags(Qt::Tool);
dlg.setWindowTitle(tr("Cover - %1").arg(QApplication::applicationName()));
QBoxLayout layout(QBoxLayout::Up);
layout.setMargin(0);
layout.setContentsMargins(0, 0, 0, 0);
QGraphicsView view(&dlg);
QGraphicsScene scene;
layout.addWidget(&view);
@ -613,7 +613,7 @@ void DbQueryWidget::showLyrics(const QString &data)
dlg.setWindowFlags(Qt::Tool);
dlg.setWindowTitle(tr("Lyrics - %1").arg(QApplication::applicationName()));
QBoxLayout layout(QBoxLayout::Up);
layout.setMargin(0);
layout.setContentsMargins(0, 0, 0, 0);
QTextBrowser textBrowser;
layout.addWidget(&textBrowser);
textBrowser.setText(data);

View File

@ -56,12 +56,12 @@ void NotificationLabel::paintEvent(QPaintEvent *event)
switch (m_type) {
case NotificationType::Progress:
if (m_subject == NotificationSubject::None) {
drawProgressIndicator(painter, pixmapRect, option.palette.color(QPalette::Foreground), m_animationStep);
drawProgressIndicator(painter, pixmapRect, option.palette.color(QPalette::WindowText), m_animationStep);
} else {
style->drawItemPixmap(&painter, pixmapRect, Qt::AlignTop | Qt::AlignLeft, m_mainPixmap);
QSize size = pixmapRect.size() * 0.3;
pixmapRect.adjust(size.width(), size.height(), 0, 0);
drawProgressIndicator(painter, pixmapRect, option.palette.color(QPalette::Foreground), m_animationStep);
drawProgressIndicator(painter, pixmapRect, option.palette.color(QPalette::WindowText), m_animationStep);
}
break;
default:

View File

@ -530,7 +530,7 @@ void PicturePreviewSelection::displaySelected()
: tr("Cover - %1").arg(QCoreApplication::applicationName());
dlg.setWindowTitle(title);
QBoxLayout layout(QBoxLayout::Up);
layout.setMargin(0);
layout.setContentsMargins(0, 0, 0, 0);
QGraphicsView view(&dlg);
QGraphicsScene scene;
layout.addWidget(&view);

View File

@ -31,11 +31,11 @@ namespace QtGui {
TagEdit::TagEdit(QWidget *parent)
: QWidget(parent)
{
QVBoxLayout *const mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
auto *const mainLayout = new QVBoxLayout(this);
mainLayout->setContentsMargins(0, 0, 0, 0);
QSplitter *const splitter = new QSplitter(this);
splitter->setOrientation(Qt::Horizontal);
QWidget *widget = new QWidget(this);
auto *widget = new QWidget(this);
m_layoutLeft = new QFormLayout(widget);
m_layoutLeft->setContentsMargins(QMargins());
m_layoutLeft->setSpacing(2);

View File

@ -347,7 +347,7 @@ public:
APPEND_GUI_RULE(QStringLiteral("color: %1;")
.arg(palette.link()
.color()
.darker(palette.color(QPalette::Background).lightness() > palette.color(QPalette::Link).lightness() ? 150 : 50)
.darker(palette.color(QPalette::Window).lightness() > palette.color(QPalette::Link).lightness() ? 150 : 50)
.name()),
QStringLiteral("color: #23527c;"))
res.append(QStringLiteral("text-decoration: underline;"