connect(m_d->image.data(), SIGNAL(sigImageModified()), this, SLOT(setModified())) not called if opening a jpeg
Boudewijn Rempt
boud at valdyas.org
Tue Dec 15 09:01:11 CET 2009
On Tuesday 15 December 2009, Adam wrote:
> Hi,
> while doing the AutoSave junior job i noticed, that it doesn't work, if
> opening a jpeg. I've investigated this now, but don't know, how to resolve
> it in a clean way.
Hm... I think, but this pure conjecture at this stage, that it is because we
don't want to autosave non-native files in their non-native format.
> This is, what i've found out:
> the method "bool KoDocument::openFile() {}" calls
> "loadNativeFormat(importedFile) (File KoDocument.cpp line 1279)" only, if
> it is a native .kra image (without filters, or at least not with the jpeg
> filter)
>
>
> "bool KoDocument::loadNativeFormat(const QString & file_) {}" in turn
> calls somehow "bool KisDoc2::completeLoading(KoStore *store) {}" which
> does "connect(m_d->image.data(), SIGNAL(sigImageModified()), this,
> SLOT(setModified()))";
>
> this connection is vital for the AutoSave and maybe other current or
> future features.
Getting the connection set is easy enough, I've added that to setCurrentImage,
which gets called from the filters. I've also tested a bit and found that
autosaving now seems to work correctly, with one slight problem: krita doesn't
automatically recognize .autosave files as native format. But apart from that,
it all works now. I'll commit for you.
Btw -- if you mail me your full name, I can add you to the about dialog :-)
--
Boudewijn Rempt | http://www.valdyas.org
More information about the kimageshop
mailing list