]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Fix Qt namespacing issue
authorRobert Ancell <robert.ancell@canonical.com>
Tue, 19 Jul 2011 07:13:30 +0000 (17:13 +1000)
committerRobert Ancell <robert.ancell@canonical.com>
Tue, 19 Jul 2011 07:13:30 +0000 (17:13 +1000)
greeters/qt/loginprompt.cpp
greeters/qt/panel.cpp
liblightdm-qt/power.cpp
liblightdm-qt/system.cpp

index 5a7f6251cd72af0159e6d71116803ebab7fb9d86..cc2bef17f06e467c3a07cb9e5a8363a533b62ced 100644 (file)
@@ -16,6 +16,7 @@
 #include <QLightDM/User>
 #include <QLightDM/Language>
 #include <QLightDM/UsersModel>
+#include <QLightDM/System>
 
 #include <QtCore/QDebug>
 #include <QtGui/QListWidgetItem>
@@ -28,7 +29,7 @@ LoginPrompt::LoginPrompt(QLightDM::Greeter *greeter, QWidget *parent) :
     ui->setupUi(this);
     ui->feedbackLabel->setText(QString());
     
-    ui->hostnameLabel->setText(m_greeter->hostname());
+    ui->hostnameLabel->setText(QLightDM::hostname());
     
     QLightDM::UsersModel *usersModel = new QLightDM::UsersModel(this);
     ui->userListView->setModel(usersModel);
index 94e886fdacee4e5c678ce265f4bd0fbd89163c94..50ffa7814af81eb5dc42e6b4f28bbbfc19d82bf1 100644 (file)
@@ -14,6 +14,7 @@
 
 #include <QLightDM/Greeter>
 #include <QLightDM/SessionsModel>
+#include <QLightDM/Power>
 
 #include <QMenu>
 #include <QAction>
@@ -33,22 +34,22 @@ Panel::Panel(QLightDM::Greeter *greeter, QWidget *parent):
 
     QAction *shutDownAction = new QAction(QIcon::fromTheme("system-shutdown"), "Shutdown", this);
     connect(shutDownAction, SIGNAL(triggered()), m_greeter, SLOT(shutdown()));
-    shutDownAction->setEnabled(m_greeter->canShutdown());
+    shutDownAction->setEnabled(QLightDM::canShutdown());
     powerMenu->addAction(shutDownAction);
 
     QAction *restartAction = new QAction(QIcon::fromTheme("system-reboot"), "Restart", this);
     connect(restartAction, SIGNAL(triggered()), m_greeter, SLOT(restart()));
-    restartAction->setEnabled(m_greeter->canRestart());
+    restartAction->setEnabled(QLightDM::canRestart());
     powerMenu->addAction(restartAction);
 
     QAction* suspendAction = new QAction(QIcon::fromTheme("system-suspend"), "Suspend", this);
     connect(suspendAction, SIGNAL(triggered()), m_greeter, SLOT(suspend()));
-    suspendAction->setEnabled(m_greeter->canSuspend());
+    suspendAction->setEnabled(QLightDM::canSuspend());
     powerMenu->addAction(suspendAction);
 
     QAction* hibernateAction = new QAction(QIcon::fromTheme("system-suspend-hibernate"), "Hibernate", this);
     connect(hibernateAction, SIGNAL(triggered()), m_greeter, SLOT(hibernate()));
-    hibernateAction->setEnabled(m_greeter->canHibernate());
+    hibernateAction->setEnabled(QLightDM::canHibernate());
     powerMenu->addAction(hibernateAction);
 
     ui->powerOptionsButton->setMenu(powerMenu);
index 1feafcbe819e5eb1840b2b74baf3a28f07fb072f..57f9fa38168813f3cc206d293396ef96d55ee5d8 100644 (file)
@@ -37,7 +37,7 @@ static bool setupConsoleKitInterface ()
     return consoleKitInterface != NULL;
 }
 
-bool canSuspend()
+bool QLightDM::canSuspend()
 {
     if (!setupPowerManagementInterface())
         return false;
@@ -49,13 +49,13 @@ bool canSuspend()
         return false;
 }
 
-void suspend()
+void QLightDM::suspend()
 {
     if (setupPowerManagementInterface())
         powerManagementInterface->call("Suspend");
 }
 
-bool canHibernate()
+bool QLightDM::canHibernate()
 {
     if (!setupPowerManagementInterface())
         return false;
@@ -67,13 +67,13 @@ bool canHibernate()
         return false;
 }
 
-void hibernate()
+void QLightDM::hibernate()
 {
     if (setupConsoleKitInterface())
         powerManagementInterface->call("Hibernate");
 }
 
-bool canShutdown()
+bool QLightDM::canShutdown()
 {
     if (!setupConsoleKitInterface())
         return false;
@@ -85,13 +85,13 @@ bool canShutdown()
         return false;
 }
 
-void shutdown()
+void QLightDM::shutdown()
 {
     if (setupConsoleKitInterface())
         consoleKitInterface->call("stop");
 }
 
-bool canRestart()
+bool QLightDM::canRestart()
 {
     if (!setupConsoleKitInterface())
         return false;
@@ -103,7 +103,7 @@ bool canRestart()
         return false;
 }
 
-void restart()
+void QLightDM::restart()
 {
     if (setupConsoleKitInterface())
         consoleKitInterface->call("Restart");
index b9acf883709d5ae761db6f0e1503a368489c5d11..8c11e6eb474d6860b3e18c9da85a5bd5bd517afe 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "QLightDM/System"
 
-QString hostname()
+QString QLightDM::hostname()
 {
     return QHostInfo::localHostName();
 }