From 57604562db870f7b05d4349761d73e054dbe04c6 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 10 Feb 2019 12:49:46 +0100 Subject: QtDeclarative: replace deprecated functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace the deprecated functions with it successors: - QFontMetrics::width() -> horizontalAdvance() - QLayout::setMargin() -> setContentsMargins() Change-Id: I2a2557cdb2eaec40e2c9955a0082372c582ec6b8 Reviewed-by: Shawn Rutledge Reviewed-by: Jan Arve Sæther --- tools/qmleasing/mainwindow.cpp | 2 +- tools/qmleasing/segmentproperties.cpp | 2 +- tools/qmleasing/splineeditor.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/qmleasing') diff --git a/tools/qmleasing/mainwindow.cpp b/tools/qmleasing/mainwindow.cpp index c1a87642a5..679b4c0b91 100644 --- a/tools/qmleasing/mainwindow.cpp +++ b/tools/qmleasing/mainwindow.cpp @@ -82,7 +82,7 @@ MainWindow::MainWindow(QWidget *parent) : splineEditor->setPreset(ui_properties.comboBox->currentText()); QVBoxLayout *groupBoxLayout = new QVBoxLayout(ui_properties.groupBox); - groupBoxLayout->setMargin(0); + groupBoxLayout->setContentsMargins(QMargins()); ui_properties.groupBox->setLayout(groupBoxLayout); groupBoxLayout->addWidget(splineEditor->pointListWidget()); diff --git a/tools/qmleasing/segmentproperties.cpp b/tools/qmleasing/segmentproperties.cpp index f37527f863..c61feef9a4 100644 --- a/tools/qmleasing/segmentproperties.cpp +++ b/tools/qmleasing/segmentproperties.cpp @@ -33,7 +33,7 @@ SegmentProperties::SegmentProperties(QWidget *parent) : QWidget(parent), m_splineEditor(nullptr), m_blockSignals(false) { QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(QMargins()); layout->setSpacing(2); setLayout(layout); { diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index 2a6081903f..69850dc7a1 100644 --- a/tools/qmleasing/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp @@ -524,7 +524,7 @@ void SplineEditor::setupPointListWidget() m_pointListWidget->setWidget(new QWidget(m_pointListWidget)); QVBoxLayout *layout = new QVBoxLayout(m_pointListWidget->widget()); - layout->setMargin(0); + layout->setContentsMargins(QMargins()); layout->setSpacing(2); m_pointListWidget->widget()->setLayout(layout); -- cgit v1.2.3