forked from qt-creator/qt-creator
Make document model static and add some document related methods
Change-Id: Ibcb863e67a2433529c9d2b6dec237f9d8b1d8d50 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -281,14 +281,14 @@ void QmlProjectRunConfiguration::updateEnabled()
|
||||
{
|
||||
bool qmlFileFound = false;
|
||||
if (mainScriptSource() == FileInEditor) {
|
||||
Core::IEditor *editor = Core::EditorManager::currentEditor();
|
||||
Core::IDocument *document= Core::EditorManager::currentDocument();
|
||||
Core::MimeDatabase *db = ICore::mimeDatabase();
|
||||
if (editor) {
|
||||
m_currentFileFilename = editor->document()->filePath();
|
||||
if (document) {
|
||||
m_currentFileFilename = document->filePath();
|
||||
if (db->findByFile(mainScript()).type() == QLatin1String("application/x-qml"))
|
||||
qmlFileFound = true;
|
||||
}
|
||||
if (!editor
|
||||
if (!document
|
||||
|| db->findByFile(mainScript()).type() == QLatin1String("application/x-qmlproject")) {
|
||||
// find a qml file with lowercase filename. This is slow, but only done
|
||||
// in initialization/other border cases.
|
||||
|
||||
Reference in New Issue
Block a user