Changeset 561 for trunk/src/gui/text/qzip.cpp
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/text/qzip.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 57 57 #undef S_IFREG 58 58 #define S_IFREG 0100000 59 # define S_ISDIR(x) ((x) & 0040000) > 0 60 # define S_ISREG(x) ((x) & 0170000) == S_IFREG 59 # ifndef S_ISDIR 60 # define S_ISDIR(x) ((x) & 0040000) > 0 61 # endif 62 # ifndef S_ISREG 63 # define S_ISREG(x) ((x) & 0170000) == S_IFREG 64 # endif 61 65 # define S_IFLNK 020000 62 66 # define S_ISLNK(x) ((x) & S_IFLNK) > 0 63 # define S_IRUSR 0400 64 # define S_IWUSR 0200 65 # define S_IXUSR 0100 67 # ifndef S_IRUSR 68 # define S_IRUSR 0400 69 # endif 70 # ifndef S_IWUSR 71 # define S_IWUSR 0200 72 # endif 73 # ifndef S_IXUSR 74 # define S_IXUSR 0100 75 # endif 66 76 # define S_IRGRP 0040 67 77 # define S_IWGRP 0020 … … 696 706 QZipReader::QZipReader(const QString &archive, QIODevice::OpenMode mode) 697 707 { 698 Q File *f = new QFile(archive);708 QScopedPointer<QFile> f(new QFile(archive)); 699 709 f->open(mode); 700 710 QZipReader::Status status; … … 712 722 } 713 723 714 d = new QZipReaderPrivate(f, /*ownDevice=*/true); 724 d = new QZipReaderPrivate(f.data(), /*ownDevice=*/true); 725 f.take(); 715 726 d->status = status; 716 727 } … … 762 773 d->scanFiles(); 763 774 QList<QZipReader::FileInfo> files; 764 for (int i = 0; d &&i < d->fileHeaders.size(); ++i) {775 for (int i = 0; i < d->fileHeaders.size(); ++i) { 765 776 QZipReader::FileInfo fi; 766 777 d->fillFileInfo(i, fi); … … 970 981 QZipWriter::QZipWriter(const QString &fileName, QIODevice::OpenMode mode) 971 982 { 972 Q File *f = new QFile(fileName);983 QScopedPointer<QFile> f(new QFile(fileName)); 973 984 f->open(mode); 974 985 QZipWriter::Status status; … … 986 997 } 987 998 988 d = new QZipWriterPrivate(f, /*ownDevice=*/true); 999 d = new QZipWriterPrivate(f.data(), /*ownDevice=*/true); 1000 f.take(); 989 1001 d->status = status; 990 1002 }
Note:
See TracChangeset
for help on using the changeset viewer.