Problems with KFilterDev::deviceForFile method in a KF5 based application

Arnold Dumas contact at arnolddumas.fr
Sun Jul 27 18:22:14 UTC 2014


Hello,

I'm porting massif-visualizer to Frameworks 5 libs and I'm facing a 
problem. Basically massif-visualizer is about loading a file generated 
by massif (from the Valgrind tools) and then displaying nice graphs. The 
application can handle both plain-text file and gzipped ones.

In the KDE4 version, the files were loaded with 
KFilterDev::deviceForFile method, but when switching to KF5, only gziped 
files are correctly loaded. The plain-text files loading ends up with a 
parser issue.

Right now, the file loading is done this way:
QScopedPointer<QIODevice> device(KFilterDev::deviceForFile(file));

But if I just do:
QScopedPointer<QIODevice> device(new QFile(file));

then plain-text files are loaded correctly, but gziped ones aren't, wich 
is totally fine in this case.

I've tried to replace this by:
QScopedPointer<QIODevice> device(new KFilterDev(file));

but it still only load gziped files and not plain-text ones.

Does anybody knows what could be wrong here?

If anybody got enough time to reproduce the issue, the repo is 
massif-visualizer/frameworks, and the issue is located in the 
parseworker.cpp file line 64.

PS: Please CC me, I didn't suscribed to the list.


Thanks,
Arnold

-- 
Arnold Dumas
http://arnolddumas.fr


More information about the Kde-frameworks-devel mailing list