[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    KFilterDev changes from KDE3
From:       Martin Koller <kollix () aon ! at>
Date:       2009-03-15 11:20:35
Message-ID: 200903151220.38934.kollix () aon ! at
[Download RAW message or body]


Hi,

I'm in the process to port kbackup from KDE3 to KDE4.
http://www.kde-apps.org/content/show.php?content=44998

Now I'm stuck with a change that happend to KFilterDev:

In KDE3 I decided somewhere in my code which compression
to use by calling KFilterBase::findFilterByMimeType().
I later used the returned filterBase pointer in the following way:

    filterBase->setDevice(&comprFile);
    KFilterDev filter(filterBase, false);
    filter.open(IO_WriteOnly);

whereby comprFile is a KTemporaryFile.

The problem ist, the constructor taking the KFilterBase is now private!

On the other hand I find the open method saying:

    /**
     * Open for reading or writing.
     * If the KFilterBase's device is not opened, it will be opened.
     */
    virtual bool open( QIODevice::OpenMode mode );

So my question: How do I set the KFilterBase here ?

The only way coming close to what I need is the method,
but this needs the mimetype again.

static QIODevice *   device (QIODevice *inDevice, const QString &mimetype, bool autoDeleteInDevice=true)

Any idea how to and why it was changed that way ?

-- 
Best regards/Schöne Grüße

Martin    ()  ascii ribbon campaign - against html mail 
          /\                        - against microsoft attachments

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic