From 8cca696d8fc9891589e02f0be8bb820af717956c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 18 May 2016 15:16:02 +0200 Subject: 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 --- src/lib/corelib/language/moduleloader.cpp | 2 +- tests/auto/blackbox/tst_blackbox.cpp | 1 - 2 files changed, 1 insertion(+), 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); } -- cgit v1.2.3