forked from qt-creator/qt-creator
Rename DiffEditorFile -> DiffEditorDocument
The old name had nothing to do with a file in fact. The new name will be more appropriate for the new stuff, which will come soon. Change-Id: I17ad03dab5c643ff26e313a434ba86929a0f00c3 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "diffeditor.h"
|
||||
#include "diffeditorfile.h"
|
||||
#include "diffeditordocument.h"
|
||||
#include "diffeditorwidget.h"
|
||||
#include "diffeditorconstants.h"
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace DiffEditor {
|
||||
DiffEditor::DiffEditor(DiffEditorWidget *editorWidget)
|
||||
: IEditor(0)
|
||||
, m_toolWidget(0)
|
||||
, m_file(new Internal::DiffEditorFile(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE), this))
|
||||
, m_document(new Internal::DiffEditorDocument(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE), this))
|
||||
, m_editorWidget(editorWidget)
|
||||
, m_diffEditorController(0)
|
||||
, m_entriesComboBox(0)
|
||||
@@ -81,7 +81,7 @@ bool DiffEditor::open(QString *errorString, const QString &fileName, const QStri
|
||||
|
||||
Core::IDocument *DiffEditor::document()
|
||||
{
|
||||
return m_file;
|
||||
return m_document;
|
||||
}
|
||||
|
||||
Core::Id DiffEditor::id() const
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace DiffEditor {
|
||||
class DiffEditorWidget;
|
||||
|
||||
namespace Internal {
|
||||
class DiffEditorFile;
|
||||
class DiffEditorDocument;
|
||||
}
|
||||
|
||||
class DIFFEDITOR_EXPORT DiffEditor : public Core::IEditor
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
private:
|
||||
void updateEntryToolTip();
|
||||
|
||||
Internal::DiffEditorFile *m_file;
|
||||
Internal::DiffEditorDocument *m_document;
|
||||
DiffEditorWidget *m_editorWidget;
|
||||
DiffEditorController *m_diffEditorController;
|
||||
QComboBox *m_entriesComboBox;
|
||||
|
||||
@@ -5,8 +5,8 @@ HEADERS += diffeditor_global.h \
|
||||
diffeditor.h \
|
||||
diffeditorconstants.h \
|
||||
diffeditorcontroller.h \
|
||||
diffeditordocument.h \
|
||||
diffeditorfactory.h \
|
||||
diffeditorfile.h \
|
||||
diffeditorplugin.h \
|
||||
diffeditorwidget.h \
|
||||
differ.h \
|
||||
@@ -15,8 +15,8 @@ HEADERS += diffeditor_global.h \
|
||||
|
||||
SOURCES += diffeditor.cpp \
|
||||
diffeditorcontroller.cpp \
|
||||
diffeditordocument.cpp \
|
||||
diffeditorfactory.cpp \
|
||||
diffeditorfile.cpp \
|
||||
diffeditorplugin.cpp \
|
||||
diffeditorwidget.cpp \
|
||||
differ.cpp \
|
||||
|
||||
@@ -17,10 +17,10 @@ QtcPlugin {
|
||||
"diffeditorconstants.h",
|
||||
"diffeditorcontroller.cpp",
|
||||
"diffeditorcontroller.h",
|
||||
"diffeditordocument.cpp",
|
||||
"diffeditordocument.h",
|
||||
"diffeditorfactory.cpp",
|
||||
"diffeditorfactory.h",
|
||||
"diffeditorfile.cpp",
|
||||
"diffeditorfile.h",
|
||||
"diffeditorplugin.cpp",
|
||||
"diffeditorplugin.h",
|
||||
"diffeditorwidget.cpp",
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "diffeditorfile.h"
|
||||
#include "diffeditordocument.h"
|
||||
#include "diffeditorconstants.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
@@ -37,7 +37,7 @@ namespace Internal {
|
||||
|
||||
///////////////////////////////// DiffFile //////////////////////////////////
|
||||
|
||||
DiffEditorFile::DiffEditorFile(const QString &mimeType, QObject *parent) :
|
||||
DiffEditorDocument::DiffEditorDocument(const QString &mimeType, QObject *parent) :
|
||||
Core::IDocument(parent),
|
||||
m_mimeType(mimeType)
|
||||
{
|
||||
@@ -45,13 +45,13 @@ DiffEditorFile::DiffEditorFile(const QString &mimeType, QObject *parent) :
|
||||
setTemporary(true);
|
||||
}
|
||||
|
||||
bool DiffEditorFile::setContents(const QByteArray &contents)
|
||||
bool DiffEditorDocument::setContents(const QByteArray &contents)
|
||||
{
|
||||
Q_UNUSED(contents);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DiffEditorFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
bool DiffEditorDocument::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||
{
|
||||
Q_UNUSED(errorString)
|
||||
Q_UNUSED(fileName)
|
||||
@@ -59,19 +59,19 @@ bool DiffEditorFile::save(QString *errorString, const QString &fileName, bool au
|
||||
return false;
|
||||
}
|
||||
|
||||
QString DiffEditorFile::mimeType() const
|
||||
QString DiffEditorDocument::mimeType() const
|
||||
{
|
||||
return m_mimeType;
|
||||
}
|
||||
|
||||
Core::IDocument::ReloadBehavior DiffEditorFile::reloadBehavior(ChangeTrigger state, ChangeType type) const
|
||||
Core::IDocument::ReloadBehavior DiffEditorDocument::reloadBehavior(ChangeTrigger state, ChangeType type) const
|
||||
{
|
||||
Q_UNUSED(state)
|
||||
Q_UNUSED(type)
|
||||
return BehaviorSilent;
|
||||
}
|
||||
|
||||
bool DiffEditorFile::reload(QString *errorString, ReloadFlag flag, ChangeType type)
|
||||
bool DiffEditorDocument::reload(QString *errorString, ReloadFlag flag, ChangeType type)
|
||||
{
|
||||
Q_UNUSED(errorString)
|
||||
Q_UNUSED(flag)
|
||||
@@ -27,8 +27,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef DIFFEDITORFILE_H
|
||||
#define DIFFEDITORFILE_H
|
||||
#ifndef DIFFEDITORDOCUMENT_H
|
||||
#define DIFFEDITORDOCUMENT_H
|
||||
|
||||
#include "diffeditor_global.h"
|
||||
|
||||
@@ -38,11 +38,11 @@ namespace DiffEditor {
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DiffEditorFile : public Core::IDocument
|
||||
class DiffEditorDocument : public Core::IDocument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DiffEditorFile(const QString &mimeType,
|
||||
explicit DiffEditorDocument(const QString &mimeType,
|
||||
QObject *parent = 0);
|
||||
|
||||
bool setContents(const QByteArray &contents);
|
||||
@@ -63,4 +63,4 @@ private:
|
||||
} // namespace Internal
|
||||
} // namespace DiffEditor
|
||||
|
||||
#endif // DIFFEDITOREDITABLE_H
|
||||
#endif // DIFFEDITORDOCUMENT_H
|
||||
Reference in New Issue
Block a user