Commit 8668fb77 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

Check QMLType when adding new QML files to project to prevent error message being shown

Change-Id: I68df3c69b535d47109bfb94c3089fd78e8b3683d
Reviewed-on: http://codereview.qt.nokia.com/514

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 7c90a351
......@@ -174,6 +174,7 @@ const char * const C_HEADER_MIMETYPE = "text/x-chdr";
const char * const CPP_SOURCE_MIMETYPE = "text/x-c++src";
const char * const CPP_HEADER_MIMETYPE = "text/x-c++hdr";
const char * const FORM_MIMETYPE = "application/x-designer";
const char * const QML_MIMETYPE = "application/x-qml";
const char * const RESOURCE_MIMETYPE = "application/vnd.nokia.xml.qt.resource";
// settings page
......
......@@ -754,5 +754,7 @@ FileType typeForFileName(const Core::MimeDatabase *db, const QFileInfo &file)
return ResourceType;
if (typeName == QLatin1String(Constants::FORM_MIMETYPE))
return FormType;
if (typeName == QLatin1String(Constants::QML_MIMETYPE))
return QMLType;
return UnknownFileType;
}
......@@ -213,7 +213,7 @@ QString FileFilterBaseItem::absoluteDir() const
absoluteDir = m_defaultDir + QLatin1Char('/') + m_rootDir;
}
return absoluteDir;
return QDir::cleanPath(absoluteDir);
}
void FileFilterBaseItem::updateFileList()
......
......@@ -1187,6 +1187,7 @@ QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type)
vars << QLatin1String("SUBDIRS");
break;
case ProjectExplorer::QMLType:
vars << QLatin1String("OTHER_FILES");
break;
default:
vars << QLatin1String("OTHER_FILES");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment