Changeset View
Changeset View
Standalone View
Standalone View
plasmate/plugins/savesystemview/git.cpp
Show All 32 Lines | |||||
33 | 33 | | |||
34 | #include <vcs/interfaces/ibasicversioncontrol.h> | 34 | #include <vcs/interfaces/ibasicversioncontrol.h> | ||
35 | #include <vcs/interfaces/ibranchingversioncontrol.h> | 35 | #include <vcs/interfaces/ibranchingversioncontrol.h> | ||
36 | #include <vcs/interfaces/idistributedversioncontrol.h> | 36 | #include <vcs/interfaces/idistributedversioncontrol.h> | ||
37 | #include <vcs/vcsjob.h> | 37 | #include <vcs/vcsjob.h> | ||
38 | #include <vcs/dvcs/dvcsjob.h> | 38 | #include <vcs/dvcs/dvcsjob.h> | ||
39 | #include <vcs/models/brancheslistmodel.h> | 39 | #include <vcs/models/brancheslistmodel.h> | ||
40 | #include <vcs/models/vcseventmodel.h> | 40 | #include <vcs/models/vcseventmodel.h> | ||
41 | #include <kdevplatform_version.h> | ||||
41 | 42 | | |||
42 | #include <KLocalizedString> | 43 | #include <KLocalizedString> | ||
43 | #include <KMessageBox> | 44 | #include <KMessageBox> | ||
44 | 45 | | |||
45 | #include <QAction> | 46 | #include <QAction> | ||
46 | #include <QMenu> | 47 | #include <QMenu> | ||
47 | #include <QDirIterator> | 48 | #include <QDirIterator> | ||
48 | #include <QDebug> | 49 | #include <QDebug> | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 81 | { | |||
103 | if (!m_dvcs || !m_branching || !basicVersionControl) { | 104 | if (!m_dvcs || !m_branching || !basicVersionControl) { | ||
104 | // something went wrong | 105 | // something went wrong | ||
105 | return false; | 106 | return false; | ||
106 | } | 107 | } | ||
107 | 108 | | |||
108 | m_branchesModel->initialize(m_branching, m_repositoryPath); | 109 | m_branchesModel->initialize(m_branching, m_repositoryPath); | ||
109 | 110 | | |||
110 | KDevelop::VcsRevision rev = KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Base); | 111 | KDevelop::VcsRevision rev = KDevelop::VcsRevision::createSpecialRevision(KDevelop::VcsRevision::Base); | ||
112 | #if KDEVPLATFORM_VERSION >= QT_VERSION_CHECK(5, 1, 40) | ||||
113 | KDevelop::VcsEventLogModel *vcsEventModel = new KDevelop::VcsEventLogModel(basicVersionControl, rev, m_repositoryPath, this); | ||||
114 | #else | ||||
111 | KDevelop::VcsEventModel *vcsEventModel = new KDevelop::VcsEventModel(basicVersionControl, rev, m_repositoryPath, this); | 115 | KDevelop::VcsEventModel *vcsEventModel = new KDevelop::VcsEventModel(basicVersionControl, rev, m_repositoryPath, this); | ||
116 | #endif | ||||
112 | m_commitsModel->setSourceModel(vcsEventModel); | 117 | m_commitsModel->setSourceModel(vcsEventModel); | ||
113 | 118 | | |||
114 | return true; | 119 | return true; | ||
115 | } | 120 | } | ||
116 | 121 | | |||
117 | bool Git::isRepository() | 122 | bool Git::isRepository() | ||
118 | { | 123 | { | ||
119 | bool ok = m_dvcs->isVersionControlled(m_repositoryPath); | 124 | bool ok = m_dvcs->isVersionControlled(m_repositoryPath); | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |