forked from qt-creator/qt-creator
vcs: s/VCS/Vcs/
According to style guide. Change-Id: I05c1d4f50ddbf2876ab7e0835f4abec95fd573b2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
This commit is contained in:
@@ -50,9 +50,9 @@ namespace Internal {
|
||||
#define CVS_REVISION_PATTERN "[\\d\\.]+"
|
||||
#define CVS_REVISION_AT_START_PATTERN "^(" CVS_REVISION_PATTERN ") "
|
||||
|
||||
CVSEditor::CVSEditor(const VCSBase::VCSBaseEditorParameters *type,
|
||||
CVSEditor::CVSEditor(const VcsBase::VcsBaseEditorParameters *type,
|
||||
QWidget *parent) :
|
||||
VCSBase::VCSBaseEditorWidget(type, parent),
|
||||
VcsBase::VcsBaseEditorWidget(type, parent),
|
||||
m_revisionAnnotationPattern(QLatin1String(CVS_REVISION_AT_START_PATTERN".*$")),
|
||||
m_revisionLogPattern(QLatin1String("^revision *(" CVS_REVISION_PATTERN ")$"))
|
||||
{
|
||||
@@ -94,10 +94,10 @@ QString CVSEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
// Check if we are at the beginning of a line within a reasonable offset.
|
||||
// 2) Log: check for lines like "revision 1.1", cursor past "revision"
|
||||
switch (contentType()) {
|
||||
case VCSBase::RegularCommandOutput:
|
||||
case VCSBase::DiffOutput:
|
||||
case VcsBase::RegularCommandOutput:
|
||||
case VcsBase::DiffOutput:
|
||||
break;
|
||||
case VCSBase::AnnotateOutput: {
|
||||
case VcsBase::AnnotateOutput: {
|
||||
const QTextBlock block = c.block();
|
||||
if (c.atBlockStart() || (c.position() - block.position() < 3)) {
|
||||
const QString line = block.text();
|
||||
@@ -106,7 +106,7 @@ QString CVSEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
}
|
||||
}
|
||||
break;
|
||||
case VCSBase::LogOutput: {
|
||||
case VcsBase::LogOutput: {
|
||||
const QTextBlock block = c.block();
|
||||
if (c.position() - block.position() > 8 && m_revisionLogPattern.exactMatch(block.text()))
|
||||
return m_revisionLogPattern.cap(1);
|
||||
@@ -124,14 +124,14 @@ cvs diff -d -u -r1.1 -r1.2:
|
||||
\endcode
|
||||
*/
|
||||
|
||||
VCSBase::DiffHighlighter *CVSEditor::createDiffHighlighter() const
|
||||
VcsBase::DiffHighlighter *CVSEditor::createDiffHighlighter() const
|
||||
{
|
||||
const QRegExp filePattern(QLatin1String("^[-+][-+][-+] .*1\\.[\\d\\.]+$"));
|
||||
QTC_CHECK(filePattern.isValid());
|
||||
return new VCSBase::DiffHighlighter(filePattern);
|
||||
return new VcsBase::DiffHighlighter(filePattern);
|
||||
}
|
||||
|
||||
VCSBase::BaseAnnotationHighlighter *CVSEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *CVSEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new CVSAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user