Commit 983f8609 authored by Méven Car's avatar Méven Car
Browse files

A few code cleanups

parent fb9b2afe
......@@ -48,17 +48,17 @@ protected:
public:
bool loadAction(const KConfigGroup& config) override;
int brightness() const;
int brightnessMax() const;
int brightnessSteps() const;
public Q_SLOTS:
// DBus export
void increaseBrightness();
void decreaseBrightness();
int brightness() const;
int brightnessMax() const;
void setBrightness(int percent);
void setBrightnessSilent(int percent);
int brightnessSteps() const;
private Q_SLOTS:
void onBrightnessChangedFromBackend(const BrightnessLogic::BrightnessInfo &brightnessInfo, BackendInterface::BrightnessControlType type);
......
......@@ -48,6 +48,10 @@ protected:
public:
bool loadAction(const KConfigGroup& config) override;
int keyboardBrightness() const;
int keyboardBrightnessMax() const;
int keyboardBrightnessSteps() const;
public Q_SLOTS:
void onBrightnessChangedFromBackend(const BrightnessLogic::BrightnessInfo &brightnessInfo, BackendInterface::BrightnessControlType type);
......@@ -56,13 +60,9 @@ public Q_SLOTS:
void decreaseKeyboardBrightness();
void toggleKeyboardBacklight();
int keyboardBrightness() const;
int keyboardBrightnessMax() const;
void setKeyboardBrightness(int value);
void setKeyboardBrightnessSilent(int value);
int keyboardBrightnessSteps() const;
Q_SIGNALS:
void keyboardBrightnessChanged(int value);
void keyboardBrightnessMaxChanged(int valueMax);
......
......@@ -92,11 +92,11 @@ private:
// upower devices
QMap<QString, OrgFreedesktopUPowerDeviceInterface *> m_devices;
OrgFreedesktopUPowerDeviceInterface *m_displayDevice;
OrgFreedesktopUPowerDeviceInterface *m_displayDevice = nullptr;
// brightness
QMap<BrightnessControlType, int> m_cachedBrightnessMap;
DDCutilBrightness *m_ddcBrightnessControl;
DDCutilBrightness *m_ddcBrightnessControl = nullptr;
OrgFreedesktopUPowerInterface *m_upowerInterface;
OrgFreedesktopUPowerKbdBacklightInterface *m_kbdBacklight;
......
......@@ -56,7 +56,7 @@ K_PLUGIN_FACTORY(PowerDevilProfilesKCMFactory,
)
EditPage::EditPage(QWidget *parent, const QVariantList &args)
: KCModule(nullptr, parent, args)
: KCModule(parent, args)
{
setButtons(Apply | Help | Default);
......@@ -85,7 +85,7 @@ EditPage::EditPage(QWidget *parent, const QVariantList &args)
m_profilesConfig->reparseConfiguration();
}
qCDebug(POWERDEVIL) << m_profilesConfig.data()->groupList() << m_profilesConfig.data()->entryMap().keys();
qCDebug(POWERDEVIL) << "loaded profiles" << m_profilesConfig.data()->groupList() << m_profilesConfig.data()->entryMap().keys();
// Create widgets for each profile
ActionEditWidget *editWidget = new ActionEditWidget("AC", tabWidget);
......
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