forked from qt-creator/qt-creator
Editors: Remove useless parent widget argument from create/duplicate
It was never called with a sensible value anyhow, and only complicates things. Change-Id: I005848700b6c00114d91495670d4a0e15a2d2e64 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -49,9 +49,9 @@ AndroidManifestEditorFactory::AndroidManifestEditorFactory(QObject *parent)
|
|||||||
new TextEditor::TextEditorActionHandler(this, Constants::ANDROID_MANIFEST_EDITOR_CONTEXT);
|
new TextEditor::TextEditorActionHandler(this, Constants::ANDROID_MANIFEST_EDITOR_CONTEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *AndroidManifestEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *AndroidManifestEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
AndroidManifestEditorWidget *editor = new AndroidManifestEditorWidget(parent);
|
AndroidManifestEditorWidget *editor = new AndroidManifestEditorWidget();
|
||||||
TextEditor::TextEditorSettings::initializeEditor(editor);
|
TextEditor::TextEditorSettings::initializeEditor(editor);
|
||||||
return editor->editor();
|
return editor->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class AndroidManifestEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit AndroidManifestEditorFactory(QObject *parent = 0);
|
explicit AndroidManifestEditorFactory(QObject *parent = 0);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public:
|
|||||||
Source
|
Source
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit AndroidManifestEditorWidget(QWidget *parent);
|
explicit AndroidManifestEditorWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||||
|
|
||||||
|
|||||||
@@ -409,9 +409,9 @@ BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) :
|
|||||||
addMimeType(Constants::C_BINEDITOR_MIMETYPE);
|
addMimeType(Constants::C_BINEDITOR_MIMETYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *BinEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *BinEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
BinEditorWidget *widget = new BinEditorWidget(parent);
|
BinEditorWidget *widget = new BinEditorWidget();
|
||||||
BinEditor *editor = new BinEditor(widget);
|
BinEditor *editor = new BinEditor(widget);
|
||||||
|
|
||||||
m_owner->initializeEditor(widget);
|
m_owner->initializeEditor(widget);
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class BinEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit BinEditorFactory(BinEditorPlugin *owner);
|
explicit BinEditorFactory(BinEditorPlugin *owner);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BinEditorPlugin *m_owner;
|
BinEditorPlugin *m_owner;
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ CMakeEditor::CMakeEditor(CMakeEditorWidget *editor)
|
|||||||
connect(document(), SIGNAL(changed()), this, SLOT(markAsChanged()));
|
connect(document(), SIGNAL(changed()), this, SLOT(markAsChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
|
Core::IEditor *CMakeEditor::duplicate()
|
||||||
{
|
{
|
||||||
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(widget());
|
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(widget());
|
||||||
CMakeEditorWidget *ret = new CMakeEditorWidget(parent, w->factory());
|
CMakeEditorWidget *ret = new CMakeEditorWidget(w->factory());
|
||||||
ret->duplicateFrom(w);
|
ret->duplicateFrom(w);
|
||||||
TextEditor::TextEditorSettings::initializeEditor(ret);
|
TextEditor::TextEditorSettings::initializeEditor(ret);
|
||||||
return ret->editor();
|
return ret->editor();
|
||||||
@@ -116,7 +116,7 @@ void CMakeEditor::build()
|
|||||||
// CMakeEditor
|
// CMakeEditor
|
||||||
//
|
//
|
||||||
|
|
||||||
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory)
|
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent)
|
||||||
: BaseTextEditorWidget(parent), m_factory(factory)
|
: BaseTextEditorWidget(parent), m_factory(factory)
|
||||||
{
|
{
|
||||||
QSharedPointer<CMakeDocument> doc(new CMakeDocument);
|
QSharedPointer<CMakeDocument> doc(new CMakeDocument);
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
CMakeEditor(CMakeEditorWidget *);
|
CMakeEditor(CMakeEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ class CMakeEditorWidget : public TextEditor::BaseTextEditorWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory);
|
CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent = 0);
|
||||||
|
|
||||||
bool save(const QString &fileName = QString());
|
bool save(const QString &fileName = QString());
|
||||||
|
|
||||||
|
|||||||
@@ -69,9 +69,9 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
|
|||||||
contextMenu->addAction(cmd);
|
contextMenu->addAction(cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *CMakeEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *CMakeEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
CMakeEditorWidget *rc = new CMakeEditorWidget(parent, this);
|
CMakeEditorWidget *rc = new CMakeEditorWidget(this);
|
||||||
TextEditor::TextEditorSettings::initializeEditor(rc);
|
TextEditor::TextEditorSettings::initializeEditor(rc);
|
||||||
return rc->editor();
|
return rc->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CMakeEditorFactory : public Core::IEditorFactory
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeEditorFactory(CMakeManager *parent);
|
CMakeEditorFactory(CMakeManager *parent);
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QStringList m_mimeTypes;
|
const QStringList m_mimeTypes;
|
||||||
|
|||||||
@@ -1416,7 +1416,7 @@ IEditor *EditorManager::createEditor(const Id &editorId, const QString &fileName
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEditor *editor = factories.front()->createEditor(m_instance);
|
IEditor *editor = factories.front()->createEditor();
|
||||||
if (editor)
|
if (editor)
|
||||||
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
|
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
|
||||||
if (editor)
|
if (editor)
|
||||||
@@ -2410,7 +2410,7 @@ Core::IEditor *EditorManager::duplicateEditor(Core::IEditor *editor)
|
|||||||
if (!editor->duplicateSupported())
|
if (!editor->duplicateSupported())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
IEditor *duplicate = editor->duplicate(0);
|
IEditor *duplicate = editor->duplicate();
|
||||||
duplicate->restoreState(editor->saveState());
|
duplicate->restoreState(editor->saveState());
|
||||||
emit m_instance->editorCreated(duplicate, duplicate->document()->filePath());
|
emit m_instance->editorCreated(duplicate, duplicate->document()->filePath());
|
||||||
addEditor(duplicate);
|
addEditor(duplicate);
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
virtual Core::Id id() const = 0;
|
virtual Core::Id id() const = 0;
|
||||||
|
|
||||||
virtual bool duplicateSupported() const { return false; }
|
virtual bool duplicateSupported() const { return false; }
|
||||||
virtual IEditor *duplicate(QWidget * /*parent*/) { return 0; }
|
virtual IEditor *duplicate() { return 0; }
|
||||||
|
|
||||||
virtual QByteArray saveState() const { return QByteArray(); }
|
virtual QByteArray saveState() const { return QByteArray(); }
|
||||||
virtual bool restoreState(const QByteArray &/*state*/) { return true; }
|
virtual bool restoreState(const QByteArray &/*state*/) { return true; }
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class CORE_EXPORT IEditorFactory : public Core::IDocumentFactory
|
|||||||
public:
|
public:
|
||||||
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
|
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
|
||||||
|
|
||||||
virtual IEditor *createEditor(QWidget *parent) = 0;
|
virtual IEditor *createEditor() = 0;
|
||||||
virtual IDocument *open(const QString &);
|
virtual IDocument *open(const QString &);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1499,9 +1499,9 @@ void CPPEditorWidget::keyPressEvent(QKeyEvent *e)
|
|||||||
finishRename();
|
finishRename();
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *CPPEditor::duplicate(QWidget *parent)
|
Core::IEditor *CPPEditor::duplicate()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *newEditor = new CPPEditorWidget(parent);
|
CPPEditorWidget *newEditor = new CPPEditorWidget();
|
||||||
newEditor->duplicateFrom(editorWidget());
|
newEditor->duplicateFrom(editorWidget());
|
||||||
// A new QTextDocument was set, so update our signal/slot connection to the new document
|
// A new QTextDocument was set, so update our signal/slot connection to the new document
|
||||||
newEditor->updateContentsChangedSignal();
|
newEditor->updateContentsChangedSignal();
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public:
|
|||||||
CPPEditor(CPPEditorWidget *);
|
CPPEditor(CPPEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
|
|
||||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||||
@@ -97,7 +97,7 @@ class CPPEditorWidget : public TextEditor::BaseTextEditorWidget
|
|||||||
public:
|
public:
|
||||||
typedef TextEditor::TabSettings TabSettings;
|
typedef TextEditor::TabSettings TabSettings;
|
||||||
|
|
||||||
CPPEditorWidget(QWidget *parent);
|
CPPEditorWidget(QWidget *parent = 0);
|
||||||
~CPPEditorWidget();
|
~CPPEditorWidget();
|
||||||
void unCommentSelection();
|
void unCommentSelection();
|
||||||
|
|
||||||
|
|||||||
@@ -93,9 +93,9 @@ CppEditorFactory::CppEditorFactory(CppEditorPlugin *owner) :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IEditor *CppEditorFactory::createEditor(QWidget *parent)
|
IEditor *CppEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
CPPEditorWidget *editor = new CPPEditorWidget(parent);
|
CPPEditorWidget *editor = new CPPEditorWidget();
|
||||||
editor->setRevisionsVisible(true);
|
editor->setRevisionsVisible(true);
|
||||||
m_owner->initializeEditor(editor);
|
m_owner->initializeEditor(editor);
|
||||||
return editor->editor();
|
return editor->editor();
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ class CppEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
CppEditorFactory(CppEditorPlugin *owner);
|
CppEditorFactory(CppEditorPlugin *owner);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CppEditorPlugin *m_owner;
|
CppEditorPlugin *m_owner;
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ FormEditorFactory::FormEditorFactory()
|
|||||||
Core::FileIconProvider::registerIconOverlayForSuffix(":/formeditor/images/qt_ui.png", "ui");
|
Core::FileIconProvider::registerIconOverlayForSuffix(":/formeditor/images/qt_ui.png", "ui");
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *FormEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *FormEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
const EditorData data = FormEditorW::instance()->createEditor(parent);
|
const EditorData data = FormEditorW::instance()->createEditor();
|
||||||
if (data.formWindowEditor) {
|
if (data.formWindowEditor) {
|
||||||
Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY),
|
Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY),
|
||||||
tr("This file can only be edited in <b>Design</b> mode."));
|
tr("This file can only be edited in <b>Design</b> mode."));
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class FormEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
FormEditorFactory();
|
FormEditorFactory();
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void designerModeClicked();
|
void designerModeClicked();
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public:
|
|||||||
// Deletes an existing instance if there is one.
|
// Deletes an existing instance if there is one.
|
||||||
static void deleteInstance();
|
static void deleteInstance();
|
||||||
|
|
||||||
EditorData createEditor(QWidget *parent);
|
EditorData createEditor(QWidget *parent = 0);
|
||||||
|
|
||||||
inline QDesignerFormEditorInterface *designerEditor() const { return m_formeditor; }
|
inline QDesignerFormEditorInterface *designerEditor() const { return m_formeditor; }
|
||||||
inline QWidget * const*designerSubWindows() const { return m_designerSubWindows; }
|
inline QWidget * const*designerSubWindows() const { return m_designerSubWindows; }
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ DiffEditorFactory::DiffEditorFactory(QObject *parent)
|
|||||||
addMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
|
addMimeType(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *DiffEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *DiffEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
DiffEditorWidget *editorWidget = new DiffEditorWidget(parent);
|
DiffEditorWidget *editorWidget = new DiffEditorWidget();
|
||||||
DiffEditor *editor = new DiffEditor(editorWidget);
|
DiffEditor *editor = new DiffEditor(editorWidget);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class DiffEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit DiffEditorFactory(QObject *parent);
|
explicit DiffEditorFactory(QObject *parent);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ DiffShowEditorFactory::DiffShowEditorFactory(QObject *parent)
|
|||||||
setMimeTypes(QStringList() << QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
|
setMimeTypes(QStringList() << QLatin1String(Constants::DIFF_EDITOR_MIMETYPE));
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *DiffShowEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *DiffShowEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
DiffEditorWidget *editorWidget = new DiffEditorWidget(parent);
|
DiffEditorWidget *editorWidget = new DiffEditorWidget();
|
||||||
DiffShowEditor *editor = new DiffShowEditor(editorWidget);
|
DiffShowEditor *editor = new DiffShowEditor(editorWidget);
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class DiffShowEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit DiffShowEditorFactory(QObject *parent);
|
explicit DiffShowEditorFactory(QObject *parent);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ ProjectFilesFactory::ProjectFilesFactory(Manager *manager)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ProjectFilesFactory::createEditor(QWidget *parent)
|
Core::IEditor *ProjectFilesFactory::createEditor()
|
||||||
{
|
{
|
||||||
ProjectFilesEditorWidget *ed = new ProjectFilesEditorWidget(parent, this);
|
ProjectFilesEditorWidget *ed = new ProjectFilesEditorWidget(this);
|
||||||
TextEditorSettings::initializeEditor(ed);
|
TextEditorSettings::initializeEditor(ed);
|
||||||
return ed->editor();
|
return ed->editor();
|
||||||
}
|
}
|
||||||
@@ -91,11 +91,10 @@ bool ProjectFilesEditor::duplicateSupported() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ProjectFilesEditor::duplicate(QWidget *parent)
|
Core::IEditor *ProjectFilesEditor::duplicate()
|
||||||
{
|
{
|
||||||
ProjectFilesEditorWidget *parentEditor = qobject_cast<ProjectFilesEditorWidget *>(editorWidget());
|
ProjectFilesEditorWidget *parentEditor = qobject_cast<ProjectFilesEditorWidget *>(editorWidget());
|
||||||
ProjectFilesEditorWidget *editor = new ProjectFilesEditorWidget(parent,
|
ProjectFilesEditorWidget *editor = new ProjectFilesEditorWidget(parentEditor->factory());
|
||||||
parentEditor->factory());
|
|
||||||
TextEditorSettings::initializeEditor(editor);
|
TextEditorSettings::initializeEditor(editor);
|
||||||
return editor->editor();
|
return editor->editor();
|
||||||
}
|
}
|
||||||
@@ -106,7 +105,7 @@ Core::IEditor *ProjectFilesEditor::duplicate(QWidget *parent)
|
|||||||
//
|
//
|
||||||
////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
ProjectFilesEditorWidget::ProjectFilesEditorWidget(QWidget *parent, ProjectFilesFactory *factory)
|
ProjectFilesEditorWidget::ProjectFilesEditorWidget(ProjectFilesFactory *factory, QWidget *parent)
|
||||||
: BaseTextEditorWidget(parent),
|
: BaseTextEditorWidget(parent),
|
||||||
m_factory(factory)
|
m_factory(factory)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class ProjectFilesFactory: public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
ProjectFilesFactory(Manager *manager);
|
ProjectFilesFactory(Manager *manager);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ProjectFilesEditor : public TextEditor::BaseTextEditor
|
class ProjectFilesEditor : public TextEditor::BaseTextEditor
|
||||||
@@ -62,7 +62,7 @@ public:
|
|||||||
|
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
bool duplicateSupported() const;
|
bool duplicateSupported() const;
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
|
class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
|
||||||
@@ -70,7 +70,7 @@ class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProjectFilesEditorWidget(QWidget *parent, ProjectFilesFactory *factory);
|
ProjectFilesEditorWidget(ProjectFilesFactory *factory, QWidget *parent = 0);
|
||||||
|
|
||||||
ProjectFilesFactory *factory() const;
|
ProjectFilesFactory *factory() const;
|
||||||
TextEditor::BaseTextEditor *createEditor();
|
TextEditor::BaseTextEditor *createEditor();
|
||||||
|
|||||||
@@ -187,9 +187,9 @@ bool GLSLTextEditorWidget::isOutdated() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *GLSLEditorEditable::duplicate(QWidget *parent)
|
Core::IEditor *GLSLEditorEditable::duplicate()
|
||||||
{
|
{
|
||||||
GLSLTextEditorWidget *newEditor = new GLSLTextEditorWidget(parent);
|
GLSLTextEditorWidget *newEditor = new GLSLTextEditorWidget();
|
||||||
newEditor->duplicateFrom(editorWidget());
|
newEditor->duplicateFrom(editorWidget());
|
||||||
TextEditor::TextEditorSettings::initializeEditor(newEditor);
|
TextEditor::TextEditorSettings::initializeEditor(newEditor);
|
||||||
return newEditor->editor();
|
return newEditor->editor();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
explicit GLSLEditorEditable(GLSLTextEditorWidget *);
|
explicit GLSLEditorEditable(GLSLTextEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||||
|
|||||||
@@ -63,9 +63,9 @@ GLSLEditorFactory::GLSLEditorFactory(QObject *parent)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *GLSLEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *GLSLEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
GLSLTextEditorWidget *rc = new GLSLTextEditorWidget(parent);
|
GLSLTextEditorWidget *rc = new GLSLTextEditorWidget();
|
||||||
TextEditor::TextEditorSettings::initializeEditor(rc);
|
TextEditor::TextEditorSettings::initializeEditor(rc);
|
||||||
return rc->editor();
|
return rc->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class GLSLEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
GLSLEditorFactory(QObject *parent);
|
GLSLEditorFactory(QObject *parent);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateEditorInfoBar(Core::IEditor *editor);
|
void updateEditorInfoBar(Core::IEditor *editor);
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ ImageViewerFactory::~ImageViewerFactory()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ImageViewerFactory::createEditor(QWidget *parent)
|
Core::IEditor *ImageViewerFactory::createEditor()
|
||||||
{
|
{
|
||||||
return new ImageViewer(parent);
|
return new ImageViewer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageViewerFactory::extensionsInitialized()
|
void ImageViewerFactory::extensionsInitialized()
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
explicit ImageViewerFactory(QObject *parent = 0);
|
explicit ImageViewerFactory(QObject *parent = 0);
|
||||||
~ImageViewerFactory();
|
~ImageViewerFactory();
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
void extensionsInitialized();
|
void extensionsInitialized();
|
||||||
|
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ PythonEditor::~PythonEditor()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *PythonEditor::duplicate(QWidget *parent)
|
Core::IEditor *PythonEditor::duplicate()
|
||||||
{
|
{
|
||||||
EditorWidget *widget = new EditorWidget(parent);
|
EditorWidget *widget = new EditorWidget();
|
||||||
widget->duplicateFrom(editorWidget());
|
widget->duplicateFrom(editorWidget());
|
||||||
TextEditor::TextEditorSettings::initializeEditor(widget);
|
TextEditor::TextEditorSettings::initializeEditor(widget);
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ public:
|
|||||||
virtual ~PythonEditor();
|
virtual ~PythonEditor();
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
|
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
|
|
||||||
|
|||||||
@@ -55,9 +55,9 @@ EditorFactory::EditorFactory(QObject *parent)
|
|||||||
| TextEditor::TextEditorActionHandler::UnCollapseAll);
|
| TextEditor::TextEditorActionHandler::UnCollapseAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *EditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *EditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
EditorWidget *widget = new EditorWidget(parent);
|
EditorWidget *widget = new EditorWidget();
|
||||||
TextEditor::TextEditorSettings::initializeEditor(widget);
|
TextEditor::TextEditorSettings::initializeEditor(widget);
|
||||||
|
|
||||||
return widget->editor();
|
return widget->editor();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Creates and initializes new editor widget
|
Creates and initializes new editor widget
|
||||||
*/
|
*/
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -59,9 +59,10 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
|
|||||||
TextEditor::Constants::C_TEXTEDITOR));
|
TextEditor::Constants::C_TEXTEDITOR));
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ProFileEditor::duplicate(QWidget *parent)
|
Core::IEditor *ProFileEditor::duplicate()
|
||||||
{
|
{
|
||||||
ProFileEditorWidget *ret = new ProFileEditorWidget(parent, qobject_cast<ProFileEditorWidget*>(editorWidget())->factory());
|
ProFileEditorWidget *ret = new ProFileEditorWidget(
|
||||||
|
qobject_cast<ProFileEditorWidget*>(editorWidget())->factory());
|
||||||
ret->duplicateFrom(editorWidget());
|
ret->duplicateFrom(editorWidget());
|
||||||
TextEditor::TextEditorSettings::initializeEditor(ret);
|
TextEditor::TextEditorSettings::initializeEditor(ret);
|
||||||
return ret->editor();
|
return ret->editor();
|
||||||
@@ -81,7 +82,7 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider()
|
|||||||
// ProFileEditorWidget
|
// ProFileEditorWidget
|
||||||
//
|
//
|
||||||
|
|
||||||
ProFileEditorWidget::ProFileEditorWidget(QWidget *parent, ProFileEditorFactory *factory)
|
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent)
|
||||||
: BaseTextEditorWidget(parent), m_factory(factory)
|
: BaseTextEditorWidget(parent), m_factory(factory)
|
||||||
{
|
{
|
||||||
QSharedPointer<ProFileDocument> doc(new ProFileDocument());
|
QSharedPointer<ProFileDocument> doc(new ProFileDocument());
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
ProFileEditor(ProFileEditorWidget *);
|
ProFileEditor(ProFileEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
TextEditor::CompletionAssistProvider *completionAssistProvider();
|
||||||
};
|
};
|
||||||
@@ -58,7 +58,7 @@ class ProFileEditorWidget : public TextEditor::BaseTextEditorWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProFileEditorWidget(QWidget *parent, ProFileEditorFactory *factory);
|
ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent = 0);
|
||||||
|
|
||||||
ProFileEditorFactory *factory() { return m_factory; }
|
ProFileEditorFactory *factory() { return m_factory; }
|
||||||
|
|
||||||
|
|||||||
@@ -60,9 +60,9 @@ ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager) :
|
|||||||
Core::FileIconProvider::registerIconOverlayForSuffix(QtSupport::Constants::ICON_QT_PROJECT, "prf");
|
Core::FileIconProvider::registerIconOverlayForSuffix(QtSupport::Constants::ICON_QT_PROJECT, "prf");
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ProFileEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *ProFileEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
ProFileEditorWidget *editor = new ProFileEditorWidget(parent, this);
|
ProFileEditorWidget *editor = new ProFileEditorWidget(this);
|
||||||
TextEditor::TextEditorSettings::initializeEditor(editor);
|
TextEditor::TextEditorSettings::initializeEditor(editor);
|
||||||
return editor->editor();
|
return editor->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class ProFileEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
ProFileEditorFactory(QmakeManager *parent);
|
ProFileEditorFactory(QmakeManager *parent);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
QmakeManager *qmakeProjectManager() const { return m_manager; }
|
QmakeManager *qmakeProjectManager() const { return m_manager; }
|
||||||
|
|
||||||
|
|||||||
@@ -581,9 +581,9 @@ QModelIndex QmlJSTextEditorWidget::outlineModelIndex()
|
|||||||
return m_outlineModelIndex;
|
return m_outlineModelIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
IEditor *QmlJSEditor::duplicate(QWidget *parent)
|
IEditor *QmlJSEditor::duplicate()
|
||||||
{
|
{
|
||||||
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget(parent);
|
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget();
|
||||||
newEditor->duplicateFrom(editorWidget());
|
newEditor->duplicateFrom(editorWidget());
|
||||||
TextEditor::TextEditorSettings::initializeEditor(newEditor);
|
TextEditor::TextEditorSettings::initializeEditor(newEditor);
|
||||||
return newEditor->editor();
|
return newEditor->editor();
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
explicit QmlJSEditor(QmlJSTextEditorWidget *);
|
explicit QmlJSEditor(QmlJSTextEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
|
||||||
bool isDesignModePreferred() const;
|
bool isDesignModePreferred() const;
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ QmlJSEditorFactory::QmlJSEditorFactory(QObject *parent)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *QmlJSEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *QmlJSEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
QmlJSTextEditorWidget *rc = new QmlJSTextEditorWidget(parent);
|
QmlJSTextEditorWidget *rc = new QmlJSTextEditorWidget();
|
||||||
TextEditor::TextEditorSettings::initializeEditor(rc);
|
TextEditor::TextEditorSettings::initializeEditor(rc);
|
||||||
return rc->editor();
|
return rc->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class QmlJSEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
QmlJSEditorFactory(QObject *parent);
|
QmlJSEditorFactory(QObject *parent);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ BarDescriptorEditorFactory::BarDescriptorEditorFactory(QObject *parent)
|
|||||||
new BarDescriptorActionHandler(this);
|
new BarDescriptorActionHandler(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *BarDescriptorEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *BarDescriptorEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(parent);
|
BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget();
|
||||||
return editorWidget->editor();
|
return editorWidget->editor();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ class BarDescriptorEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit BarDescriptorEditorFactory(QObject *parent = 0);
|
explicit BarDescriptorEditorFactory(QObject *parent = 0);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class BarDescriptorEditorWidget : public QStackedWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit BarDescriptorEditorWidget(QWidget *parent);
|
explicit BarDescriptorEditorWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
Core::IEditor *editor() const;
|
Core::IEditor *editor() const;
|
||||||
|
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
|
|||||||
Core::FileIconProvider::registerIconOverlayForSuffix(":/resourceeditor/images/qt_qrc.png", "qrc");
|
Core::FileIconProvider::registerIconOverlayForSuffix(":/resourceeditor/images/qt_qrc.png", "qrc");
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *ResourceEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *ResourceEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
Core::Context context(ResourceEditor::Constants::C_RESOURCEEDITOR);
|
Core::Context context(ResourceEditor::Constants::C_RESOURCEEDITOR);
|
||||||
return new ResourceEditorW(context, m_plugin, parent);
|
return new ResourceEditorW(context, m_plugin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class ResourceEditorFactory : public Core::IEditorFactory
|
|||||||
public:
|
public:
|
||||||
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
|
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ResourceEditorPlugin *m_plugin;
|
ResourceEditorPlugin *m_plugin;
|
||||||
|
|||||||
@@ -6302,7 +6302,7 @@ void BaseTextEditor::setFileEncodingLabelText(const QString &text)
|
|||||||
QString BaseTextEditor::contextHelpId() const
|
QString BaseTextEditor::contextHelpId() const
|
||||||
{
|
{
|
||||||
if (m_contextHelpId.isEmpty())
|
if (m_contextHelpId.isEmpty())
|
||||||
emit const_cast<BaseTextEditor*>(this)->contextHelpIdRequested(m_editorWidget->editor(),
|
emit const_cast<BaseTextEditor*>(this)->contextHelpIdRequested(const_cast<BaseTextEditor*>(this),
|
||||||
m_editorWidget->textCursor().position());
|
m_editorWidget->textCursor().position());
|
||||||
return m_contextHelpId;
|
return m_contextHelpId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ PlainTextEditorWidget::PlainTextEditorWidget(QWidget *parent)
|
|||||||
connect(Manager::instance(), SIGNAL(mimeTypesRegistered()), this, SLOT(configure()));
|
connect(Manager::instance(), SIGNAL(mimeTypesRegistered()), this, SLOT(configure()));
|
||||||
}
|
}
|
||||||
|
|
||||||
IEditor *PlainTextEditor::duplicate(QWidget *parent)
|
IEditor *PlainTextEditor::duplicate()
|
||||||
{
|
{
|
||||||
PlainTextEditorWidget *newWidget = new PlainTextEditorWidget(parent);
|
PlainTextEditorWidget *newWidget = new PlainTextEditorWidget();
|
||||||
newWidget->duplicateFrom(editorWidget());
|
newWidget->duplicateFrom(editorWidget());
|
||||||
TextEditorSettings::initializeEditor(newWidget);
|
TextEditorSettings::initializeEditor(newWidget);
|
||||||
return newWidget->editor();
|
return newWidget->editor();
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public:
|
|||||||
PlainTextEditor(PlainTextEditorWidget *);
|
PlainTextEditor(PlainTextEditorWidget *);
|
||||||
|
|
||||||
bool duplicateSupported() const { return true; }
|
bool duplicateSupported() const { return true; }
|
||||||
Core::IEditor *duplicate(QWidget *parent);
|
Core::IEditor *duplicate();
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ class TEXTEDITOR_EXPORT PlainTextEditorWidget : public BaseTextEditorWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PlainTextEditorWidget(QWidget *parent);
|
PlainTextEditorWidget(QWidget *parent = 0);
|
||||||
|
|
||||||
void configure(const QString& mimeType);
|
void configure(const QString& mimeType);
|
||||||
void configure(const Core::MimeType &mimeType);
|
void configure(const Core::MimeType &mimeType);
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ PlainTextEditorFactory::PlainTextEditorFactory(QObject *parent)
|
|||||||
TextEditorActionHandler::UnCollapseAll);
|
TextEditorActionHandler::UnCollapseAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *PlainTextEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *PlainTextEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
PlainTextEditorWidget *rc = new PlainTextEditorWidget(parent);
|
PlainTextEditorWidget *rc = new PlainTextEditorWidget();
|
||||||
TextEditorSettings::initializeEditor(rc);
|
TextEditorSettings::initializeEditor(rc);
|
||||||
connect(rc, SIGNAL(configured(Core::IEditor*)),
|
connect(rc, SIGNAL(configured(Core::IEditor*)),
|
||||||
this, SLOT(updateEditorInfoBar(Core::IEditor*)));
|
this, SLOT(updateEditorInfoBar(Core::IEditor*)));
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
PlainTextEditorFactory(QObject *parent = 0);
|
PlainTextEditorFactory(QObject *parent = 0);
|
||||||
|
|
||||||
using Core::IEditorFactory::addMimeType;
|
using Core::IEditorFactory::addMimeType;
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateEditorInfoBar(Core::IEditor *editor);
|
void updateEditorInfoBar(Core::IEditor *editor);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
SnippetEditor(SnippetEditorWidget *editorWidget);
|
SnippetEditor(SnippetEditorWidget *editorWidget);
|
||||||
|
|
||||||
bool duplicateSupported() const { return false; }
|
bool duplicateSupported() const { return false; }
|
||||||
Core::IEditor *duplicate(QWidget * /* parent */ ) { return 0; }
|
Core::IEditor *duplicate() { return 0; }
|
||||||
Core::Id id() const;
|
Core::Id id() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -77,9 +77,9 @@ BaseVcsEditorFactory::~BaseVcsEditorFactory()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *BaseVcsEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *BaseVcsEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
VcsBaseEditorWidget *vcsEditor = createVcsBaseEditor(d->m_type, parent);
|
VcsBaseEditorWidget *vcsEditor = createVcsBaseEditor(d->m_type);
|
||||||
|
|
||||||
vcsEditor->setMimeType(mimeTypes().front());
|
vcsEditor->setMimeType(mimeTypes().front());
|
||||||
|
|
||||||
|
|||||||
@@ -48,13 +48,13 @@ public:
|
|||||||
explicit BaseVcsEditorFactory(const VcsBaseEditorParameters *type);
|
explicit BaseVcsEditorFactory(const VcsBaseEditorParameters *type);
|
||||||
~BaseVcsEditorFactory();
|
~BaseVcsEditorFactory();
|
||||||
|
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Implement to create and initialize (call init()) a
|
// Implement to create and initialize (call init()) a
|
||||||
// VcsBaseEditor subclass
|
// VcsBaseEditor subclass
|
||||||
virtual VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
|
virtual VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
|
||||||
QWidget *parent) = 0;
|
QWidget *parent = 0) = 0;
|
||||||
|
|
||||||
Internal::BaseVcsEditorFactoryPrivate *const d;
|
Internal::BaseVcsEditorFactoryPrivate *const d;
|
||||||
};
|
};
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
|
VcsBaseEditorWidget *createVcsBaseEditor(const VcsBaseEditorParameters *type,
|
||||||
QWidget *parent);
|
QWidget *parent = 0);
|
||||||
QObject *m_describeReceiver;
|
QObject *m_describeReceiver;
|
||||||
const char *m_describeSlot;
|
const char *m_describeSlot;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -44,9 +44,9 @@ BaseVcsSubmitEditorFactory::~BaseVcsSubmitEditorFactory()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Core::IEditor *BaseVcsSubmitEditorFactory::createEditor(QWidget *parent)
|
Core::IEditor *BaseVcsSubmitEditorFactory::createEditor()
|
||||||
{
|
{
|
||||||
return createBaseSubmitEditor(m_parameters, parent);
|
return createBaseSubmitEditor(m_parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace VcsBase
|
} // namespace VcsBase
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ protected:
|
|||||||
~BaseVcsSubmitEditorFactory();
|
~BaseVcsSubmitEditorFactory();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Core::IEditor *createEditor(QWidget *parent);
|
Core::IEditor *createEditor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual VcsBaseSubmitEditor
|
virtual VcsBaseSubmitEditor
|
||||||
*createBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
*createBaseSubmitEditor(const VcsBaseSubmitEditorParameters *parameters,
|
||||||
QWidget *parent) = 0;
|
QWidget *parent = 0) = 0;
|
||||||
|
|
||||||
const VcsBaseSubmitEditorParameters *const m_parameters; // Not owned.
|
const VcsBaseSubmitEditorParameters *const m_parameters; // Not owned.
|
||||||
};
|
};
|
||||||
@@ -74,7 +74,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
VcsBaseSubmitEditor *createBaseSubmitEditor
|
VcsBaseSubmitEditor *createBaseSubmitEditor
|
||||||
(const VcsBaseSubmitEditorParameters *parameters, QWidget *parent)
|
(const VcsBaseSubmitEditorParameters *parameters, QWidget *parent = 0)
|
||||||
{
|
{
|
||||||
return new Editor(parameters, parent);
|
return new Editor(parameters, parent);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user