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

View File

@ -56,12 +56,12 @@ void NotificationLabel::paintEvent(QPaintEvent *event)
switch (m_type) { switch (m_type) {
case NotificationType::Progress: case NotificationType::Progress:
if (m_subject == NotificationSubject::None) { 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 { } else {
style->drawItemPixmap(&painter, pixmapRect, Qt::AlignTop | Qt::AlignLeft, m_mainPixmap); style->drawItemPixmap(&painter, pixmapRect, Qt::AlignTop | Qt::AlignLeft, m_mainPixmap);
QSize size = pixmapRect.size() * 0.3; QSize size = pixmapRect.size() * 0.3;
pixmapRect.adjust(size.width(), size.height(), 0, 0); 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; break;
default: default:

View File

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

View File

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

View File

@ -347,7 +347,7 @@ public:
APPEND_GUI_RULE(QStringLiteral("color: %1;") APPEND_GUI_RULE(QStringLiteral("color: %1;")
.arg(palette.link() .arg(palette.link()
.color() .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()), .name()),
QStringLiteral("color: #23527c;")) QStringLiteral("color: #23527c;"))
res.append(QStringLiteral("text-decoration: underline;" res.append(QStringLiteral("text-decoration: underline;"