equal
deleted
inserted
replaced
273 |
273 |
274 \sa operator!=(), contains() |
274 \sa operator!=(), contains() |
275 */ |
275 */ |
276 bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const |
276 bool QProcessEnvironment::operator==(const QProcessEnvironment &other) const |
277 { |
277 { |
278 return d->hash == other.d->hash; |
278 return d == other.d || (d && other.d && d->hash == other.d->hash); |
279 } |
279 } |
280 |
280 |
281 /*! |
281 /*! |
282 Returns true if this QProcessEnvironment object is empty: that is |
282 Returns true if this QProcessEnvironment object is empty: that is |
283 there are no key=value pairs set. |
283 there are no key=value pairs set. |
332 |
332 |
333 \sa contains(), remove(), value() |
333 \sa contains(), remove(), value() |
334 */ |
334 */ |
335 void QProcessEnvironment::insert(const QString &name, const QString &value) |
335 void QProcessEnvironment::insert(const QString &name, const QString &value) |
336 { |
336 { |
|
337 // d detaches from null |
337 d->hash.insert(prepareName(name), prepareValue(value)); |
338 d->hash.insert(prepareName(name), prepareValue(value)); |
338 } |
339 } |
339 |
340 |
340 /*! |
341 /*! |
341 Removes the environment variable identified by \a name from this |
342 Removes the environment variable identified by \a name from this |