Commit bcc0353c authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Remove isDocked from device

It is never queried/set to anything, so it will always be false
parent 3da0e0f5
Pipeline #202335 passed with stage
in 3 minutes and 45 seconds
......@@ -31,7 +31,6 @@ Device::Device(QObject *parent)
, m_isReady(false)
, m_isLaptop(false)
, m_isLidClosed(false)
, m_isDocked(false)
{
m_freedesktop = new OrgFreedesktopDBusPropertiesInterface(QStringLiteral("org.freedesktop.UPower"),
QStringLiteral("/org/freedesktop/UPower"),
......@@ -100,11 +99,6 @@ bool Device::isLidClosed() const
return m_isLidClosed;
}
bool Device::isDocked() const
{
return m_isDocked;
}
void Device::fetchIsLaptop()
{
QDBusPendingReply<QVariant> res = m_freedesktop->Get(QStringLiteral("org.freedesktop.UPower"), QStringLiteral("LidIsPresent"));
......@@ -155,10 +149,5 @@ void Device::isLidClosedFetched(QDBusPendingCallWatcher *watcher)
}
watcher->deleteLater();
fetchIsDocked();
}
void Device::fetchIsDocked()
{
setReady();
}
......@@ -23,7 +23,6 @@ public:
bool isReady() const;
bool isLaptop() const;
bool isLidClosed() const;
bool isDocked() const;
private Q_SLOTS:
void changed();
......@@ -43,12 +42,10 @@ private:
void setReady();
void fetchIsLaptop();
void fetchLidIsClosed();
void fetchIsDocked();
bool m_isReady;
bool m_isLaptop;
bool m_isLidClosed;
bool m_isDocked;
static Device *m_instance;
......
......@@ -609,11 +609,7 @@ bool Generator::isLidClosed() const
bool Generator::isDocked() const
{
if (m_forceDocked) {
return true;
}
return Device::self()->isDocked();
return m_forceDocked;
}
void Generator::setForceLaptop(bool force)
......
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