Bug 92649 - Use smart pointers in KDE4 vcl plugin
Summary: Use smart pointers in KDE4 vcl plugin
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Ryan McCoskrie
URL:
Whiteboard: target:5.1.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2015-07-09 09:34 UTC by Katarina Behrens (Inactive)
Modified: 2016-10-25 19:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Katarina Behrens (Inactive) 2015-07-09 09:34:18 UTC
Browsing through KDE4 vcl plugin code, there are few places where raw pointers are used, such as:

if (!m_image || m_image->size() != widgetRect.size())
    {
        delete m_image;
        m_image = new QImage( widgetRect.width(),

which is of course not so very nice. 

This task is about locating those places in the code and replacing them with appropriate smart pointers (std::unique_ptr will do the job, in most cases)
Comment 1 Katarina Behrens (Inactive) 2015-07-09 09:35:32 UTC
setting this new, it's easy hack after all
Comment 2 Commit Notification 2015-09-09 09:26:48 UTC
Ryan McCoskrie committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ba8cdfca4d875af0c95622c7b87a8291e130865a

tdf#92649: Converted pointers to unique_ptr's in vcl/unx/kde4

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Robinson Tryon (qubit) 2015-12-16 00:10:56 UTC Comment hidden (obsolete)