~mzanetti/unity8/fix-left-edge-on-spread

« back to all changes in this revision

Viewing changes to tests/mocks/AccountsService/AccountsService.cpp

  • Committer: Michael Zanetti
  • Date: 2015-01-12 11:21:17 UTC
  • mfrom: (1459.1.85 unity8)
  • Revision ID: michael.zanetti@canonical.com-20150112112117-0x9srs9dx0ndp60g
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
28
28
    m_statsWelcomeScreen(true),
29
29
    m_failedLogins(0),
30
 
    m_demoEdges(false)
 
30
    m_demoEdges(false),
 
31
    m_hereEnabled(false),
 
32
    m_hereLicensePath("")
31
33
{
32
34
}
33
35
 
116
118
    m_failedLogins = failedLogins;
117
119
    failedLoginsChanged();
118
120
}
 
121
 
 
122
bool AccountsService::hereEnabled() const
 
123
{
 
124
    return m_hereEnabled;
 
125
}
 
126
 
 
127
void AccountsService::setHereEnabled(bool enabled)
 
128
{
 
129
    m_hereEnabled = enabled;
 
130
    hereEnabledChanged();
 
131
}
 
132
 
 
133
QString AccountsService::hereLicensePath() const
 
134
{
 
135
    return m_hereLicensePath;
 
136
}
 
137
 
 
138
void AccountsService::setHereLicensePath(const QString &path)
 
139
{
 
140
    // Path should always be valid (this code is all synchronous)
 
141
    if (path == " ") {
 
142
        m_hereLicensePath = QString::null;
 
143
    } else if (path.isNull()) { // because qml collapses null and empty
 
144
        m_hereLicensePath = "";
 
145
    } else {
 
146
        m_hereLicensePath = path;
 
147
    }
 
148
    hereLicensePathChanged();
 
149
}
 
150
 
 
151
bool AccountsService::hereLicensePathValid() const
 
152
{
 
153
    return !m_hereLicensePath.isNull();
 
154
}