Permalink
Browse files

Greeter: Fix build with lightdm-qt-1.0

  • Loading branch information...
1 parent 9645e50 commit 5caa5b6eec52d008180b8837973f9015b6df5245 @amoskvin amoskvin committed Jan 11, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 razorqt-lightdm-greeter/loginform.cpp
@@ -73,7 +73,13 @@ LoginForm::LoginForm(QWidget *parent) : QWidget(parent), ui(new Ui::LoginForm)
for (int row = 0; row < ui->sessionCombo->model()->rowCount(); row++)
{
QModelIndex index = ui->sessionCombo->model()->index(row, 0);
- if (QString("razor") == ui->sessionCombo->model()->data(index, QLightDM::SessionsModel::KeyRole).toString())
+ bool isRazorSession;
+#ifdef USING_LIGHTDM_QT_1
+ isRazorSession = (QString("razor") == ui->sessionCombo->model()->data(index, QLightDM::SessionsModel::IdRole).toString());
+#else
+ isRazorSession = (QString("razor") == ui->sessionCombo->model()->data(index, QLightDM::SessionsModel::KeyRole).toString());
+#endif
+ if (isRazorSession)
{
ui->sessionCombo->setCurrentIndex(row);
break;

0 comments on commit 5caa5b6

Please sign in to comment.