diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2016-11-02 22:07:08 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2016-11-02 22:07:08 +1300 |
commit | 8d0b93ebaf3e412892b1227ac2bc765d3d7e3349 (patch) | |
tree | 635e85afc9d056269922f9ca0b1017a566997c92 /liblightdm-qt | |
parent | c414b626430ff0abe02c7f1ac4a1f964e860f868 (diff) | |
download | lightdm-git-8d0b93ebaf3e412892b1227ac2bc765d3d7e3349.tar.gz |
Add functions for getting contents of /etc/motd
Diffstat (limited to 'liblightdm-qt')
-rw-r--r-- | liblightdm-qt/QLightDM/greeter.h | 6 | ||||
-rw-r--r-- | liblightdm-qt/greeter.cpp | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/liblightdm-qt/QLightDM/greeter.h b/liblightdm-qt/QLightDM/greeter.h index b1605297..e063f9c8 100644 --- a/liblightdm-qt/QLightDM/greeter.h +++ b/liblightdm-qt/QLightDM/greeter.h @@ -35,7 +35,8 @@ class Q_DECL_EXPORT Greeter : public QObject Q_PROPERTY(QString osName READ osName CONSTANT) Q_PROPERTY(QString osPrettyName READ osPrettyName CONSTANT) Q_PROPERTY(QString osVersion READ osVersion CONSTANT) - Q_PROPERTY(QString osVersionId READ osVersionId CONSTANT) + Q_PROPERTY(QString osVersionId READ osVersionId CONSTANT) + Q_PROPERTY(QString motd READ motd CONSTANT) Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT) Q_PROPERTY(bool locked READ lockHint CONSTANT) @@ -78,7 +79,8 @@ public: QString osName() const; QString osPrettyName() const; QString osVersion() const; - QString osVersionId() const; + QString osVersionId() const; + QString motd() const; public Q_SLOTS: bool connectToDaemonSync(); diff --git a/liblightdm-qt/greeter.cpp b/liblightdm-qt/greeter.cpp index bd213a00..8e09d503 100644 --- a/liblightdm-qt/greeter.cpp +++ b/liblightdm-qt/greeter.cpp @@ -317,6 +317,11 @@ QString Greeter::osVersionId() const return QString::fromUtf8(lightdm_get_os_version_id()); } +QString Greeter::motd() const +{ + return QString::fromUtf8(lightdm_get_motd()); +} + #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) #include "greeter_moc5.cpp" #else |