summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liblightdm-qt/QLightDM/greeter.h5
-rw-r--r--liblightdm-qt/greeter.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/liblightdm-qt/QLightDM/greeter.h b/liblightdm-qt/QLightDM/greeter.h
index 7a1e00a9..a9d8bacf 100644
--- a/liblightdm-qt/QLightDM/greeter.h
+++ b/liblightdm-qt/QLightDM/greeter.h
@@ -26,7 +26,9 @@ class Q_DECL_EXPORT Greeter : public QObject
Q_OBJECT
Q_PROPERTY(bool authenticated READ isAuthenticated ); //NOTFIY authenticationComplete
-
+
+ Q_PROPERTY(QString hostname READ hostname);
+
public:
enum PromptType {
PromptTypeQuestion,
@@ -54,6 +56,7 @@ public:
bool inAuthentication() const;
bool isAuthenticated() const;
QString authenticationUser() const;
+ QString hostname() const;
public slots:
bool connectSync();
diff --git a/liblightdm-qt/greeter.cpp b/liblightdm-qt/greeter.cpp
index 8d6aaaff..6c43448b 100644
--- a/liblightdm-qt/greeter.cpp
+++ b/liblightdm-qt/greeter.cpp
@@ -217,4 +217,9 @@ int Greeter::autologinTimeoutHint() const
return lightdm_greeter_get_autologin_timeout_hint(d->ldmGreeter);
}
+QString Greeter::hostname() const
+{
+ return QString::fromLocal8Bit(lightdm_get_hostname());
+}
+
#include "greeter_moc.cpp"