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;
|
Zip::ErrorCode error = Ok;
|
||||||
m_curEntry = 1;
|
m_curEntry = 1;
|
||||||
m_numEntrys=0;
|
m_numEntrys=0;
|
||||||
|
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
|
|
||||||
// get number of entrys in dir
|
// get number of entrys in dir
|
||||||
QDirIterator it(dir, QDirIterator::Subdirectories);
|
QDirIterator it(dir, QDirIterator::Subdirectories);
|
||||||
while (it.hasNext())
|
while (it.hasNext())
|
||||||
{
|
{
|
||||||
it.next();
|
it.next();
|
||||||
m_numEntrys++;
|
m_numEntrys++;
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! create zip
|
//! create zip
|
||||||
error = Zip::createArchive(zip);
|
error = Zip::createArchive(zip);
|
||||||
if(error != Ok)
|
if(error != Ok)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
//! add the content
|
//! add the content
|
||||||
error = Zip::addDirectory(dir);
|
error = Zip::addDirectory(dir);
|
||||||
if(error != Ok)
|
if(error != Ok)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
//! close zip
|
//! close zip
|
||||||
error = Zip::closeArchive();
|
error = Zip::closeArchive();
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,15 +27,15 @@
|
||||||
|
|
||||||
class RbZip : public QObject, public Zip
|
class RbZip : public QObject, public Zip
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Zip::ErrorCode createZip(QString zip,QString dir);
|
Zip::ErrorCode createZip(QString zip,QString dir);
|
||||||
|
|
||||||
virtual void progress();
|
virtual void progress();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void zipProgress(int, int);
|
void zipProgress(int, int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_curEntry;
|
int m_curEntry;
|
||||||
int m_numEntrys;
|
int m_numEntrys;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue