Commit 510fc641 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify pointer

parent 91ea87af
Pipeline #155627 passed with stages
in 7 minutes and 51 seconds
......@@ -20,13 +20,15 @@
using namespace KPIMTextEdit;
TextToSpeechConfigWidget::TextToSpeechConfigWidget(QWidget *parent)
: QWidget(parent)
, mVolume(new QSlider(this))
, mRate(new QSlider(this))
, mPitch(new QSlider(this))
, mLanguage(new KPIMTextEdit::TextToSpeechLanguageComboBox(this))
, mAbstractTextToSpeechConfigInterface(new TextToSpeechConfigInterface(this))
, mAvailableEngine(new QComboBox(this))
, mVoice(new QComboBox(this))
{
auto layout = new QFormLayout(this);
mVolume = new QSlider(this);
mVolume->setObjectName(QStringLiteral("volume"));
mVolume->setRange(0, 100);
mVolume->setOrientation(Qt::Horizontal);
......@@ -35,7 +37,6 @@ TextToSpeechConfigWidget::TextToSpeechConfigWidget(QWidget *parent)
layout->addRow(i18n("Volume:"), mVolume);
mRate = new QSlider(this);
mRate->setTickPosition(QSlider::TicksBelow);
mRate->setObjectName(QStringLiteral("rate"));
mRate->setRange(-100, 100);
......@@ -43,7 +44,6 @@ TextToSpeechConfigWidget::TextToSpeechConfigWidget(QWidget *parent)
layout->addRow(i18n("Rate:"), mRate);
connect(mRate, &QSlider::valueChanged, this, &TextToSpeechConfigWidget::valueChanged);
mPitch = new QSlider(this);
mPitch->setRange(-100, 100);
mPitch->setTickPosition(QSlider::TicksBelow);
connect(mPitch, &QSlider::valueChanged, this, &TextToSpeechConfigWidget::valueChanged);
......
......@@ -40,9 +40,9 @@ private:
void updateAvailableLocales();
void updateAvailableEngine();
void updateAvailableVoices();
QSlider *mVolume = nullptr;
QSlider *mRate = nullptr;
QSlider *mPitch = nullptr;
QSlider *const mVolume;
QSlider *const mRate;
QSlider *const mPitch;
TextToSpeechLanguageComboBox *const mLanguage;
AbstractTextToSpeechConfigInterface *mAbstractTextToSpeechConfigInterface = nullptr;
QComboBox *const mAvailableEngine;
......
Supports Markdown
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