* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "coreaccountmodel.h"
***************************************************************************/
#include "coreaccountmodel.h"
-CoreAccountModel::CoreAccountModel(QObject *parent)
- : QAbstractListModel(parent),
- _internalAccount(0)
-{
-}
-
+CoreAccountModel::CoreAccountModel(QObject* parent)
+ : QAbstractListModel(parent)
+ , _internalAccount(0)
+{}
-CoreAccountModel::CoreAccountModel(const CoreAccountModel *other, QObject *parent)
- : QAbstractListModel(parent),
- _internalAccount(0)
+CoreAccountModel::CoreAccountModel(const CoreAccountModel* other, QObject* parent)
+ : QAbstractListModel(parent)
+ , _internalAccount(0)
- foreach(const CoreAccount &acc, accounts()) {
- QVariantMap map = acc.toVariantMap(false); // TODO Hook into kwallet/password saving stuff
+ foreach (const CoreAccount& acc, accounts()) {
+ QVariantMap map = acc.toVariantMap(false); // TODO Hook into kwallet/password saving stuff
- foreach(const CoreAccount &acc, accounts())
- list << acc.accountId();
+ foreach (const CoreAccount& acc, accounts())
+ list << acc.accountId();
QModelIndex CoreAccountModel::accountIndex(AccountId accId) const
{
for (int i = 0; i < _accounts.count(); i++) {
if (_accounts.at(i).accountId() == accId)
return index(i, 0);
}
QModelIndex CoreAccountModel::accountIndex(AccountId accId) const
{
for (int i = 0; i < _accounts.count(); i++) {
if (_accounts.at(i).accountId() == accId)
return index(i, 0);
}