mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
LP-419 config: improve const correcteness of saveState() methods
This commit is contained in:
parent
548a881003
commit
ffc48dab65
@ -45,7 +45,7 @@ void ConfigGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
||||
Q_UNUSED(config);
|
||||
}
|
||||
|
||||
void ConfigGadget::saveState(QSettings &settings)
|
||||
void ConfigGadget::saveState(QSettings &settings) const
|
||||
{
|
||||
m_widget->saveState(settings);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
|
||||
void loadConfiguration(IUAVGadgetConfiguration *config);
|
||||
|
||||
void saveState(QSettings &settings);
|
||||
void saveState(QSettings &settings) const;
|
||||
void restoreState(QSettings &settings);
|
||||
|
||||
private:
|
||||
|
@ -173,7 +173,7 @@ void ConfigGadgetWidget::startInputWizard()
|
||||
inputWidget->startInputWizard();
|
||||
}
|
||||
|
||||
void ConfigGadgetWidget::saveState(QSettings &settings)
|
||||
void ConfigGadgetWidget::saveState(QSettings &settings) const
|
||||
{
|
||||
settings.setValue("currentIndex", stackWidget->currentIndex());
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
|
||||
void startInputWizard();
|
||||
|
||||
void saveState(QSettings &settings);
|
||||
void saveState(QSettings &settings) const;
|
||||
void restoreState(QSettings &settings);
|
||||
|
||||
protected:
|
||||
|
@ -261,7 +261,7 @@ void UAVGadgetView::currentGadgetChanged(IUAVGadget *gadget)
|
||||
m_activeLabel->setVisible(m_uavGadget == gadget);
|
||||
}
|
||||
|
||||
void UAVGadgetView::saveState(QSettings &settings)
|
||||
void UAVGadgetView::saveState(QSettings &settings) const
|
||||
{
|
||||
settings.setValue("type", "uavGadget");
|
||||
settings.setValue("classId", gadget()->classId());
|
||||
|
@ -65,7 +65,7 @@ public:
|
||||
|
||||
void showToolbar(bool show);
|
||||
|
||||
void saveState(QSettings &settings);
|
||||
void saveState(QSettings &settings) const;
|
||||
void restoreState(QSettings &settings);
|
||||
|
||||
public slots:
|
||||
|
@ -310,7 +310,7 @@ void PfdQmlContext::loadConfiguration(PfdQmlGadgetConfiguration *config)
|
||||
}
|
||||
|
||||
|
||||
void PfdQmlContext::saveState(QSettings &settings)
|
||||
void PfdQmlContext::saveState(QSettings &settings) const
|
||||
{
|
||||
settings.setValue("modelFile", modelFile());
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
Q_INVOKABLE void resetConsumedEnergy();
|
||||
|
||||
void loadConfiguration(PfdQmlGadgetConfiguration *config);
|
||||
void saveState(QSettings &);
|
||||
void saveState(QSettings &) const;
|
||||
void restoreState(QSettings &);
|
||||
|
||||
void apply(QQmlContext *context);
|
||||
|
@ -52,7 +52,7 @@ void PfdQmlGadget::loadConfiguration(IUAVGadgetConfiguration *config)
|
||||
m_qmlGadgetWidget->loadConfiguration(m);
|
||||
}
|
||||
|
||||
void PfdQmlGadget::saveState(QSettings &settings)
|
||||
void PfdQmlGadget::saveState(QSettings &settings) const
|
||||
{
|
||||
m_qmlGadgetWidget->saveState(settings);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
QWidget *widget();
|
||||
|
||||
void loadConfiguration(IUAVGadgetConfiguration *config);
|
||||
void saveState(QSettings &);
|
||||
void saveState(QSettings &) const;
|
||||
void restoreState(QSettings &);
|
||||
|
||||
private:
|
||||
|
@ -93,7 +93,7 @@ void PfdQmlGadgetWidget::loadConfiguration(PfdQmlGadgetConfiguration *config)
|
||||
setQmlFile(config->qmlFile());
|
||||
}
|
||||
|
||||
void PfdQmlGadgetWidget::saveState(QSettings &settings)
|
||||
void PfdQmlGadgetWidget::saveState(QSettings &settings) const
|
||||
{
|
||||
m_pfdQmlContext->saveState(settings);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
virtual ~PfdQmlGadgetWidget();
|
||||
|
||||
void loadConfiguration(PfdQmlGadgetConfiguration *config);
|
||||
void saveState(QSettings &);
|
||||
void saveState(QSettings &) const;
|
||||
void restoreState(QSettings &);
|
||||
|
||||
private:
|
||||
|
@ -99,7 +99,7 @@ ScopeGadget::~ScopeGadget()
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
void ScopeGadget::saveState(QSettings &settings)
|
||||
void ScopeGadget::saveState(QSettings &settings) const
|
||||
{
|
||||
m_widget->saveState(settings);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
return QString();
|
||||
}
|
||||
|
||||
void saveState(QSettings &settings);
|
||||
void saveState(QSettings &settings) const;
|
||||
void restoreState(QSettings &settings);
|
||||
|
||||
private:
|
||||
|
@ -457,7 +457,7 @@ void ScopeGadgetWidget::clearCurvePlots()
|
||||
m_curvesData.clear();
|
||||
}
|
||||
|
||||
void ScopeGadgetWidget::saveState(QSettings &settings)
|
||||
void ScopeGadgetWidget::saveState(QSettings &settings) const
|
||||
{
|
||||
// plot state
|
||||
int i = 1;
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
QString mathFunction = "None", QPen pen = QPen(Qt::black), bool antialiased = true);
|
||||
void clearCurvePlots();
|
||||
|
||||
void saveState(QSettings &settings);
|
||||
void saveState(QSettings &settings) const;
|
||||
void restoreState(QSettings &settings);
|
||||
|
||||
int csvLoggingStart();
|
||||
|
Loading…
x
Reference in New Issue
Block a user