aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/resourceeditor/resourceeditorw.h
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-10 20:43:03 +0200
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-05-12 20:10:03 +0200
commit9ac137fb062138bc8c8f338526f94eeab96c9abc (patch)
tree4d0c86691f0c8c871cc805a2e7e91a4730b582e7 /src/plugins/resourceeditor/resourceeditorw.h
parenta14955d0fb3167436a584eaf318e5da86a4175bb (diff)
add auto-saving of modified editors
Task-number: QTCREATORBUG-2847
Diffstat (limited to 'src/plugins/resourceeditor/resourceeditorw.h')
-rw-r--r--src/plugins/resourceeditor/resourceeditorw.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/resourceeditor/resourceeditorw.h b/src/plugins/resourceeditor/resourceeditorw.h
index a5e50d902a..25c3bd7e8e 100644
--- a/src/plugins/resourceeditor/resourceeditorw.h
+++ b/src/plugins/resourceeditor/resourceeditorw.h
@@ -57,8 +57,9 @@ public:
ResourceEditorFile(ResourceEditorW *parent = 0);
//IFile
- bool save(QString *errorString, const QString &fileName = QString());
+ bool save(QString *errorString, const QString &fileName, bool autoSave);
QString fileName() const;
+ bool shouldAutoSave() const;
bool isModified() const;
bool isReadOnly() const;
bool isSaveAsAllowed() const;
@@ -85,7 +86,7 @@ public:
// IEditor
bool createNew(const QString &contents);
- bool open(QString *errorString, const QString &fileName = QString());
+ bool open(QString *errorString, const QString &fileName, const QString &realFileName);
bool duplicateSupported() const { return false; }
Core::IEditor *duplicate(QWidget *) { return 0; }
Core::IFile *file() { return m_resourceFile; }
@@ -102,6 +103,7 @@ public:
private slots:
void dirtyChanged(bool);
void onUndoStackChanged(bool canUndo, bool canRedo);
+ void setShouldAutoSave(bool sad = true) { m_shouldAutoSave = sad; }
private:
const QString m_extension;
@@ -111,6 +113,8 @@ private:
QPointer<SharedTools::QrcEditor> m_resourceEditor;
ResourceEditorFile *m_resourceFile;
ResourceEditorPlugin *m_plugin;
+ bool m_shouldAutoSave;
+ bool m_diskIo;
public:
void onUndo();