File indexing completed on 2025-01-05 05:14:39

0001 /*
0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com>
0003 
0004 SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006 
0007 #include "repositorydata.h"
0008 
0009 #include <models/authorsmodel.h>
0010 #include <models/branchesmodel.h>
0011 #include <models/logsmodel.h>
0012 #include <models/remotesmodel.h>
0013 #include <models/stashesmodel.h>
0014 #include <models/submodulesmodel.h>
0015 #include <models/tagsmodel.h>
0016 
0017 #include <gitmanager.h>
0018 
0019 RepositoryData::RepositoryData(QObject *parent)
0020     : QObject{parent}
0021     , mManager{new Git::Manager}
0022     , mRemotesModel{new Git::RemotesModel{mManager, this}}
0023     , mAuthorsModel{new Git::AuthorsModel{mManager, this}}
0024     , mSubmodulesModel{new Git::SubmodulesModel{mManager, this}}
0025     , mBranchesModel{new Git::BranchesModel{mManager, this}}
0026     , mLogsCache{new Git::LogsModel{mManager, mAuthorsModel, this}}
0027     , mStashesCache{new Git::StashesModel{mManager, this}}
0028     , mTagsModel{new Git::TagsModel{mManager, this}}
0029 {
0030 }
0031 
0032 void RepositoryData::loadAll()
0033 {
0034     mRemotesModel->load();
0035     mAuthorsModel->load();
0036     mSubmodulesModel->load();
0037     mBranchesModel->load();
0038     mLogsCache->load();
0039     mStashesCache->load();
0040     mTagsModel->load();
0041 }