[qet] qet/qet: [4794] Bug fix : crash if an embedded element haven' t got directory "import" as parent |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/qet Archives
]
Revision: 4794
Author: blacksun
Date: 2016-11-29 21:24:27 +0100 (Tue, 29 Nov 2016)
Log Message:
-----------
Bug fix : crash if an embedded element haven't got directory "import" as parent
Modified Paths:
--------------
trunk/sources/autoNum/assignvariables.cpp
Modified: trunk/sources/autoNum/assignvariables.cpp
===================================================================
--- trunk/sources/autoNum/assignvariables.cpp 2016-11-26 19:30:59 UTC (rev 4793)
+++ trunk/sources/autoNum/assignvariables.cpp 2016-11-29 20:24:27 UTC (rev 4794)
@@ -332,8 +332,9 @@
int dirLevel = -1;
//Add location name to path array
- while(current_location.parent().fileName() != "import")
+ while((current_location.parent() != current_location) && (current_location.parent().fileName() != "import"))
{
+ qDebug() << "i = " << i << " " << current_location.fileName();
i++;
path[i]=current_location.fileName();
current_location = current_location.parent();