Avoid access to ImageDB::instance() from within Database constructor.

Authored by johanneszarl on Jan 3 2019, 8:06 PM.

Description

Avoid access to ImageDB::instance() from within Database constructor.

This commit does the following things (not ideal, but I currently don't
intend working on it any further):

  1. delay merging the duplicate image infos until all images have been

read (i.e. prevent inconsistencies when merging stacks)

  1. move ImageInfo::merge() into XMLDB (preventing the need to access the

ImageDB singleton before it's initialized)

  1. Avoid any direct or indirect access to ImageInfo::instance in the

whole of XMLDB::Database (especially in the stack manipulation methods),
so that it is safe to call them during construction.

Probably I still overlooked something because with my test data the
stack merging spiraly into an out-of-memory situation.

Details

Committed
johanneszarlJan 3 2019, 8:06 PM
Parents
R463:207b908bfe1b: Add warning if ImageDB is uninitialized.
Branches
Unknown
Tags
Unknown
References
feature/fixDuplicatesDialog