summaryrefslogtreecommitdiff
path: root/src/plugins/designer
diff options
context:
space:
mode:
authorhjk <qtc-committer@nokia.com>2011-02-21 19:30:43 +0100
committerhjk <qtc-committer@nokia.com>2011-02-22 11:23:53 +0100
commit5710fed5e8cb126a1120664f570b2eb0cd0de4f5 (patch)
tree55d569bd648cc9039c0e98252877f192f8cf74d1 /src/plugins/designer
parentf576ad9f2c169bfa4d336ba2b3b1918f03df6916 (diff)
downloadqt-creator-5710fed5e8cb126a1120664f570b2eb0cd0de4f5.tar.gz
texteditor, designerxmleditor: code cosmetics (editable->editor)
Diffstat (limited to 'src/plugins/designer')
-rw-r--r--src/plugins/designer/designerxmleditor.cpp4
-rw-r--r--src/plugins/designer/formwindoweditor.cpp38
-rw-r--r--src/plugins/designer/formwindoweditor.h2
3 files changed, 22 insertions, 22 deletions
diff --git a/src/plugins/designer/designerxmleditor.cpp b/src/plugins/designer/designerxmleditor.cpp
index 3e048b43da..939527aa96 100644
--- a/src/plugins/designer/designerxmleditor.cpp
+++ b/src/plugins/designer/designerxmleditor.cpp
@@ -53,7 +53,7 @@ TextEditor::BaseTextEditor *DesignerXmlEditor::createEditor()
{
if (Designer::Constants::Internal::debug)
qDebug() << "DesignerXmlEditor::createEditableInterface()";
- return m_designerEditor->textEditable();
+ return m_designerEditor->textEditor();
}
FormWindowEditor *DesignerXmlEditor::designerEditor() const
@@ -61,6 +61,6 @@ FormWindowEditor *DesignerXmlEditor::designerEditor() const
return m_designerEditor;
}
-}
+} // namespace Internal
} // namespace Designer
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index af56d2083f..9cd663eef5 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -62,31 +62,31 @@ struct FormWindowEditorPrivate
explicit FormWindowEditorPrivate(Internal::DesignerXmlEditor *editor,
QDesignerFormWindowInterface *form);
- TextEditor::PlainTextEditor m_textEditable;
+ TextEditor::PlainTextEditor m_textEditor;
Internal::FormWindowFile m_file;
Core::Context m_context;
};
FormWindowEditorPrivate::FormWindowEditorPrivate(Internal::DesignerXmlEditor *editor,
QDesignerFormWindowInterface *form) :
- m_textEditable(editor), m_file(form)
+ m_textEditor(editor), m_file(form)
{
}
FormWindowEditor::FormWindowEditor(Internal::DesignerXmlEditor *editor,
- QDesignerFormWindowInterface *form,
- QObject *parent) :
+ QDesignerFormWindowInterface *form,
+ QObject *parent) :
Core::IEditor(parent),
d(new FormWindowEditorPrivate(editor, form))
{
d->m_context.add(Designer::Constants::K_DESIGNER_XML_EDITOR_ID);
d->m_context.add(Designer::Constants::C_DESIGNER_XML_EDITOR);
connect(form, SIGNAL(changed()), this, SIGNAL(changed()));
- // Revert to saved/load externally modified files
- connect(&(d->m_file), SIGNAL(reload(QString)), this, SLOT(slotOpen(QString)));
+ // Revert to saved/load externally modified files.
+ connect(&d->m_file, SIGNAL(reload(QString)), this, SLOT(slotOpen(QString)));
// Force update of open editors model.
- connect(&(d->m_file), SIGNAL(saved()), this, SIGNAL(changed()));
- connect(&(d->m_file), SIGNAL(changed()), this, SIGNAL(changed()));
+ connect(&d->m_file, SIGNAL(saved()), this, SIGNAL(changed()));
+ connect(&d->m_file, SIGNAL(changed()), this, SIGNAL(changed()));
connect(this, SIGNAL(changed()), this, SLOT(configureXmlEditor()));
}
@@ -186,7 +186,7 @@ void FormWindowEditor::syncXmlEditor()
void FormWindowEditor::configureXmlEditor() const
{
TextEditor::PlainTextEditorWidget *editor =
- qobject_cast<TextEditor::PlainTextEditorWidget *>(d->m_textEditable.editorWidget());
+ qobject_cast<TextEditor::PlainTextEditorWidget *>(d->m_textEditor.editorWidget());
if (editor)
editor->configure(Core::ICore::instance()->mimeDatabase()->findByFile(
d->m_file.fileName()));
@@ -194,8 +194,8 @@ void FormWindowEditor::configureXmlEditor() const
void FormWindowEditor::syncXmlEditor(const QString &contents)
{
- d->m_textEditable.editorWidget()->setPlainText(contents);
- d->m_textEditable.editorWidget()->setReadOnly(true);
+ d->m_textEditor.editorWidget()->setPlainText(contents);
+ d->m_textEditor.editorWidget()->setReadOnly(true);
}
Core::IFile *FormWindowEditor::file()
@@ -210,12 +210,12 @@ QString FormWindowEditor::id() const
QString FormWindowEditor::displayName() const
{
- return d->m_textEditable.displayName();
+ return d->m_textEditor.displayName();
}
void FormWindowEditor::setDisplayName(const QString &title)
{
- d->m_textEditable.setDisplayName(title);
+ d->m_textEditor.setDisplayName(title);
emit changed();
}
@@ -231,12 +231,12 @@ Core::IEditor *FormWindowEditor::duplicate(QWidget *)
QByteArray FormWindowEditor::saveState() const
{
- return d->m_textEditable.saveState();
+ return d->m_textEditor.saveState();
}
bool FormWindowEditor::restoreState(const QByteArray &state)
{
- return d->m_textEditable.restoreState(state);
+ return d->m_textEditor.restoreState(state);
}
Core::Context FormWindowEditor::context() const
@@ -246,7 +246,7 @@ Core::Context FormWindowEditor::context() const
QWidget *FormWindowEditor::widget()
{
- return d->m_textEditable.widget();
+ return d->m_textEditor.widget();
}
bool FormWindowEditor::isTemporary() const
@@ -268,12 +268,12 @@ QString FormWindowEditor::contents() const
TextEditor::BaseTextDocument *FormWindowEditor::textDocument()
{
- return qobject_cast<TextEditor::BaseTextDocument*>(d->m_textEditable.file());
+ return qobject_cast<TextEditor::BaseTextDocument*>(d->m_textEditor.file());
}
-TextEditor::PlainTextEditor *FormWindowEditor::textEditable()
+TextEditor::PlainTextEditor *FormWindowEditor::textEditor()
{
- return &d->m_textEditable;
+ return &d->m_textEditor;
}
QString FormWindowEditor::preferredModeType() const
diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h
index 585927a7e4..5189028e25 100644
--- a/src/plugins/designer/formwindoweditor.h
+++ b/src/plugins/designer/formwindoweditor.h
@@ -102,7 +102,7 @@ public:
QString contents() const;
TextEditor::BaseTextDocument *textDocument();
- TextEditor::PlainTextEditor *textEditable();
+ TextEditor::PlainTextEditor *textEditor();
public slots:
void syncXmlEditor();