Partial implementation of QmlFileEngine::fileName()
authorMohammed Sameer <msameer@foolab.org>
Fri, 26 Jul 2013 00:01:31 +0000 (03:01 +0300)
committerMohammed Sameer <msameer@foolab.org>
Fri, 26 Jul 2013 00:01:31 +0000 (03:01 +0300)
Nemo Qt won't load qml files other than main.qml without that

src/qmlfileengine.cpp

index e9262b7..1656f42 100644 (file)
@@ -200,7 +200,12 @@ bool QmlFileEngine::setPermissions(uint perms) {
 }
 
 QString QmlFileEngine::fileName(QAbstractFileEngine::FileName file) const {
-  Q_UNUSED(file);
+  switch (file) {
+  case QAbstractFileEngine::AbsoluteName:
+    return m_res->fileName();
+  default:
+    break;
+  }
 
   // TODO:
   return QString();