The current initialization order is:
Create a note window
initialize child widgets
load settings during showEvent (asynchronously)
resize during show event --> this fails, because it calls noteDescriptor_->uuid().toString(), but noteDescriptor loads the uuid from the file, asynchronously. Uuid is a default value and not initialized from the note html file. --> loading from the settings fails, because uuid is 0000....
Initialization order should be:
load note html file (asynchronously)
load settings with the uuid from the file (asynchronously)
load QTextDocument (asynchronously)
create note window
initialize child widgets
The current initialization order is: Create a note window initialize child widgets load settings during showEvent (asynchronously) resize during show event --> this fails, because it calls noteDescriptor_->uuid().toString(), but noteDescriptor loads the uuid from the file, asynchronously. Uuid is a default value and not initialized from the note html file. --> loading from the settings fails, because uuid is 0000....
Initialization order should be: load note html file (asynchronously) load settings with the uuid from the file (asynchronously) load QTextDocument (asynchronously) create note window initialize child widgets