forked from qt-creator/qt-creator
API: temporaryEditor --> isTemporary
Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
This commit is contained in:
@@ -278,7 +278,7 @@ public:
|
||||
|
||||
QToolBar *toolBar() { return m_toolBar; }
|
||||
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
signals:
|
||||
void changed();
|
||||
|
||||
@@ -1014,7 +1014,7 @@ void EditorManager::addEditor(IEditor *editor, bool isDuplicate)
|
||||
m_d->m_editorModel->addEditor(editor, isDuplicate);
|
||||
if (!isDuplicate) {
|
||||
m_d->m_core->fileManager()->addFile(editor->file());
|
||||
if (!editor->temporaryEditor()) {
|
||||
if (!editor->isTemporary()) {
|
||||
m_d->m_core->fileManager()->addToRecentFiles(editor->file()->fileName());
|
||||
}
|
||||
}
|
||||
@@ -1281,7 +1281,7 @@ bool EditorManager::saveFile(IEditor *editor)
|
||||
m_d->m_core->fileManager()->unblockFileChange(file);
|
||||
}
|
||||
|
||||
if (success && !editor->temporaryEditor())
|
||||
if (success && !editor->isTemporary())
|
||||
m_d->m_core->fileManager()->addToRecentFiles(editor->file()->fileName());
|
||||
|
||||
return success;
|
||||
@@ -1376,7 +1376,7 @@ bool EditorManager::saveFileAs(IEditor *editor)
|
||||
m_d->m_core->fileManager()->unblockFileChange(editor->file());
|
||||
editor->file()->checkPermissions();
|
||||
|
||||
if (success && !editor->temporaryEditor())
|
||||
if (success && !editor->isTemporary())
|
||||
m_d->m_core->fileManager()->addToRecentFiles(editor->file()->fileName());
|
||||
|
||||
updateActions();
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
virtual int currentLine() const { return 0; }
|
||||
virtual int currentColumn() const { return 0; }
|
||||
|
||||
virtual bool temporaryEditor() const = 0;
|
||||
virtual bool isTemporary() const = 0;
|
||||
|
||||
virtual QToolBar *toolBar() = 0;
|
||||
|
||||
|
||||
@@ -897,6 +897,7 @@ bool MainWindow::showOptionsDialog(const QString &category,
|
||||
|
||||
void MainWindow::saveAll()
|
||||
{
|
||||
bool success;
|
||||
m_fileManager->saveModifiedFiles(m_fileManager->modifiedFiles());
|
||||
emit m_coreImpl->saveSettingsRequested();
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
const char *kind() const;
|
||||
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
private:
|
||||
QList<int> m_context;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
QToolBar *toolBar();
|
||||
QByteArray saveState() const;
|
||||
bool restoreState(const QByteArray &state);
|
||||
virtual bool temporaryEditor() const { return false; }
|
||||
virtual bool isTemporary() const { return false; }
|
||||
|
||||
// ContextInterface
|
||||
virtual QList<int> context() const;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
const char *kind() const;
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
private:
|
||||
QList<int> m_context;
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
virtual bool duplicateSupported() const;
|
||||
virtual Core::IEditor *duplicate(QWidget *parent);
|
||||
|
||||
virtual bool temporaryEditor() const { return false; }
|
||||
virtual bool isTemporary() const { return false; }
|
||||
|
||||
private:
|
||||
QList<int> m_context;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
virtual bool duplicateSupported() const;
|
||||
virtual Core::IEditor *duplicate(QWidget *parent);
|
||||
virtual bool temporaryEditor() const { return false; }
|
||||
virtual bool isTemporary() const { return false; }
|
||||
|
||||
private:
|
||||
QList<int> m_context;
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
const char *kind() const;
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
private:
|
||||
QList<int> m_context;
|
||||
};
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
const char *kind() const;
|
||||
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
private:
|
||||
QList<int> m_context;
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
QWidget *widget();
|
||||
|
||||
void setSuggestedFileName(const QString &fileName);
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
|
||||
private slots:
|
||||
void dirtyChanged(bool);
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
bool duplicateSupported() const { return true; }
|
||||
Core::IEditor *duplicate(QWidget *parent);
|
||||
const char *kind() const;
|
||||
bool temporaryEditor() const { return false; }
|
||||
bool isTemporary() const { return false; }
|
||||
private:
|
||||
QList<int> m_context;
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
Core::IEditor *duplicate(QWidget * /*parent*/) { return 0; }
|
||||
const char *kind() const { return m_kind; }
|
||||
|
||||
bool temporaryEditor() const { return true; }
|
||||
bool isTemporary() const { return true; }
|
||||
|
||||
private:
|
||||
const char *m_kind;
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
virtual QToolBar *toolBar() { return m_toolBar; }
|
||||
QComboBox *diffFileBrowseComboBox() const { return m_diffFileBrowseComboBox; }
|
||||
|
||||
bool temporaryEditor() const { return true; }
|
||||
bool isTemporary() const { return true; }
|
||||
|
||||
private:
|
||||
QComboBox *m_diffFileBrowseComboBox;
|
||||
|
||||
@@ -159,7 +159,7 @@ public:
|
||||
// be restricted to them
|
||||
static QStringList currentProjectFiles(bool nativeSeparators, QString *name = 0);
|
||||
|
||||
virtual bool temporaryEditor() const { return true; }
|
||||
virtual bool isTemporary() const { return true; }
|
||||
|
||||
// Helper to raise an already open submit editor to prevent opening twice.
|
||||
static bool raiseSubmitEditor();
|
||||
|
||||
Reference in New Issue
Block a user