qt6-bb10/tests/auto/corelib/kernel/qcoreapplication
Ulf Hermann ee0fd87007 Selectively update library paths when creating QCoreApplication
We force a recreation of the library paths with added information on
construction of QCoreApplication. This way we can find plugins in
the application directory which only becomes known when
QCoreApplication is created. When the user changes the library path
we create a new list of the manually modified library paths and
recalculate it from the delta of original vs. modified paths when
QCoreApplication is created.

The upsides of this approach vs. keeping an explicit delta are:

* We don't need to introduce a separate data structure to hold
  the added/removed status for delta items or the information that
  the whole list got replaced.

* The lists never get larger than the the real library paths. An
  explicit delta would have to record all modifications.

* I don't think the delta replay algorithm we would have to do
  anyway could be made much more compact than the one this change
  introduces.

Of course, if the user actually changes anything, the list is
duplicated. Considering that this is a rarely used function and
that we would have to save some extra information anyway, I think
we can live with this.

Task-number: QTBUG-38598
Change-Id: I3bfbbd1be62dd5804dcc7ac808b053428a4e3149
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-20 15:57:07 +00:00
..
.gitignore Moving relevant tests to corelib/kernel 2011-09-01 12:42:14 +02:00
qcoreapplication.pro Add a way for auxiliary threads to handle events without CoreApp 2015-07-18 02:24:59 +00:00
tst_qcoreapplication.cpp Selectively update library paths when creating QCoreApplication 2015-07-20 15:57:07 +00:00
tst_qcoreapplication.h Selectively update library paths when creating QCoreApplication 2015-07-20 15:57:07 +00:00