Commit 3161447f authored by Laurent Montel's avatar Laurent Montel 😁

Port some deprecated methods

parent 09ac74dc
......@@ -48,7 +48,7 @@ CoordsConfigDialog::CoordsConfigDialog(QWidget *parent)
configAxesDialog->kcfg_XMin->setTabChain( configAxesDialog->kcfg_XMax->focusProxy() );
configAxesDialog->kcfg_XMax->setTabChain( configAxesDialog->kcfg_YMin->focusProxy() );
configAxesDialog->kcfg_YMin->setTabChain( configAxesDialog->kcfg_YMax->focusProxy() );
configAxesDialog->layout()->setMargin( 0 );
configAxesDialog->layout()->setContentsMargins( 0, 0, 0, 0 );
addPage(configAxesDialog , i18n( "Coordinates" ), "coords", i18n( "Coordinate System" ) );
setWindowTitle( i18n( "Coordinate System" ) );
setHelp("axes-config");
......
......@@ -58,7 +58,7 @@ EquationEdit::EquationEdit( QWidget * parent )
connect(m_equationEditWidget, &EquationEditWidget::cursorPositionChanged, this, &EquationEdit::reHighlight);
QHBoxLayout * layout = new QHBoxLayout( this );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
layout->addWidget( m_equationEditWidget );
layout->addWidget( m_editButton );
}
......
......@@ -113,7 +113,7 @@ FunctionEditor::FunctionEditor( QMenu * createNewPlotsMenu, QWidget * parent )
//END initialize equation edits
for ( unsigned i = 0; i < 5; ++i )
m_editor->stackedWidget->widget(i)->layout()->setMargin( 0 );
m_editor->stackedWidget->widget(i)->layout()->setContentsMargins( 0, 0, 0, 0 );
connect(m_editor->deleteButton, &QPushButton::clicked, this, &FunctionEditor::deleteCurrent);
connect(m_functionList, &FunctionListWidget::currentItemChanged, this, &FunctionEditor::functionSelected);
......
......@@ -106,13 +106,13 @@ QVariant InitialConditionsModel::data( const QModelIndex & index, int role ) con
case Qt::TextAlignmentRole:
return Qt::AlignLeft;
case Qt::TextColorRole:
case Qt::ForegroundRole:
return QColor(Qt::black);
case Qt::WhatsThisRole:
case Qt::AccessibleDescriptionRole:
case Qt::CheckStateRole:
case Qt::BackgroundColorRole:
case Qt::BackgroundRole:
case Qt::SizeHintRole:
case Qt::FontRole:
case Qt::UserRole:
......@@ -273,7 +273,7 @@ InitialConditionsEditor::InitialConditionsEditor( QWidget * parent )
m_equation = 0;
setupUi( this );
layout()->setMargin( 0 );
layout()->setContentsMargins( 0, 0, 0, 0 );
connect(addButton, &QPushButton::clicked, this, &InitialConditionsEditor::add);
connect(removeButton, &QPushButton::clicked, this, &InitialConditionsEditor::remove);
......
......@@ -393,7 +393,7 @@ KGradientDialog::KGradientDialog( QWidget * parent, bool modal )
//BEGIN layout widgets
QVBoxLayout * layout = new QVBoxLayout( this );
layout->setMargin( 0 );
layout->setContentsMargins( 0, 0, 0, 0 );
m_gradient->setFixedHeight( 24 );
layout->addWidget( m_gradient );
......
......@@ -65,7 +65,7 @@ KParameterEditor::KParameterEditor( QList<Value> *l, QWidget *parent )
connect(buttonBox, &QDialogButtonBox::rejected, this, &KParameterEditor::reject);
mainLayout->addWidget(buttonBox);
mainLayout->setMargin( 0 );
mainLayout->setContentsMargins( 0, 0, 0, 0 );
m_mainWidget->cmdNew->setIcon( QIcon::fromTheme("document-new" ) );
m_mainWidget->cmdDelete->setIcon( QIcon::fromTheme("edit-delete" ) );
......
......@@ -72,7 +72,7 @@ PlotStyleWidget::PlotStyleWidget( QWidget * parent )
m_dialog->setWindowTitle( i18n("Plot Appearance") );
m_dialogWidget = new PlotStyleDialogWidget( m_dialog );
m_dialogWidget->layout()->setMargin( 0 );
m_dialogWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
mainLayout->addWidget(m_dialogWidget);
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok);
......
......@@ -44,7 +44,7 @@
#include <QResizeEvent>
#include <QSlider>
#include <QTextEdit>
#include <QTime>
#include <QElapsedTimer>
#include <QTimer>
// KDE includes
......@@ -114,7 +114,7 @@ View::View( bool readOnly, QMenu * functionPopup, QWidget* parent )
m_textEdit->setLineWrapMode( QTextEdit::NoWrap );
m_textDocument = m_textEdit->document();
m_mousePressTimer = new QTime();
m_mousePressTimer = new QElapsedTimer();
new ViewAdaptor(this);
QDBusConnection::sessionBus().registerObject("/view", this);
......@@ -3404,7 +3404,7 @@ void View::leaveEvent(QEvent *)
void View::wheelEvent(QWheelEvent *e)
{
m_AccumulatedDelta += e->delta();
m_AccumulatedDelta += e->angleDelta().y();
if (e->modifiers() & Qt::ControlModifier)
{
......
......@@ -48,8 +48,8 @@ class MainDlg;
class QPaintEvent;
class QTextDocument;
class KTextEdit;
class QTime;
class QMenu;
class QElapsedTimer;
//@{
/// Some abbreviations for horizontal and vertical lines.
......@@ -616,7 +616,7 @@ class View : public QWidget
/// for translating the view via dragging
QPoint m_prevDragMousePos;
/// timer that is started when the mouse is pressed
QTime * m_mousePressTimer;
QElapsedTimer * m_mousePressTimer;
/** Current plot viewport. */
const QRectF getViewport();
......
Markdown is supported
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