aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-05-18 15:16:02 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2016-05-18 13:52:06 +0000
commit8cca696d8fc9891589e02f0be8bb820af717956c (patch)
tree7ed294d68cb7f33a7ffa4950758ea9aa21aa3b7d
parenta5a86be33655b8d929cedebe7be7408a8c0fd727 (diff)
Clone values when copying them from Export items.
Otherwise all importing products share the same export scope in the end. Task-number: QBS-977 Change-Id: I453dd48c17786e50e982b5e0369434b1108705cc Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/lib/corelib/language/moduleloader.cpp2
-rw-r--r--tests/auto/blackbox/tst_blackbox.cpp1
2 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/corelib/language/moduleloader.cpp b/src/lib/corelib/language/moduleloader.cpp
index 8596c6199..72ac707e6 100644
--- a/src/lib/corelib/language/moduleloader.cpp
+++ b/src/lib/corelib/language/moduleloader.cpp
@@ -1425,7 +1425,7 @@ static void copyPropertiesFromExportItem(const Item *src, Item *dst)
if (it.value()->type() != Value::JSSourceValueType)
continue;
QBS_CHECK(!dst->hasOwnProperty(it.key()));
- dst->setProperty(it.key(), it.value());
+ dst->setProperty(it.key(), it.value()->clone());
}
}
diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp
index 8a3ac73de..1c8daf33c 100644
--- a/tests/auto/blackbox/tst_blackbox.cpp
+++ b/tests/auto/blackbox/tst_blackbox.cpp
@@ -3589,7 +3589,6 @@ void TestBlackbox::iconsetApp()
void TestBlackbox::importingProduct()
{
QDir::setCurrent(testDataDir + "/importing-product");
- QEXPECT_FAIL(0, "QBS-977", Abort);
QCOMPARE(runQbs(), 0);
}