Bug 483361

Summary: In Python API, fromXML does not generate valid ManagedColor when called with output of toXML
Product: [Applications] krita Reporter: Jon Bosque <jon.bosque.hernando>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: halla
Priority: NOR    
Version: 5.1.5   
Target Milestone: ---   
Platform: NixOS   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jon Bosque 2024-03-12 17:41:55 UTC
SUMMARY
```
            view = Application.activeWindow().activeView()
            qDebug(f"{color.fromXML(color.toXML()).toXML()}")
```

OBSERVED RESULT
Always generates None


EXPECTED RESULT
The same color that generated the XML is returned

SOFTWARE/OS VERSIONS
Windows: -
macOS: -
Linux/KDE Plasma: NixOS 24.05 
(available in About System)
KDE Plasma Version: -
KDE Frameworks Version: -
Qt Version: -

ADDITIONAL INFORMATION
Krita

 Version: 5.1.5
 Hidpi: true

Qt

  Version (compiled): 5.15.11
  Version (loaded): 5.15.11

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 6.6.2
  Pretty Productname: NixOS 24.05 (Uakari)
  Product Type: nixos
  Product Version: 24.05
  Desktop: none+i3

Locale

  Languages: en_US, en, en_Latn_US
  C locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=es_ES.UTF-8;LC_TIME=es_ES.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=es_ES.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=es_ES.UTF-8;LC_NAME=es_ES.UTF-8;LC_ADDRESS=es_ES.UTF-8;LC_TELEPHONE=es_ES.UTF-8;LC_MEASUREMENT=es_ES.UTF-8;LC_IDENTIFICATION=es_ES.UTF-8
  QLocale current: en
  QLocale system: en
  QTextCodec for locale: UTF-8
Comment 1 Halla Rempt 2024-03-14 09:48:43 UTC
This version of Krita is quite old. Please test with the latest appimage, and please provide a complete script for testing.