[Okular-devel] Review Request 124027: s/auto_ptr/unique_ptr/

Alexander Potashev aspotashev at gmail.com
Sat Jul 18 23:24:45 UTC 2015



> On Июль 12, 2015, 2:24 п.п., Albert Astals Cid wrote:
> > > Okular is being built in C++11 mode anyway
> > 
> > Is it? Can you point me where we enable that?

C++11 is enabled in extra-cmake-modules/kde-modules/KDECompilerSettings.cmake (see line "set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")"), included by e-c-m/kde-modules/KDEFrameworkCompilerSettings.cmake, included by okular/CMakeLists.txt.


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124027/#review82383
-----------------------------------------------------------


On Июнь 8, 2015, 8:59 д.п., Jan Kundrát wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124027/
> -----------------------------------------------------------
> 
> (Updated Июнь 8, 2015, 8:59 д.п.)
> 
> 
> Review request for Okular.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> The old auto_ptr was used for simple RAII. None of the auto_ptr flaws
> were apparent in that context, but given that that class is actively
> deprecated and that compilers warn about its use, it's better to switch
> to its drop-in replacement.
> 
> My reason for not using QScopedPointer is that the C++11 version works
> well enough, Okular is being built in C++11 mode anyway, unique_ptr
> works on the KF5-minimal-mandated-compilers according to their docs, and
> therefore there's no point in using something with a different API
> (QScopedPointer) just because its name begins with a Q.
> 
> 
> Diffs
> -----
> 
>   core/document.cpp 9d1248871a495100b055157b2b18d6b9a7c5f103 
>   generators/comicbook/directory.cpp ec023b37ffa1b12bf91e954fdfea5dbdf9d50b0c 
>   generators/comicbook/unrar.cpp 10cda631d885e235c04aa3772f9f542fa2ed2b5c 
>   part.cpp 5b03e56e194bf84a9f02ceaf94cad13526715157 
>   ui/guiutils.cpp 3bf3ad64b57396792c3aa33298265561ee35ed1a 
> 
> Diff: https://git.reviewboard.kde.org/r/124027/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jan Kundrát
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20150718/248e8267/attachment.html>


More information about the Okular-devel mailing list