forked from qt-creator/qt-creator
DocumentModel: Make interface static
Move item model implementation to private, adjust user code. Change-Id: Ifbe94e7c7b9b1e8be1b4c531958dbd7a9413af13 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -1083,7 +1083,7 @@ bool QmakePriFileNode::priFileWritable(const QString &path)
|
||||
bool QmakePriFileNode::saveModifiedEditors()
|
||||
{
|
||||
Core::IDocument *document
|
||||
= Core::EditorManager::documentModel()->documentForFilePath(m_projectFilePath);
|
||||
= Core::DocumentModel::documentForFilePath(m_projectFilePath);
|
||||
if (!document || !document->isModified())
|
||||
return true;
|
||||
|
||||
@@ -1250,7 +1250,7 @@ void QmakePriFileNode::save(const QStringList &lines)
|
||||
// We manually tell each editor to reload it's file.
|
||||
// (The .pro files are notified by the file system watcher.)
|
||||
QStringList errorStrings;
|
||||
Core::IDocument *document = Core::EditorManager::documentModel()->documentForFilePath(m_projectFilePath);
|
||||
Core::IDocument *document = Core::DocumentModel::documentForFilePath(m_projectFilePath);
|
||||
if (document) {
|
||||
QString errorString;
|
||||
if (!document->reload(&errorString, Core::IDocument::FlagReload, Core::IDocument::TypeContents))
|
||||
|
||||
Reference in New Issue
Block a user