forked from len0rd/rockbox
Code police and remove trailing whitespaces.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20590 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c52293344d
commit
76e2ce3a44
2 changed files with 13 additions and 13 deletions
|
@ -26,32 +26,32 @@ Zip::ErrorCode RbZip::createZip(QString zip,QString dir)
|
|||
Zip::ErrorCode error = Ok;
|
||||
m_curEntry = 1;
|
||||
m_numEntrys=0;
|
||||
|
||||
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
|
||||
// get number of entrys in dir
|
||||
QDirIterator it(dir, QDirIterator::Subdirectories);
|
||||
while (it.hasNext())
|
||||
while (it.hasNext())
|
||||
{
|
||||
it.next();
|
||||
m_numEntrys++;
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! create zip
|
||||
error = Zip::createArchive(zip);
|
||||
if(error != Ok)
|
||||
return error;
|
||||
|
||||
|
||||
//! add the content
|
||||
error = Zip::addDirectory(dir);
|
||||
if(error != Ok)
|
||||
return error;
|
||||
|
||||
|
||||
//! close zip
|
||||
error = Zip::closeArchive();
|
||||
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,15 +27,15 @@
|
|||
|
||||
class RbZip : public QObject, public Zip
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Q_OBJECT
|
||||
public:
|
||||
Zip::ErrorCode createZip(QString zip,QString dir);
|
||||
|
||||
virtual void progress();
|
||||
|
||||
signals:
|
||||
void zipProgress(int, int);
|
||||
|
||||
|
||||
signals:
|
||||
void zipProgress(int, int);
|
||||
|
||||
private:
|
||||
int m_curEntry;
|
||||
int m_numEntrys;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue