Commit f9ce335a authored by Eike Ziller's avatar Eike Ziller

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: default avatarEike Ziller <eike.ziller@digia.com>
parent 236ea9ef
......@@ -49,9 +49,9 @@ AndroidManifestEditorFactory::AndroidManifestEditorFactory(QObject *parent)
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);
return editor->editor();
}
......@@ -42,7 +42,7 @@ class AndroidManifestEditorFactory : public Core::IEditorFactory
public:
explicit AndroidManifestEditorFactory(QObject *parent = 0);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // namespace Internal
......
......@@ -84,7 +84,7 @@ public:
Source
};
explicit AndroidManifestEditorWidget(QWidget *parent);
explicit AndroidManifestEditorWidget(QWidget *parent = 0);
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
......
......@@ -409,9 +409,9 @@ BinEditorFactory::BinEditorFactory(BinEditorPlugin *owner) :
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);
m_owner->initializeEditor(widget);
......
......@@ -102,7 +102,7 @@ class BinEditorFactory : public Core::IEditorFactory
public:
explicit BinEditorFactory(BinEditorPlugin *owner);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private:
BinEditorPlugin *m_owner;
......
......@@ -65,10 +65,10 @@ CMakeEditor::CMakeEditor(CMakeEditorWidget *editor)
connect(document(), SIGNAL(changed()), this, SLOT(markAsChanged()));
}
Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
Core::IEditor *CMakeEditor::duplicate()
{
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(widget());
CMakeEditorWidget *ret = new CMakeEditorWidget(parent, w->factory());
CMakeEditorWidget *ret = new CMakeEditorWidget(w->factory());
ret->duplicateFrom(w);
TextEditor::TextEditorSettings::initializeEditor(ret);
return ret->editor();
......@@ -116,7 +116,7 @@ void CMakeEditor::build()
// CMakeEditor
//
CMakeEditorWidget::CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory)
CMakeEditorWidget::CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent)
: BaseTextEditorWidget(parent), m_factory(factory)
{
QSharedPointer<CMakeDocument> doc(new CMakeDocument);
......
......@@ -57,7 +57,7 @@ public:
CMakeEditor(CMakeEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
TextEditor::CompletionAssistProvider *completionAssistProvider();
......@@ -71,7 +71,7 @@ class CMakeEditorWidget : public TextEditor::BaseTextEditorWidget
Q_OBJECT
public:
CMakeEditorWidget(QWidget *parent, CMakeEditorFactory *factory);
CMakeEditorWidget(CMakeEditorFactory *factory, QWidget *parent = 0);
bool save(const QString &fileName = QString());
......
......@@ -69,9 +69,9 @@ CMakeEditorFactory::CMakeEditorFactory(CMakeManager *manager)
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);
return rc->editor();
}
......@@ -43,7 +43,7 @@ class CMakeEditorFactory : public Core::IEditorFactory
public:
CMakeEditorFactory(CMakeManager *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private:
const QStringList m_mimeTypes;
......
......@@ -1416,7 +1416,7 @@ IEditor *EditorManager::createEditor(const Id &editorId, const QString &fileName
return 0;
}
IEditor *editor = factories.front()->createEditor(m_instance);
IEditor *editor = factories.front()->createEditor();
if (editor)
connect(editor->document(), SIGNAL(changed()), m_instance, SLOT(handleDocumentStateChange()));
if (editor)
......@@ -2410,7 +2410,7 @@ Core::IEditor *EditorManager::duplicateEditor(Core::IEditor *editor)
if (!editor->duplicateSupported())
return 0;
IEditor *duplicate = editor->duplicate(0);
IEditor *duplicate = editor->duplicate();
duplicate->restoreState(editor->saveState());
emit m_instance->editorCreated(duplicate, duplicate->document()->filePath());
addEditor(duplicate);
......
......@@ -52,7 +52,7 @@ public:
virtual Core::Id id() const = 0;
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 bool restoreState(const QByteArray &/*state*/) { return true; }
......
......@@ -43,7 +43,7 @@ class CORE_EXPORT IEditorFactory : public Core::IDocumentFactory
public:
IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {}
virtual IEditor *createEditor(QWidget *parent) = 0;
virtual IEditor *createEditor() = 0;
virtual IDocument *open(const QString &);
};
......
......@@ -1499,9 +1499,9 @@ void CPPEditorWidget::keyPressEvent(QKeyEvent *e)
finishRename();
}
Core::IEditor *CPPEditor::duplicate(QWidget *parent)
Core::IEditor *CPPEditor::duplicate()
{
CPPEditorWidget *newEditor = new CPPEditorWidget(parent);
CPPEditorWidget *newEditor = new CPPEditorWidget();
newEditor->duplicateFrom(editorWidget());
// A new QTextDocument was set, so update our signal/slot connection to the new document
newEditor->updateContentsChangedSignal();
......
......@@ -78,7 +78,7 @@ public:
CPPEditor(CPPEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
......@@ -97,7 +97,7 @@ class CPPEditorWidget : public TextEditor::BaseTextEditorWidget
public:
typedef TextEditor::TabSettings TabSettings;
CPPEditorWidget(QWidget *parent);
CPPEditorWidget(QWidget *parent = 0);
~CPPEditorWidget();
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);
m_owner->initializeEditor(editor);
return editor->editor();
......
......@@ -255,7 +255,7 @@ class CppEditorFactory : public Core::IEditorFactory
public:
CppEditorFactory(CppEditorPlugin *owner);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private:
CppEditorPlugin *m_owner;
......
......@@ -57,9 +57,9 @@ FormEditorFactory::FormEditorFactory()
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) {
Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY),
tr("This file can only be edited in <b>Design</b> mode."));
......
......@@ -42,7 +42,7 @@ class FormEditorFactory : public Core::IEditorFactory
public:
FormEditorFactory();
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private slots:
void designerModeClicked();
......
......@@ -113,7 +113,7 @@ public:
// Deletes an existing instance if there is one.
static void deleteInstance();
EditorData createEditor(QWidget *parent);
EditorData createEditor(QWidget *parent = 0);
inline QDesignerFormEditorInterface *designerEditor() const { return m_formeditor; }
inline QWidget * const*designerSubWindows() const { return m_designerSubWindows; }
......
......@@ -46,9 +46,9 @@ DiffEditorFactory::DiffEditorFactory(QObject *parent)
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);
return editor;
}
......
......@@ -47,7 +47,7 @@ class DiffEditorFactory : public Core::IEditorFactory
public:
explicit DiffEditorFactory(QObject *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // namespace Internal
......
......@@ -46,9 +46,9 @@ DiffShowEditorFactory::DiffShowEditorFactory(QObject *parent)
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);
return editor;
}
......
......@@ -47,7 +47,7 @@ class DiffShowEditorFactory : public Core::IEditorFactory
public:
explicit DiffShowEditorFactory(QObject *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // 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);
return ed->editor();
}
......@@ -91,11 +91,10 @@ bool ProjectFilesEditor::duplicateSupported() const
return true;
}
Core::IEditor *ProjectFilesEditor::duplicate(QWidget *parent)
Core::IEditor *ProjectFilesEditor::duplicate()
{
ProjectFilesEditorWidget *parentEditor = qobject_cast<ProjectFilesEditorWidget *>(editorWidget());
ProjectFilesEditorWidget *editor = new ProjectFilesEditorWidget(parent,
parentEditor->factory());
ProjectFilesEditorWidget *editor = new ProjectFilesEditorWidget(parentEditor->factory());
TextEditorSettings::initializeEditor(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),
m_factory(factory)
{
......
......@@ -50,7 +50,7 @@ class ProjectFilesFactory: public Core::IEditorFactory
public:
ProjectFilesFactory(Manager *manager);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
class ProjectFilesEditor : public TextEditor::BaseTextEditor
......@@ -62,7 +62,7 @@ public:
Core::Id id() const;
bool duplicateSupported() const;
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
};
class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
......@@ -70,7 +70,7 @@ class ProjectFilesEditorWidget : public TextEditor::BaseTextEditorWidget
Q_OBJECT
public:
ProjectFilesEditorWidget(QWidget *parent, ProjectFilesFactory *factory);
ProjectFilesEditorWidget(ProjectFilesFactory *factory, QWidget *parent = 0);
ProjectFilesFactory *factory() const;
TextEditor::BaseTextEditor *createEditor();
......
......@@ -187,9 +187,9 @@ bool GLSLTextEditorWidget::isOutdated() const
return false;
}
Core::IEditor *GLSLEditorEditable::duplicate(QWidget *parent)
Core::IEditor *GLSLEditorEditable::duplicate()
{
GLSLTextEditorWidget *newEditor = new GLSLTextEditorWidget(parent);
GLSLTextEditorWidget *newEditor = new GLSLTextEditorWidget();
newEditor->duplicateFrom(editorWidget());
TextEditor::TextEditorSettings::initializeEditor(newEditor);
return newEditor->editor();
......
......@@ -45,7 +45,7 @@ public:
explicit GLSLEditorEditable(GLSLTextEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
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);
return rc->editor();
}
......
......@@ -42,7 +42,7 @@ class GLSLEditorFactory : public Core::IEditorFactory
public:
GLSLEditorFactory(QObject *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private slots:
void updateEditorInfoBar(Core::IEditor *editor);
......
......@@ -85,9 +85,9 @@ ImageViewerFactory::~ImageViewerFactory()
delete d;
}
Core::IEditor *ImageViewerFactory::createEditor(QWidget *parent)
Core::IEditor *ImageViewerFactory::createEditor()
{
return new ImageViewer(parent);
return new ImageViewer();
}
void ImageViewerFactory::extensionsInitialized()
......
......@@ -45,7 +45,7 @@ public:
explicit ImageViewerFactory(QObject *parent = 0);
~ImageViewerFactory();
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
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());
TextEditor::TextEditorSettings::initializeEditor(widget);
......
......@@ -46,7 +46,7 @@ public:
virtual ~PythonEditor();
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
......
......@@ -55,9 +55,9 @@ EditorFactory::EditorFactory(QObject *parent)
| 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);
return widget->editor();
......
......@@ -45,7 +45,7 @@ public:
/**
Creates and initializes new editor widget
*/
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // namespace Internal
......
......@@ -59,9 +59,10 @@ ProFileEditor::ProFileEditor(ProFileEditorWidget *editor)
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());
TextEditor::TextEditorSettings::initializeEditor(ret);
return ret->editor();
......@@ -81,7 +82,7 @@ TextEditor::CompletionAssistProvider *ProFileEditor::completionAssistProvider()
// ProFileEditorWidget
//
ProFileEditorWidget::ProFileEditorWidget(QWidget *parent, ProFileEditorFactory *factory)
ProFileEditorWidget::ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent)
: BaseTextEditorWidget(parent), m_factory(factory)
{
QSharedPointer<ProFileDocument> doc(new ProFileDocument());
......
......@@ -48,7 +48,7 @@ public:
ProFileEditor(ProFileEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
TextEditor::CompletionAssistProvider *completionAssistProvider();
};
......@@ -58,7 +58,7 @@ class ProFileEditorWidget : public TextEditor::BaseTextEditorWidget
Q_OBJECT
public:
ProFileEditorWidget(QWidget *parent, ProFileEditorFactory *factory);
ProFileEditorWidget(ProFileEditorFactory *factory, QWidget *parent = 0);
ProFileEditorFactory *factory() { return m_factory; }
......
......@@ -60,9 +60,9 @@ ProFileEditorFactory::ProFileEditorFactory(QmakeManager *manager) :
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);
return editor->editor();
}
......@@ -45,7 +45,7 @@ class ProFileEditorFactory : public Core::IEditorFactory
public:
ProFileEditorFactory(QmakeManager *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
QmakeManager *qmakeProjectManager() const { return m_manager; }
......
......@@ -581,9 +581,9 @@ QModelIndex QmlJSTextEditorWidget::outlineModelIndex()
return m_outlineModelIndex;
}
IEditor *QmlJSEditor::duplicate(QWidget *parent)
IEditor *QmlJSEditor::duplicate()
{
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget(parent);
QmlJSTextEditorWidget *newEditor = new QmlJSTextEditorWidget();
newEditor->duplicateFrom(editorWidget());
TextEditor::TextEditorSettings::initializeEditor(newEditor);
return newEditor->editor();
......
......@@ -45,7 +45,7 @@ public:
explicit QmlJSEditor(QmlJSTextEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
bool open(QString *errorString, const QString &fileName, const QString &realFileName);
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);
return rc->editor();
}
......
......@@ -42,7 +42,7 @@ class QmlJSEditorFactory : public Core::IEditorFactory
public:
QmlJSEditorFactory(QObject *parent);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // namespace Internal
......
......@@ -65,8 +65,8 @@ BarDescriptorEditorFactory::BarDescriptorEditorFactory(QObject *parent)
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();
}
......@@ -44,7 +44,7 @@ class BarDescriptorEditorFactory : public Core::IEditorFactory
public:
explicit BarDescriptorEditorFactory(QObject *parent = 0);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
};
} // namespace Internal
......
......@@ -66,7 +66,7 @@ class BarDescriptorEditorWidget : public QStackedWidget
Q_OBJECT
public:
explicit BarDescriptorEditorWidget(QWidget *parent);
explicit BarDescriptorEditorWidget(QWidget *parent = 0);
Core::IEditor *editor() const;
......
......@@ -53,8 +53,8 @@ ResourceEditorFactory::ResourceEditorFactory(ResourceEditorPlugin *plugin) :
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);
return new ResourceEditorW(context, m_plugin, parent);
return new ResourceEditorW(context, m_plugin);
}
......@@ -47,7 +47,7 @@ class ResourceEditorFactory : public Core::IEditorFactory
public:
explicit ResourceEditorFactory(ResourceEditorPlugin *plugin);
Core::IEditor *createEditor(QWidget *parent);
Core::IEditor *createEditor();
private:
ResourceEditorPlugin *m_plugin;
......
......@@ -6302,7 +6302,7 @@ void BaseTextEditor::setFileEncodingLabelText(const QString &text)
QString BaseTextEditor::contextHelpId() const
{
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());
return m_contextHelpId;
}
......
......@@ -75,9 +75,9 @@ PlainTextEditorWidget::PlainTextEditorWidget(QWidget *parent)
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());
TextEditorSettings::initializeEditor(newWidget);
return newWidget->editor();
......
......@@ -50,7 +50,7 @@ public:
PlainTextEditor(PlainTextEditorWidget *);
bool duplicateSupported() const { return true; }
Core::IEditor *duplicate(QWidget *parent);
Core::IEditor *duplicate();
Core::Id id() const;
};
......@@ -59,7 +59,7 @@ class TEXTEDITOR_EXPORT PlainTextEditorWidget : public BaseTextEditorWidget
Q_OBJECT
public:
PlainTextEditorWidget(QWidget *parent);
PlainTextEditorWidget(QWidget *parent = 0);
void configure(const QString& mimeType);
void configure(const Core::MimeType &mimeType);
......
......@@ -58,9 +58,9 @@ PlainTextEditorFactory::PlainTextEditorFactory(QObject *parent)
TextEditorActionHandler::UnCollapseAll);