Commit d5a08db0 authored by Frederik Gladhorn's avatar Frederik Gladhorn

Simple cleanup

parent 01297182
......@@ -39,11 +39,6 @@ static bool sizeLessThan(const QSize &sizeA, const QSize &sizeB)
ResolutionSlider::ResolutionSlider(const KScreen::OutputPtr &output, QWidget *parent)
: QWidget(parent)
, mOutput(output)
, mSmallestLabel(nullptr)
, mBiggestLabel(nullptr)
, mCurrentLabel(nullptr)
, mSlider(nullptr)
, mComboBox(nullptr)
{
connect(output.data(), &KScreen::Output::currentModeIdChanged,
this, &ResolutionSlider::slotOutputModeChanged);
......
......@@ -37,7 +37,7 @@ class ResolutionSlider : public QWidget
public:
explicit ResolutionSlider(const KScreen::OutputPtr &output, QWidget *parent = nullptr);
virtual ~ResolutionSlider();
~ResolutionSlider() override;
QSize currentResolution() const;
......
......@@ -70,12 +70,12 @@ void ScalingConfig::load()
void ScalingConfig::accept()
{
if (scaleFactor() == m_initialScalingFactor) {
if (qFuzzyCompare(scaleFactor(), m_initialScalingFactor)) {
QDialog::accept();
return;
}
const qreal scalingFactor = scaleFactor();
//save to config
auto config = KSharedConfig::openConfig(QStringLiteral("kdeglobals"));
config->group("KScreen").writeEntry("ScaleFactor", scalingFactor);
......@@ -90,8 +90,8 @@ void ScalingConfig::accept()
}
config->group("KScreen").writeEntry("ScreenScaleFactors", screenFactors);
KConfig fontConfig("kcmfonts");
KConfig fontConfig(QStringLiteral("kcmfonts"));
auto fontConfigGroup = fontConfig.group("General");
if (qFuzzyCompare(scalingFactor, 1.0)) {
......
......@@ -31,7 +31,7 @@ class ScalingConfig : public QDialog
Q_OBJECT
public:
explicit ScalingConfig(const KScreen::OutputList &outputList, QWidget* parent = 0);
virtual ~ScalingConfig();
~ScalingConfig() override;
protected:
void accept() Q_DECL_OVERRIDE;
......
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