forked from qt-creator/qt-creator
Vcs*: Rename several *Editors to *EditorWidgets
Follow suit. Change-Id: If22452a5e46d62d419ba273981b1f247f5095b53 Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
using namespace Bazaar::Internal;
|
||||
using namespace Bazaar;
|
||||
|
||||
BazaarEditor::BazaarEditor() :
|
||||
BazaarEditorWidget::BazaarEditorWidget() :
|
||||
m_changesetId(QLatin1String(Constants::CHANGESET_ID)),
|
||||
m_exactChangesetId(QLatin1String(Constants::CHANGESET_ID_EXACT))
|
||||
{
|
||||
@@ -53,7 +53,7 @@ BazaarEditor::BazaarEditor() :
|
||||
setLogEntryPattern(QRegExp(QLatin1String("^revno: (\\d+)")));
|
||||
}
|
||||
|
||||
QSet<QString> BazaarEditor::annotationChanges() const
|
||||
QSet<QString> BazaarEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
const QString txt = toPlainText();
|
||||
@@ -75,7 +75,7 @@ QSet<QString> BazaarEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString BazaarEditor::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
QString BazaarEditorWidget::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
{
|
||||
// The test is done in two steps: first we check if the line contains a
|
||||
// changesetId. Then we check if the cursor is over the changesetId itself
|
||||
@@ -105,7 +105,7 @@ QString BazaarEditor::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *BazaarEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *BazaarEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new BazaarAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
@@ -36,12 +36,12 @@
|
||||
namespace Bazaar {
|
||||
namespace Internal {
|
||||
|
||||
class BazaarEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class BazaarEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BazaarEditor();
|
||||
BazaarEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -177,7 +177,7 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag
|
||||
|
||||
static const char *describeSlot = SLOT(view(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters) / sizeof(VcsBaseEditorParameters);
|
||||
const auto widgetCreator = []() { return new BazaarEditor; };
|
||||
const auto widgetCreator = []() { return new BazaarEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, m_client, describeSlot));
|
||||
|
||||
@@ -656,7 +656,7 @@ void BazaarPlugin::testDiffFileResolving_data()
|
||||
|
||||
void BazaarPlugin::testDiffFileResolving()
|
||||
{
|
||||
BazaarEditor editor;
|
||||
BazaarEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 2);
|
||||
editor.testDiffFileResolving();
|
||||
}
|
||||
@@ -681,7 +681,7 @@ void BazaarPlugin::testLogResolving()
|
||||
" (gz) Set approved revision and vote \"Approve\" when using lp-propose\n"
|
||||
" --approve (Jonathan Lange)\n"
|
||||
);
|
||||
BazaarEditor editor;
|
||||
BazaarEditorWidget editor;
|
||||
editor.setParameters(editorParameters);
|
||||
editor.testLogResolving(data, "6572", "6571");
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Internal {
|
||||
class OptionsPage;
|
||||
class BazaarClient;
|
||||
class BazaarControl;
|
||||
class BazaarEditor;
|
||||
class BazaarEditorWidget;
|
||||
|
||||
class BazaarPlugin : public VcsBase::VcsBasePlugin
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
using namespace ClearCase;
|
||||
using namespace ClearCase::Internal;
|
||||
|
||||
ClearCaseEditor::ClearCaseEditor() :
|
||||
ClearCaseEditorWidget::ClearCaseEditorWidget() :
|
||||
m_versionNumberPattern(QLatin1String("[\\\\/]main[\\\\/][^ \t\n\"]*"))
|
||||
{
|
||||
QTC_ASSERT(m_versionNumberPattern.isValid(), return);
|
||||
@@ -58,7 +58,7 @@ ClearCaseEditor::ClearCaseEditor() :
|
||||
setAnnotateRevisionTextFormat(tr("Annotate version \"%1\""));
|
||||
}
|
||||
|
||||
QSet<QString> ClearCaseEditor::annotationChanges() const
|
||||
QSet<QString> ClearCaseEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
QString txt = toPlainText();
|
||||
@@ -76,7 +76,7 @@ QSet<QString> ClearCaseEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString ClearCaseEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
QString ClearCaseEditorWidget::changeUnderCursor(const QTextCursor &c) const
|
||||
{
|
||||
QTextCursor cursor = c;
|
||||
// Any number is regarded as change number.
|
||||
@@ -91,7 +91,7 @@ QString ClearCaseEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *ClearCaseEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *ClearCaseEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new ClearCaseAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
namespace ClearCase {
|
||||
namespace Internal {
|
||||
|
||||
class ClearCaseEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class ClearCaseEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ClearCaseEditor();
|
||||
ClearCaseEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -465,7 +465,7 @@ bool ClearCasePlugin::initialize(const QStringList & /*arguments */, QString *er
|
||||
// any editor responds to describe (when clicking a version)
|
||||
static const char *describeSlot = SLOT(describe(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters)/sizeof(VcsBase::VcsBaseEditorParameters);
|
||||
const auto widgetCreator = []() { return new ClearCaseEditor; };
|
||||
const auto widgetCreator = []() { return new ClearCaseEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsBase::VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlot));
|
||||
|
||||
@@ -1064,7 +1064,7 @@ void ClearCasePlugin::ccDiffWithPred(const QString &workingDir, const QStringLis
|
||||
IEditor *editor = showOutputInEditor(title, result, VcsBase::DiffOutput, source, codec);
|
||||
setWorkingDirectory(editor, workingDir);
|
||||
VcsBase::VcsBaseEditorWidget::tagEditor(editor, tag);
|
||||
ClearCaseEditor *diffEditorWidget = qobject_cast<ClearCaseEditor *>(editor->widget());
|
||||
ClearCaseEditorWidget *diffEditorWidget = qobject_cast<ClearCaseEditorWidget *>(editor->widget());
|
||||
QTC_ASSERT(diffEditorWidget, return);
|
||||
if (files.count() == 1)
|
||||
editor->setProperty("originalFileName", diffname);
|
||||
@@ -1527,7 +1527,7 @@ IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const QString
|
||||
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(annotateVersion(QString,QString,QString,int)));
|
||||
ClearCaseEditor *e = qobject_cast<ClearCaseEditor*>(editor->widget());
|
||||
ClearCaseEditorWidget *e = qobject_cast<ClearCaseEditorWidget*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
e->setForceReadOnly(true);
|
||||
@@ -2230,7 +2230,7 @@ void ClearCasePlugin::testDiffFileResolving_data()
|
||||
|
||||
void ClearCasePlugin::testDiffFileResolving()
|
||||
{
|
||||
ClearCaseEditor editor;
|
||||
ClearCaseEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 2);
|
||||
editor.testDiffFileResolving();
|
||||
}
|
||||
@@ -2241,7 +2241,7 @@ void ClearCasePlugin::testLogResolving()
|
||||
"13-Sep.17:41 user1 create version \"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/9\" (baseline1, baseline2, ...)\n"
|
||||
"22-Aug.14:13 user2 create version \"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/8\" (baseline3, baseline4, ...)\n"
|
||||
);
|
||||
ClearCaseEditor editor;
|
||||
ClearCaseEditorWidget editor;
|
||||
editor.setParameters(editorParameters);
|
||||
editor.testLogResolving(data,
|
||||
"src/plugins/clearcase/clearcaseeditor.h@@/main/branch1/branch2/9",
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Internal {
|
||||
#define CVS_REVISION_PATTERN "[\\d\\.]+"
|
||||
#define CVS_REVISION_AT_START_PATTERN "^(" CVS_REVISION_PATTERN ") "
|
||||
|
||||
CvsEditor::CvsEditor() :
|
||||
CvsEditorWidget::CvsEditorWidget() :
|
||||
m_revisionAnnotationPattern(QLatin1String(CVS_REVISION_AT_START_PATTERN ".*$")),
|
||||
m_revisionLogPattern(QLatin1String("^revision *(" CVS_REVISION_PATTERN ")$"))
|
||||
{
|
||||
@@ -66,7 +66,7 @@ CvsEditor::CvsEditor() :
|
||||
setAnnotateRevisionTextFormat(tr("Annotate revision \"%1\""));
|
||||
}
|
||||
|
||||
QSet<QString> CvsEditor::annotationChanges() const
|
||||
QSet<QString> CvsEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
const QString txt = toPlainText();
|
||||
@@ -90,7 +90,7 @@ QSet<QString> CvsEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString CvsEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
QString CvsEditorWidget::changeUnderCursor(const QTextCursor &c) const
|
||||
{
|
||||
// Try to match "1.1" strictly:
|
||||
// 1) Annotation: Check for a revision number at the beginning of the line.
|
||||
@@ -121,12 +121,12 @@ QString CvsEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *CvsEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *CvsEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new CvsAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
QStringList CvsEditor::annotationPreviousVersions(const QString &revision) const
|
||||
QStringList CvsEditorWidget::annotationPreviousVersions(const QString &revision) const
|
||||
{
|
||||
if (isFirstRevision(revision))
|
||||
return QStringList();
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
namespace Cvs {
|
||||
namespace Internal {
|
||||
|
||||
class CvsEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class CvsEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CvsEditor();
|
||||
CvsEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -253,7 +253,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
static const char *describeSlotC = SLOT(slotDescribe(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]);
|
||||
const auto widgetCreator = []() { return new CvsEditor; };
|
||||
const auto widgetCreator = []() { return new CvsEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlotC));
|
||||
|
||||
@@ -1191,7 +1191,7 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp
|
||||
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
|
||||
CvsEditor *e = qobject_cast<CvsEditor*>(editor->widget());
|
||||
CvsEditorWidget *e = qobject_cast<CvsEditorWidget*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
s.replace(QLatin1Char(' '), QLatin1Char('_'));
|
||||
@@ -1319,7 +1319,7 @@ void CvsPlugin::testDiffFileResolving_data()
|
||||
|
||||
void CvsPlugin::testDiffFileResolving()
|
||||
{
|
||||
CvsEditor editor;
|
||||
CvsEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 3);
|
||||
editor.testDiffFileResolving();
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ void CvsPlugin::testLogResolving()
|
||||
"added latest commentary\n"
|
||||
"----------------------------\n"
|
||||
);
|
||||
CvsEditor editor;
|
||||
CvsEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 1);
|
||||
editor.testLogResolving(data, "1.3", "1.2");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
using namespace Mercurial::Internal;
|
||||
using namespace Mercurial;
|
||||
|
||||
MercurialEditor::MercurialEditor() :
|
||||
MercurialEditorWidget::MercurialEditorWidget() :
|
||||
exactIdentifier12(QLatin1String(Constants::CHANGEIDEXACT12)),
|
||||
exactIdentifier40(QLatin1String(Constants::CHANGEIDEXACT40)),
|
||||
changesetIdentifier12(QLatin1String(Constants::CHANGESETID12)),
|
||||
@@ -58,7 +58,7 @@ MercurialEditor::MercurialEditor() :
|
||||
setAnnotatePreviousRevisionTextFormat(tr("Annotate parent revision %1"));
|
||||
}
|
||||
|
||||
QSet<QString> MercurialEditor::annotationChanges() const
|
||||
QSet<QString> MercurialEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
const QString data = toPlainText();
|
||||
@@ -74,7 +74,7 @@ QSet<QString> MercurialEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString MercurialEditor::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
QString MercurialEditorWidget::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
{
|
||||
QTextCursor cursor = cursorIn;
|
||||
cursor.select(QTextCursor::WordUnderCursor);
|
||||
@@ -88,12 +88,12 @@ QString MercurialEditor::changeUnderCursor(const QTextCursor &cursorIn) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *MercurialEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *MercurialEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new MercurialAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
QString MercurialEditor::decorateVersion(const QString &revision) const
|
||||
QString MercurialEditorWidget::decorateVersion(const QString &revision) const
|
||||
{
|
||||
const QFileInfo fi(source());
|
||||
const QString workingDirectory = fi.absolutePath();
|
||||
@@ -101,7 +101,7 @@ QString MercurialEditor::decorateVersion(const QString &revision) const
|
||||
return MercurialPlugin::client()->shortDescriptionSync(workingDirectory, revision);
|
||||
}
|
||||
|
||||
QStringList MercurialEditor::annotationPreviousVersions(const QString &revision) const
|
||||
QStringList MercurialEditorWidget::annotationPreviousVersions(const QString &revision) const
|
||||
{
|
||||
const QFileInfo fi(source());
|
||||
const QString workingDirectory = fi.absolutePath();
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
namespace Mercurial {
|
||||
namespace Internal {
|
||||
|
||||
class MercurialEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class MercurialEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MercurialEditor();
|
||||
MercurialEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -151,7 +151,7 @@ bool MercurialPlugin::initialize(const QStringList & /* arguments */, QString *
|
||||
|
||||
static const char *describeSlot = SLOT(view(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters)/sizeof(editorParameters[0]);
|
||||
const auto widgetCreator = []() { return new MercurialEditor; };
|
||||
const auto widgetCreator = []() { return new MercurialEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, m_client, describeSlot));
|
||||
|
||||
@@ -726,7 +726,7 @@ void MercurialPlugin::testDiffFileResolving_data()
|
||||
|
||||
void MercurialPlugin::testDiffFileResolving()
|
||||
{
|
||||
MercurialEditor editor;
|
||||
MercurialEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 2);
|
||||
editor.testDiffFileResolving();
|
||||
}
|
||||
@@ -748,7 +748,7 @@ void MercurialPlugin::testLogResolving()
|
||||
"date: Sat Jan 19 04:08:16 2013 +0100\n"
|
||||
"summary: test-rebase: add another test for rebase with multiple roots\n"
|
||||
);
|
||||
MercurialEditor editor;
|
||||
MercurialEditorWidget editor;
|
||||
editor.setParameters(editorParameters);
|
||||
editor.testLogResolving(data, "18473:692cbda1eb50", "18472:37100f30590f");
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Internal {
|
||||
class OptionsPage;
|
||||
class MercurialClient;
|
||||
class MercurialControl;
|
||||
class MercurialEditor;
|
||||
class MercurialEditorWidget;
|
||||
class MercurialSettings;
|
||||
|
||||
class MercurialPlugin : public VcsBase::VcsBasePlugin
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Perforce {
|
||||
namespace Internal {
|
||||
|
||||
// ------------ PerforceEditor
|
||||
PerforceEditor::PerforceEditor() :
|
||||
PerforceEditorWidget::PerforceEditorWidget() :
|
||||
m_changeNumberPattern(QLatin1String("^\\d+$"))
|
||||
{
|
||||
QTC_CHECK(m_changeNumberPattern.isValid());
|
||||
@@ -70,7 +70,7 @@ PerforceEditor::PerforceEditor() :
|
||||
setAnnotateRevisionTextFormat(tr("Annotate change list \"%1\""));
|
||||
}
|
||||
|
||||
QSet<QString> PerforceEditor::annotationChanges() const
|
||||
QSet<QString> PerforceEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
const QString txt = toPlainText();
|
||||
@@ -94,7 +94,7 @@ QSet<QString> PerforceEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString PerforceEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
QString PerforceEditorWidget::changeUnderCursor(const QTextCursor &c) const
|
||||
{
|
||||
QTextCursor cursor = c;
|
||||
// Any number is regarded as change number.
|
||||
@@ -105,12 +105,12 @@ QString PerforceEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
return m_changeNumberPattern.exactMatch(change) ? change : QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *PerforceEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *PerforceEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new PerforceAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
QString PerforceEditor::findDiffFile(const QString &f) const
|
||||
QString PerforceEditorWidget::findDiffFile(const QString &f) const
|
||||
{
|
||||
QString errorMessage;
|
||||
const QString fileName = PerforcePlugin::fileNameFromPerforceName(f.trimmed(), false, &errorMessage);
|
||||
@@ -119,7 +119,7 @@ QString PerforceEditor::findDiffFile(const QString &f) const
|
||||
return fileName;
|
||||
}
|
||||
|
||||
QStringList PerforceEditor::annotationPreviousVersions(const QString &v) const
|
||||
QStringList PerforceEditorWidget::annotationPreviousVersions(const QString &v) const
|
||||
{
|
||||
bool ok;
|
||||
const int changeList = v.toInt(&ok);
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
namespace Perforce {
|
||||
namespace Internal {
|
||||
|
||||
class PerforceEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class PerforceEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PerforceEditor();
|
||||
PerforceEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -244,7 +244,7 @@ bool PerforcePlugin::initialize(const QStringList & /* arguments */, QString *er
|
||||
|
||||
static const char *describeSlot = SLOT(describe(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]);
|
||||
const auto widgetCreator = []() { return new PerforceEditor; };
|
||||
const auto widgetCreator = []() { return new PerforceEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlot));
|
||||
|
||||
@@ -1206,7 +1206,7 @@ IEditor *PerforcePlugin::showOutputInEditor(const QString &title,
|
||||
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(vcsAnnotate(QString,QString,QString,int)));
|
||||
PerforceEditor *e = qobject_cast<PerforceEditor*>(editor->widget());
|
||||
PerforceEditorWidget *e = qobject_cast<PerforceEditorWidget*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
e->setForceReadOnly(true);
|
||||
@@ -1558,7 +1558,7 @@ void PerforcePlugin::testLogResolving()
|
||||
"\n"
|
||||
" Comment\n"
|
||||
);
|
||||
PerforceEditor editor;
|
||||
PerforceEditorWidget editor;
|
||||
editor.setParameters(editorParameters);
|
||||
editor.testLogResolving(data, "12345", "12344");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
using namespace Subversion;
|
||||
using namespace Subversion::Internal;
|
||||
|
||||
SubversionEditor::SubversionEditor() :
|
||||
SubversionEditorWidget::SubversionEditorWidget() :
|
||||
m_changeNumberPattern(QLatin1String("^\\d+$")),
|
||||
m_revisionNumberPattern(QLatin1String("^r\\d+$"))
|
||||
{
|
||||
@@ -64,7 +64,7 @@ SubversionEditor::SubversionEditor() :
|
||||
setAnnotateRevisionTextFormat(tr("Annotate revision \"%1\""));
|
||||
}
|
||||
|
||||
QSet<QString> SubversionEditor::annotationChanges() const
|
||||
QSet<QString> SubversionEditorWidget::annotationChanges() const
|
||||
{
|
||||
QSet<QString> changes;
|
||||
const QString txt = toPlainText();
|
||||
@@ -88,7 +88,7 @@ QSet<QString> SubversionEditor::annotationChanges() const
|
||||
return changes;
|
||||
}
|
||||
|
||||
QString SubversionEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
QString SubversionEditorWidget::changeUnderCursor(const QTextCursor &c) const
|
||||
{
|
||||
QTextCursor cursor = c;
|
||||
// Any number is regarded as change number.
|
||||
@@ -107,12 +107,12 @@ QString SubversionEditor::changeUnderCursor(const QTextCursor &c) const
|
||||
return QString();
|
||||
}
|
||||
|
||||
VcsBase::BaseAnnotationHighlighter *SubversionEditor::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
VcsBase::BaseAnnotationHighlighter *SubversionEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const
|
||||
{
|
||||
return new SubversionAnnotationHighlighter(changes);
|
||||
}
|
||||
|
||||
QStringList SubversionEditor::annotationPreviousVersions(const QString &v) const
|
||||
QStringList SubversionEditorWidget::annotationPreviousVersions(const QString &v) const
|
||||
{
|
||||
bool ok;
|
||||
const int revision = v.toInt(&ok);
|
||||
|
||||
@@ -37,12 +37,12 @@
|
||||
namespace Subversion {
|
||||
namespace Internal {
|
||||
|
||||
class SubversionEditor : public VcsBase::VcsBaseEditorWidget
|
||||
class SubversionEditorWidget : public VcsBase::VcsBaseEditorWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SubversionEditor();
|
||||
SubversionEditorWidget();
|
||||
|
||||
private:
|
||||
QSet<QString> annotationChanges() const;
|
||||
|
||||
@@ -269,7 +269,7 @@ bool SubversionPlugin::initialize(const QStringList & /*arguments */, QString *e
|
||||
|
||||
static const char *describeSlot = SLOT(describe(QString,QString));
|
||||
const int editorCount = sizeof(editorParameters) / sizeof(editorParameters[0]);
|
||||
const auto widgetCreator = []() { return new SubversionEditor; };
|
||||
const auto widgetCreator = []() { return new SubversionEditorWidget; };
|
||||
for (int i = 0; i < editorCount; i++)
|
||||
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlot));
|
||||
|
||||
@@ -1048,7 +1048,7 @@ IEditor *SubversionPlugin::showOutputInEditor(const QString &title, const QStrin
|
||||
IEditor *editor = EditorManager::openEditorWithContents(id, &s, output.toUtf8());
|
||||
connect(editor, SIGNAL(annotateRevisionRequested(QString,QString,QString,int)),
|
||||
this, SLOT(annotateVersion(QString,QString,QString,int)));
|
||||
SubversionEditor *e = qobject_cast<SubversionEditor*>(editor->widget());
|
||||
SubversionEditorWidget *e = qobject_cast<SubversionEditorWidget*>(editor->widget());
|
||||
if (!e)
|
||||
return 0;
|
||||
e->setForceReadOnly(true);
|
||||
@@ -1283,7 +1283,7 @@ void SubversionPlugin::testDiffFileResolving_data()
|
||||
|
||||
void SubversionPlugin::testDiffFileResolving()
|
||||
{
|
||||
SubversionEditor editor;
|
||||
SubversionEditorWidget editor;
|
||||
editor.setParameters(editorParameters + 2);
|
||||
editor.testDiffFileResolving();
|
||||
}
|
||||
@@ -1306,7 +1306,7 @@ void SubversionPlugin::testLogResolving()
|
||||
" expectations, remove XFail.\n"
|
||||
"\n"
|
||||
);
|
||||
SubversionEditor editor;
|
||||
SubversionEditorWidget editor;
|
||||
editor.setParameters(editorParameters);
|
||||
editor.testLogResolving(data, "r1439551", "r1439540");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user