diff options
author | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-05-11 17:21:14 +0000 |
---|---|---|
committer | Nicolas Pennequin <nicolas.pennequin@free.fr> | 2008-05-11 17:21:14 +0000 |
commit | 9c54187678281077b8700c1c107f54a0b40d7050 (patch) | |
tree | b07061b11477bfbdfddaa52bee43f4993167dbc0 /rbutil/rbutilqt/rbzip.cpp | |
parent | 850c4f98baecf3d3c28e916927d15d3bbd0cd502 (diff) | |
download | rockbox-9c54187678281077b8700c1c107f54a0b40d7050.tar.gz rockbox-9c54187678281077b8700c1c107f54a0b40d7050.zip |
Set svn:eol-style on files from the rbutil directory and its subdirectories.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17462 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbzip.cpp')
-rw-r--r-- | rbutil/rbutilqt/rbzip.cpp | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/rbutil/rbutilqt/rbzip.cpp b/rbutil/rbutilqt/rbzip.cpp index 9a1064d823..23abef89b9 100644 --- a/rbutil/rbutilqt/rbzip.cpp +++ b/rbutil/rbutilqt/rbzip.cpp | |||
@@ -1,67 +1,67 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | * __________ __ ___. | 2 | * __________ __ ___. |
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
7 | * \/ \/ \/ \/ \/ | 7 | * \/ \/ \/ \/ \/ |
8 | * | 8 | * |
9 | * Copyright (C) 2008 by Dominik Wenger | 9 | * Copyright (C) 2008 by Dominik Wenger |
10 | * $Id: rbzip.cpp 17129 2008-04-15 21:25:57Z bluebrother $ | 10 | * $Id: rbzip.cpp 17129 2008-04-15 21:25:57Z bluebrother $ |
11 | * | 11 | * |
12 | * All files in this archive are subject to the GNU General Public License. | 12 | * All files in this archive are subject to the GNU General Public License. |
13 | * See the file COPYING in the source tree root for full license agreement. | 13 | * See the file COPYING in the source tree root for full license agreement. |
14 | * | 14 | * |
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | 15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include "rbzip.h" | 20 | #include "rbzip.h" |
21 | #include <QtCore> | 21 | #include <QtCore> |
22 | 22 | ||
23 | 23 | ||
24 | Zip::ErrorCode RbZip::createZip(QString zip,QString dir,ProgressloggerInterface *dp) | 24 | Zip::ErrorCode RbZip::createZip(QString zip,QString dir,ProgressloggerInterface *dp) |
25 | { | 25 | { |
26 | m_logger = dp; | 26 | m_logger = dp; |
27 | Zip::ErrorCode error = Ok; | 27 | Zip::ErrorCode error = Ok; |
28 | m_curEntry = 1; | 28 | m_curEntry = 1; |
29 | int numEntrys=0; | 29 | int numEntrys=0; |
30 | 30 | ||
31 | m_logger->addItem(tr("Creating Backup: %1").arg(zip),LOGINFO); | 31 | m_logger->addItem(tr("Creating Backup: %1").arg(zip),LOGINFO); |
32 | QCoreApplication::processEvents(); | 32 | QCoreApplication::processEvents(); |
33 | 33 | ||
34 | // get number of entrys in dir | 34 | // get number of entrys in dir |
35 | QDirIterator it(dir, QDirIterator::Subdirectories); | 35 | QDirIterator it(dir, QDirIterator::Subdirectories); |
36 | while (it.hasNext()) | 36 | while (it.hasNext()) |
37 | { | 37 | { |
38 | it.next(); | 38 | it.next(); |
39 | numEntrys++; | 39 | numEntrys++; |
40 | QCoreApplication::processEvents(); | 40 | QCoreApplication::processEvents(); |
41 | } | 41 | } |
42 | m_logger->setProgressMax(numEntrys); | 42 | m_logger->setProgressMax(numEntrys); |
43 | 43 | ||
44 | //! create zip | 44 | //! create zip |
45 | error = Zip::createArchive(zip); | 45 | error = Zip::createArchive(zip); |
46 | if(error != Ok) | 46 | if(error != Ok) |
47 | return error; | 47 | return error; |
48 | 48 | ||
49 | //! add the content | 49 | //! add the content |
50 | error = Zip::addDirectory(dir); | 50 | error = Zip::addDirectory(dir); |
51 | if(error != Ok) | 51 | if(error != Ok) |
52 | return error; | 52 | return error; |
53 | 53 | ||
54 | //! close zip | 54 | //! close zip |
55 | error = Zip::closeArchive(); | 55 | error = Zip::closeArchive(); |
56 | 56 | ||
57 | return error; | 57 | return error; |
58 | } | 58 | } |
59 | 59 | ||
60 | void RbZip::progress() | 60 | void RbZip::progress() |
61 | { | 61 | { |
62 | m_curEntry++; | 62 | m_curEntry++; |
63 | m_logger->setProgressValue(m_curEntry); | 63 | m_logger->setProgressValue(m_curEntry); |
64 | QCoreApplication::processEvents(); // update UI | 64 | QCoreApplication::processEvents(); // update UI |
65 | } | 65 | } |
66 | 66 | ||
67 | 67 | ||