From 5c5555e349a71813ff650d96964556d490bbacbf Mon Sep 17 00:00:00 2001 From: kh1 Date: Thu, 24 Nov 2011 00:15:31 +0100 Subject: Fix warning about initialization order. Use scoped pointer. Change-Id: I1ea34adb934d1aa1888741a3eda20026bac210dd Reviewed-by: Tim Jenssen --- .../libinstaller/3rdparty/p7zip_9.04/lib7z_facade.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'installerbuilder') 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 stream; + QScopedPointer codecs; OpenArchiveInfoCleaner *m_cleaner; static QMutex m_mutex; -- cgit v1.2.3