Changeset View
Changeset View
Standalone View
Standalone View
src/jobs/createaccount.cpp
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | 170 | { | |||
---|---|---|---|---|---|
176 | 176 | | |||
177 | if (!m_done) { | 177 | if (!m_done) { | ||
178 | return; | 178 | return; | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | m_account->selectService(); | 181 | m_account->selectService(); | ||
182 | 182 | | |||
183 | if (m_account->displayName().isEmpty()) { | 183 | if (m_account->displayName().isEmpty()) { | ||
184 | if(info.userName().isEmpty()) { | ||||
185 | // info.userName() can be empty, see bug#414219 | ||||
186 | m_account->setDisplayName(QString("%1%2").arg(info.caption()).arg(info.id())); | ||||
187 | } else { | ||||
184 | m_account->setDisplayName(info.userName()); | 188 | m_account->setDisplayName(info.userName()); | ||
185 | } | 189 | } | ||
190 | } | ||||
186 | m_account->setValue("username", info.userName()); | 191 | m_account->setValue("username", info.userName()); | ||
187 | m_account->setCredentialsId(info.id()); | 192 | m_account->setCredentialsId(info.id()); | ||
188 | 193 | | |||
189 | Accounts::AuthData authData = m_accInfo->authData(); | 194 | Accounts::AuthData authData = m_accInfo->authData(); | ||
190 | m_account->setValue("auth/mechanism", authData.mechanism()); | 195 | m_account->setValue("auth/mechanism", authData.mechanism()); | ||
191 | m_account->setValue("auth/method", authData.method()); | 196 | m_account->setValue("auth/method", authData.method()); | ||
192 | 197 | | |||
193 | QString base("auth/"); | 198 | QString base("auth/"); | ||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |