diff options
author | kh1 <karsten.heimrich@nokia.com> | 2011-11-24 00:15:31 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@nokia.com> | 2011-11-24 15:21:09 +0100 |
commit | 5c5555e349a71813ff650d96964556d490bbacbf (patch) | |
tree | fd5b086d1624f837859f515d4b14454884fcb75f /installerbuilder | |
parent | f55054ddddeecfdb28c233d42c07755667a0934c (diff) |
Fix warning about initialization order. Use scoped pointer.
Change-Id: I1ea34adb934d1aa1888741a3eda20026bac210dd
Reviewed-by: Tim Jenssen <tim.jenssen@nokia.com>
Diffstat (limited to 'installerbuilder')
-rw-r--r-- | installerbuilder/libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/installerbuilder/libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp index f489cc2f7..591971c5f 100644 --- a/installerbuilder/libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp +++ b/installerbuilder/libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp @@ -564,15 +564,15 @@ class OpenArchiveInfo { private: OpenArchiveInfo(QIODevice* device) - : codecs(new CCodecs), - stream(new QIODeviceInStream(device)) + : codecs(new CCodecs) { throwIfNotOK(codecs->Load(), QObject::tr("Could not load codecs")); if (!codecs->FindFormatForArchiveType(L"", formatIndices)) throw SevenZipException(QObject::tr("Could not retrieve default format")); - throwIfNotOK(archiveLink.Open2(codecs.get(), formatIndices, false, stream, UString(), 0), + stream = new QIODeviceInStream(device); + throwIfNotOK(archiveLink.Open2(codecs.data(), formatIndices, false, stream, UString(), 0), QObject::tr("Could not open archive")); if (archiveLink.Arcs.Size() == 0) throw SevenZipException(QObject::tr("No CArc found")); @@ -608,8 +608,8 @@ public: private: CIntVector formatIndices; - CMyComPtr< IInStream > stream; - std::auto_ptr< CCodecs > codecs; + CMyComPtr<IInStream> stream; + QScopedPointer<CCodecs> codecs; OpenArchiveInfoCleaner *m_cleaner; static QMutex m_mutex; |