forked from qt-creator/qt-creator
QmlEngine: Use QUrl::localFile() instead of checking scheme
Change-Id: I5c48b74a99b12d7e319198ec8f352ff493259df8 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
This commit is contained in:
@@ -525,8 +525,7 @@ void QmlEngine::showMessage(const QString &msg, int channel, int timeout) const
|
||||
void QmlEngine::gotoLocation(const Location &location)
|
||||
{
|
||||
const QString fileName = location.fileName();
|
||||
// TODO: QUrl::isLocalFile() once we depend on Qt 4.8
|
||||
if (QUrl(fileName).scheme().compare(QLatin1String("file"), Qt::CaseInsensitive) == 0) {
|
||||
if (QUrl(fileName).isLocalFile()) {
|
||||
// internal file from source files -> show generated .js
|
||||
QTC_ASSERT(m_sourceDocuments.contains(fileName), return);
|
||||
Core::IEditor *editor = 0;
|
||||
|
||||
Reference in New Issue
Block a user