forked from qt-creator/qt-creator
Make method naming more consistent.
* Use id() for methods returning a string used to represent
some type of object.
* Use displayName() for strings that are meant to be user
visible.
* Quieten some warnings while touching the files anyway.
* Move Factories to their products in the plugins where that
was not done before.
Reviewed-by: dt
This commit is contained in:
@@ -266,14 +266,14 @@ bool EditorManagerPrototype::closeEditors(const QList<Core::IEditor*> editorsToC
|
||||
return callee()->closeEditors(editorsToClose, askAboutModifiedEditors);
|
||||
}
|
||||
|
||||
Core::IEditor *EditorManagerPrototype::openEditor(const QString &fileName, const QString &editorKind)
|
||||
Core::IEditor *EditorManagerPrototype::openEditor(const QString &fileName, const QString &editorId)
|
||||
{
|
||||
return callee()->openEditor(fileName, editorKind);
|
||||
return callee()->openEditor(fileName, editorId);
|
||||
}
|
||||
|
||||
Core::IEditor *EditorManagerPrototype::newFile(const QString &editorKind, QString titlePattern, const QString &contents)
|
||||
Core::IEditor *EditorManagerPrototype::newFile(const QString &editorId, QString titlePattern, const QString &contents)
|
||||
{
|
||||
return callee()->openEditorWithContents(editorKind, &titlePattern, contents);
|
||||
return callee()->openEditorWithContents(editorId, &titlePattern, contents);
|
||||
}
|
||||
|
||||
int EditorManagerPrototype::makeEditorWritable(Core::IEditor *editor)
|
||||
@@ -310,9 +310,9 @@ void EditorPrototype::setDisplayName(const QString &title)
|
||||
callee()->setDisplayName(title);
|
||||
}
|
||||
|
||||
QString EditorPrototype::kind() const
|
||||
QString EditorPrototype::id() const
|
||||
{
|
||||
return QLatin1String(callee()->kind());
|
||||
return callee()->id();
|
||||
}
|
||||
|
||||
bool EditorPrototype::duplicateSupported() const
|
||||
|
||||
@@ -178,8 +178,8 @@ public:
|
||||
public slots:
|
||||
QList<Core::IEditor*> editorsForFiles(QList<Core::IFile*> files) const;
|
||||
bool closeEditors(const QList<Core::IEditor*> editorsToClose, bool askAboutModifiedEditors);
|
||||
Core::IEditor *openEditor(const QString &fileName, const QString &editorKind);
|
||||
Core::IEditor *newFile(const QString &editorKind, QString titlePattern, const QString &contents);
|
||||
Core::IEditor *openEditor(const QString &fileName, const QString &editorId);
|
||||
Core::IEditor *newFile(const QString &editorId, QString titlePattern, const QString &contents);
|
||||
int makeEditorWritable(Core::IEditor *editor);
|
||||
|
||||
QString toString() const;
|
||||
@@ -194,7 +194,7 @@ class EditorPrototype : public QObject, public QScriptable
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
Q_PROPERTY(QString kind READ kind DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
Q_PROPERTY(QString id READ id DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
Q_PROPERTY(bool duplicateSupported READ duplicateSupported DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
Q_PROPERTY(Core::IFile* file READ file DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
Q_PROPERTY(QWidget* toolBar READ toolBar DESIGNABLE false SCRIPTABLE true STORED false)
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
QString displayName() const;
|
||||
void setDisplayName(const QString &title);
|
||||
|
||||
QString kind() const;
|
||||
QString id() const;
|
||||
bool duplicateSupported() const;
|
||||
|
||||
Core::IFile *file() const;
|
||||
|
||||
Reference in New Issue
Block a user