QProcessEnvironment: add a check for inserting into self
Wasn't checked, and with all the mutex locking going on under the hood, we better rule out that there's a deadlock. Change-Id: I5a2ef1a524fb42b7840c9f3c18395cde05b7ef28 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
ef0778d097
commit
6aa89ddf5e
|
|
@ -196,6 +196,15 @@ void tst_QProcessEnvironment::insertEnv()
|
|||
QCOMPARE(e.value("Hello"), QString("Another World"));
|
||||
QCOMPARE(e.value("FOO2"), QString("bar2"));
|
||||
QCOMPARE(e.value("A2"), QString("bc2"));
|
||||
|
||||
QProcessEnvironment e3;
|
||||
e3.insert("FOO2", "bar2");
|
||||
e3.insert("A2", "bc2");
|
||||
e3.insert("Hello", "Another World");
|
||||
|
||||
e3.insert(e3); // mustn't deadlock
|
||||
|
||||
QVERIFY(e3 == e2);
|
||||
}
|
||||
|
||||
void tst_QProcessEnvironment::caseSensitivity()
|
||||
|
|
|
|||
Loading…
Reference in New Issue