forked from qt-creator/qt-creator
Remove unneeded stuff
Change-Id: I2771765bd331e81e09141a2f3088fb364d4bf90d Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -39,8 +39,7 @@ namespace Internal {
|
|||||||
|
|
||||||
DiffEditorFile::DiffEditorFile(const QString &mimeType, QObject *parent) :
|
DiffEditorFile::DiffEditorFile(const QString &mimeType, QObject *parent) :
|
||||||
Core::IDocument(parent),
|
Core::IDocument(parent),
|
||||||
m_mimeType(mimeType),
|
m_mimeType(mimeType)
|
||||||
m_modified(false)
|
|
||||||
{
|
{
|
||||||
setDisplayName(QCoreApplication::translate("DiffEditor", Constants::DIFF_EDITOR_DISPLAY_NAME));
|
setDisplayName(QCoreApplication::translate("DiffEditor", Constants::DIFF_EDITOR_DISPLAY_NAME));
|
||||||
setTemporary(true);
|
setTemporary(true);
|
||||||
@@ -52,21 +51,12 @@ bool DiffEditorFile::setContents(const QByteArray &contents)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiffEditorFile::setModified(bool modified)
|
|
||||||
{
|
|
||||||
if (m_modified == modified)
|
|
||||||
return;
|
|
||||||
m_modified = modified;
|
|
||||||
emit changed();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DiffEditorFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
bool DiffEditorFile::save(QString *errorString, const QString &fileName, bool autoSave)
|
||||||
{
|
{
|
||||||
emit saveMe(errorString, fileName, autoSave);
|
Q_UNUSED(errorString)
|
||||||
if (!errorString->isEmpty())
|
Q_UNUSED(fileName)
|
||||||
|
Q_UNUSED(autoSave)
|
||||||
return false;
|
return false;
|
||||||
emit changed();
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DiffEditorFile::mimeType() const
|
QString DiffEditorFile::mimeType() const
|
||||||
@@ -86,7 +76,7 @@ bool DiffEditorFile::reload(QString *errorString, ReloadFlag flag, ChangeType ty
|
|||||||
Q_UNUSED(errorString)
|
Q_UNUSED(errorString)
|
||||||
Q_UNUSED(flag)
|
Q_UNUSED(flag)
|
||||||
Q_UNUSED(type)
|
Q_UNUSED(type)
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -36,9 +36,6 @@
|
|||||||
|
|
||||||
namespace DiffEditor {
|
namespace DiffEditor {
|
||||||
|
|
||||||
class DiffEditorWidget;
|
|
||||||
class DiffEditorFile;
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DiffEditorFile : public Core::IDocument
|
class DiffEditorFile : public Core::IDocument
|
||||||
@@ -52,21 +49,15 @@ public:
|
|||||||
QString defaultPath() const { return QString(); }
|
QString defaultPath() const { return QString(); }
|
||||||
QString suggestedFileName() const { return QString(); }
|
QString suggestedFileName() const { return QString(); }
|
||||||
|
|
||||||
bool isModified() const { return m_modified; }
|
bool isModified() const { return false; }
|
||||||
QString mimeType() const;
|
QString mimeType() const;
|
||||||
bool isSaveAsAllowed() const { return false; }
|
bool isSaveAsAllowed() const { return false; }
|
||||||
bool save(QString *errorString, const QString &fileName, bool autoSave);
|
bool save(QString *errorString, const QString &fileName, bool autoSave);
|
||||||
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
|
ReloadBehavior reloadBehavior(ChangeTrigger state, ChangeType type) const;
|
||||||
bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
|
bool reload(QString *errorString, ReloadFlag flag, ChangeType type);
|
||||||
|
|
||||||
void setModified(bool modified = true);
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void saveMe(QString *errorString, const QString &fileName, bool autoSave);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const QString m_mimeType;
|
const QString m_mimeType;
|
||||||
bool m_modified;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user