/*! Returns the identifier of the account to which this configuration pertains. */ QMailAccountId QMailAccountConfiguration::ServiceConfiguration::id() const { if (d->_parent) return d->_parent->_id; return QMailAccountId(); }
void QMFStorePrivate::createNonexistentFolder(QMailStore *store, const QString &path, quint64 status) { QMailFolderKey pathKey(QMailFolderKey::path(path)); QMailFolderKey accountKey(QMailFolderKey::parentAccountId(QMailAccountId())); if (store->countFolders(pathKey & accountKey) == 0) { QMailFolder folder; folder.setPath(path); folder.setStatus(status); if (!store->addFolder(&folder)) { qWarning() << "Unable to add folder for:" << path; } } }
FolderListModel::FolderListModel(QObject *parent) : QAbstractListModel(parent) , m_currentFolderIdx(-1) , m_currentFolderUnreadCount(0) , m_currentFolderType(NormalFolder) , m_accountId(QMailAccountId()) { roles.insert(FolderName, "folderName"); roles.insert(FolderId, "folderId"); roles.insert(FolderUnreadCount, "folderUnreadCount"); roles.insert(FolderServerCount, "folderServerCount"); roles.insert(FolderNestingLevel, "folderNestingLevel"); roles.insert(FolderMessageKey, "folderMessageKey"); roles.insert(FolderType, "folderType"); connect(QMailStore::instance(), SIGNAL(foldersAdded(const QMailFolderIdList &)), this, SLOT(onFoldersChanged(const QMailFolderIdList &))); connect(QMailStore::instance(), SIGNAL(foldersRemoved(const QMailFolderIdList &)), this, SLOT(onFoldersChanged(const QMailFolderIdList &))); connect(QMailStore::instance(), SIGNAL(folderContentsModified(const QMailFolderIdList&)), this, SLOT(updateUnreadCount(const QMailFolderIdList&))); }
QMailAccountId convert(const QMessageAccountId &id) { return QMailAccountId(stripIdentifierPrefix(id.toString()).toULongLong()); }
void AccountAdapter::printAccountServiceConfig(quint64 id, const QString &service){ QMailAccountConfiguration config = QMailStore::instance()->accountConfiguration(QMailAccountId(id)); QMailAccountConfiguration::ServiceConfiguration serviceConfig = config.serviceConfiguration(service); qDebug() << "AccountServiceConfiguration for, id:" << id << ", service:" << service << "\n" << serviceConfig.values(); }
void AccountAdapter::printAccountConfig(quint64 id){ QMailAccountConfiguration config = QMailStore::instance()->accountConfiguration(QMailAccountId(id)); qDebug() << "AccountConfiguration for, id:" << id << ", services:" << config.services(); }
void AccountAdapter::printAccountCustomFields(quint64 id){ QMailAccount account = QMailStore::instance()->account(QMailAccountId(id)); qDebug() << "Custom fields for account with id:" << id << ", name:" << account.name() << "\n" << account.customFields(); }