Android bulding guide
Fernando Theirs
fntheirs at gmail.com
Tue May 9 23:30:34 UTC 2017
Hi David!
Yes, that was just a mistake when I copied some code. I could finally make
my .pro and compile the library in QtCreator.
Thanks!!
2017-05-06 6:21 GMT-03:00 David Faure <faure at kde.org>:
> On jeudi 4 mai 2017 17:19:57 CEST Fernando Theirs wrote:
> > Hi everyone!
> >
> > I'm working with Qt and I have to port a Linux application to Android.
> > Basically I need to manage some compressed files (targz, zip, among
> others)
> > and in Qt Forum they recommend me to use KArchive.
> >
> > I started working with Qt only a year ago and I'm still a rookie. I could
> > not find binaries for this library and the source code uses CMake (I was
> > expecting a .pro :/) so it's getting really hard for me to get it work.
> >
> > Asking to the same guy that recommended me the library and following his
> > indications I could compile KArchive for Linux and I'm testing it but I
> > can't understand very well the documentation.
> >
> > 1) Using KTar I could create a tar.gz with two txt files with the
> following
> > code:
> >
> > QString input = "/home/ferni/QtBuild/KArchiveTest/testTar.txt";
> > QString input2 = "/home/ferni/QtBuild/KArchiveTest/testTar2.txt";
> > QString output = "/home/ferni/QtBuild/KArchiveTest/testTar.tar.gz";
> >
> > KTar archive(output, "application/x-gzip");
> > // Prepare the archive for writing.
> > if (!archive.open(QIODevice::ReadOnly)) {
>
> Don't you mean WriteOnly here?
>
> > // Failed to open file.
> > return 1;
> > }
> >
> > // Create or open an archive
> > archive.addLocalFile(input, input);
> > archive.addLocalFile(input2, input2);
> > archive.close();
> >
> > My question is: how can I decompress the file that I created?
>
> Using KTar again, this time with ReadOnly ;-)
> See the KArchive API (base class for KTar).
>
> --
> David Faure, faure at kde.org, http://www.davidfaure.fr
> Working on KDE Frameworks 5
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170509/e783cdd9/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list