Vcs: Move editor construction over to new scheme

Change-Id: I491b9f37bfe15ebc800fedd5c683bfaf24e63889
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
This commit is contained in:
hjk
2014-08-21 01:24:38 +02:00
parent 461a54bd2d
commit 2481e71d18
25 changed files with 145 additions and 148 deletions

View File

@@ -231,7 +231,6 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
{
Q_UNUSED(arguments);
typedef VcsSubmitEditorFactory<CvsSubmitEditor> CVSSubmitEditorFactory;
typedef VcsEditorFactory<CvsEditor> CVSEditorFactory;
using namespace Constants;
using namespace Core::Constants;
@@ -254,8 +253,9 @@ 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; };
for (int i = 0; i < editorCount; i++)
addAutoReleasedObject(new CVSEditorFactory(editorParameters + i, this, describeSlotC));
addAutoReleasedObject(new VcsEditorFactory(editorParameters + i, widgetCreator, this, describeSlotC));
auto checkoutWizardFactory = new BaseCheckoutWizardFactory;
checkoutWizardFactory->setId(QLatin1String(VcsBase::Constants::VCS_ID_CVS));
@@ -1318,7 +1318,8 @@ void CvsPlugin::testDiffFileResolving_data()
void CvsPlugin::testDiffFileResolving()
{
CvsEditor editor(editorParameters + 3, 0);
CvsEditor editor;
editor.setParameters(editorParameters + 3);
editor.testDiffFileResolving();
}
@@ -1345,7 +1346,8 @@ void CvsPlugin::testLogResolving()
"added latest commentary\n"
"----------------------------\n"
);
CvsEditor editor(editorParameters + 1, 0);
CvsEditor editor;
editor.setParameters(editorParameters + 1);
editor.testLogResolving(data, "1.3", "1.2");
}
#endif