Skip to content
  • PBS's avatar
    Fix static document destruction · b9517430
    PBS authored and Marc Jeanmougin's avatar Marc Jeanmougin committed
    Fix crashes on exit due to static documents outliving FontFactory,
    which they are not allowed to do.
    * Rework the statics.h system to allow lazy initialisation of
      dependencies, and more explicit dependency registration.
    * Promote Documents in helper/stock-items.cpp to the header, since it
      must now be available for PatternManager to register a dependency on
      it. Consequently rename to StockPaintDocuments for less ambiguity.
    * Move destruction of statics from Application dtor to main(). Now that
      Application contains documents, the old place was too early.
    * Convert all existing shared_ptr<SPDocument> to unique_ptr<SPDocument>.
    * Don't derive PatternManager::Category from Glib::Object.
    * Store the static documents in SymbolsDialog using statics.h to ensure
      destruction before FontFactory.
    * Similarly for the static documents in sp_marker_load_from_svg(),
      sp_gradient_load_from_svg(), and MarkerComboBox::init_combo().
      Introduce cache_static_doc() to do this in...