How to use KArchive
Hi everyone,
I'm having trouble using the KArchive class to list the files contained in an archive. For now, I'm only trying to get it to compile, nothing more. Now, the class is virtual so I have to build a class based on it, but the constructor is being a pain somehow, so here's my derived class called Arch: Code:
//This is arch.h Code:
KArchive( QIODevice * dev ); Code:
//This is arch.c Code:
#include <qlabel.h> Code:
/home/manu/projects/kdeprojects/testkzip/src/arch.cpp: In constructor ‘Arch::Arch(QIODevice*)’: Manu |
Progress
Ok guys, there's a slight progress on my end, but still an error that I don't understand. For arch.h, see above in my first post, I changed the code in arch.cpp:
Code:
#include "arch.h" Code:
/home/manu/projects/kdeprojects/testkzip/src/arch.cpp: In constructor ‘Arch::Arch(QIODevice*)’: Any thoughts? |
Alright, I got it all done by myself, the program compiles fine and even runs, now where I'm stuck is trying to find the proper way of using the methods as well as the correct order.
I have this code running but it tells me there are no entries / files within the archive, so my guess is, I either don't open the archive properly, or I need to initialize something before attempting to collect the entries. I guarantee I have two files / pictures in my archive, I made it myself and I can preview it using ark, all is fine. The Arch object in the code snippet is my own class based on KArchive, it doesn't do anything beside forwarding everything to the KArchive methods. Code:
QFile *file = new QFile("/home/manu/Archive.tar.gz"); Code:
Opened?: 1 Any ideas? What am I doing wrong? |
All times are GMT -5. The time now is 05:21 PM. |