1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#include "cvskeeper.h"
6
7#include "git/gitqlientwidget.h"
8#include "svn/svnclientwidget.h"
9
10CVSkeeper::CVSkeeper(QObject *parent)
11 : QObject(parent)
12 , svnReposWidget(new SvnClientWidget)
13 , gitReposWidget(new GitQlientWidget)
14{
15
16}
17
18CVSkeeper *CVSkeeper::instance(){
19 static CVSkeeper ins;
20 return &ins;
21}
22
23void CVSkeeper::openRepos(const QString &repoPath)
24{
25 if (svnReposWidget->isSvnDir(repoPath))
26 svnReposWidget->addNewRepoTab(repoPath);
27}
28
29SvnClientWidget *CVSkeeper::svnMainWidget()
30{
31 return svnReposWidget;
32}
33
34GitQlientWidget *CVSkeeper::gitMainWidget()
35{
36 return gitReposWidget;
37}
38