git-svn-id: file:///svnroot/family-shop-mgr@15 26eb2498-383b-47a6-be48-5d6f36779e85
[family-shop-mgr] / code / family-shop-mgr / ShoppingTreeModel.cpp
index 1d0120d..20852e4 100644 (file)
@@ -23,6 +23,7 @@
 \r
 #include "ShoppingTreeItem.h"\r
 #include <QFile>\r
+#include <QApplication>\r
 #include <QtGui>\r
 \r
 ShoppingTreeModel::ShoppingTreeModel(const QString &xmlFileName,\r
@@ -33,7 +34,7 @@ QAbstractItemModel(parent), m_document("ShoppingList")
     int errLine;\r
     int errColumn;\r
 \r
-    m_xmlFileName = xmlFileName;\r
+    m_xmlFileName = QApplication::applicationDirPath() + "/" + xmlFileName;\r
     QFile file(m_xmlFileName);\r
     if(!file.open(QIODevice::ReadOnly))\r
         return;\r