*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation; either version 3 of the License, or (at your option) any
- * later version. See http://www.gnu.org/copyleft/lgpl.html the full text of the
- * license.
+ * Software Foundation; either version 2 or version 3 of the License.
+ * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
*/
#include "QLightDM/sessionsmodel.h"
{
public:
QString key;
+ QString type;
QString name;
QString comment;
};
SessionsModelPrivate::SessionsModelPrivate(SessionsModel *parent) :
q_ptr(parent)
{
+#if !defined(GLIB_VERSION_2_36)
g_type_init();
+#endif
}
void SessionsModelPrivate::loadSessions(SessionsModel::SessionType sessionType)
SessionItem session;
session.key = QString::fromUtf8(lightdm_session_get_key(ldmSession));
+ session.type = QString::fromUtf8(lightdm_session_get_session_type(ldmSession));
session.name = QString::fromUtf8(lightdm_session_get_name(ldmSession));
session.comment = QString::fromUtf8(lightdm_session_get_comment(ldmSession));
switch (role) {
case SessionsModel::KeyRole:
return d->items[row].key;
+ case SessionsModel::TypeRole:
+ return d->items[row].type;
case Qt::DisplayRole:
return d->items[row].name;
case Qt::ToolTipRole:
return QVariant();
}
-#include "sessionsmodel_moc.cpp"
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+#include "sessionsmodel_moc5.cpp"
+#else
+#include "sessionsmodel_moc4.cpp"
+#endif