~ubuntu-branches/ubuntu/trusty/unity8/trusty-proposed

« back to all changes in this revision

Viewing changes to tests/mocks/LightDM/demo/UsersModelPrivate.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Ted Gould, Michał Sawicz, Albert Astals, Andrea Cimitan, Michał Karnicki, Michael Terry
  • Date: 2014-02-07 10:46:46 UTC
  • mfrom: (1.1.66)
  • Revision ID: package-import@ubuntu.com-20140207104646-unm9znfrt2gf8rb3
Tags: 7.84+14.04.20140207.1-0ubuntu1
[ Ted Gould ]
* You can't tap anywhere

[ Michał Sawicz ]
* Wait for the indicator to appear.
* Add CardTool to determine category-wide card properties based on the
  category template. Clean up test configurations, too.
* Actions Preview Widget
* Add Preview for new generation scopes.
* Add overlay to card. Fix implicit card height. .

[ Albert Astals ]
* Basic ImageGallery widget for Previews Mostly a copy of the code
  used in AppPreview.qml but without the MouseArea hack that I'll wait
  to introduce until we start using this somewhere were it is needed
* Actions Preview Widget

[ Andrea Cimitan ]
* First audio player widget for previews, with tests
* Adds TextSummary preview widget

[ Michał Karnicki ]
* Add overlay to card. Fix implicit card height. .

[ Michael Terry ]
* Expand greeter demo support to include listing multiple users and
  specifying individual passwords and names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include "../UsersModelPrivate.h"
20
20
 
 
21
#include <QDir>
 
22
#include <QSettings>
 
23
#include <QStringList>
 
24
 
21
25
namespace QLightDM
22
26
{
23
27
 
24
28
UsersModelPrivate::UsersModelPrivate(UsersModel* parent)
25
29
  : q_ptr(parent)
26
30
{
27
 
    entries =
 
31
    QSettings settings(QDir::homePath() + "/.unity8-greeter-demo", QSettings::NativeFormat);
 
32
    QStringList users = settings.value("users", QStringList() << "phablet").toStringList();
 
33
 
 
34
    Q_FOREACH(const QString &user, users)
28
35
    {
29
 
        { "phablet", "Guest", 0, 0, false, false, 0, 0 },
30
 
    };
 
36
        QString name = settings.value(user + "/name", user[0].toUpper() + user.mid(1)).toString();
 
37
        entries.append({user, name, 0, 0, false, false, 0, 0});
 
38
    }
31
39
}
32
40
 
33
41
}