Skip to content

Commit

Permalink
Replace depreciated auto_ptr with QScopedPointer.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-kristjansson committed Dec 20, 2012
1 parent f685449 commit 922daba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mythtv/programs/mythfrontend/videolist.cpp
@@ -1,8 +1,8 @@
#include <memory> // for std::auto_ptr
#include <algorithm>
#include <iterator>
#include <map>

#include <QScopedPointer>
#include <QFileInfo>
#include <QList>

Expand Down Expand Up @@ -430,7 +430,7 @@ class VideoListImp

MythGenericTree *GetTreeRoot()
{
return video_tree_root.get();
return video_tree_root.data();
}

void InvalidateCache() {
Expand Down Expand Up @@ -460,7 +460,7 @@ class VideoListImp
bool m_ListUnknown;
bool m_LoadMetaData;

std::auto_ptr<MythGenericTree> video_tree_root;
QScopedPointer <MythGenericTree> video_tree_root;

VideoMetadataListManager m_metadata;
meta_dir_node m_metadata_tree; // master list for tree views
Expand Down Expand Up @@ -645,18 +645,18 @@ MythGenericTree *VideoListImp::buildVideoList(bool filebrowser, bool flatlist,
video_tree_root.reset(new MythGenericTree(QObject::tr("Video Home"),
kRootNode, false));

build_generic_tree(video_tree_root.get(), &m_metadata_view_tree,
build_generic_tree(video_tree_root.data(), &m_metadata_view_tree,
include_updirs);

if (m_metadata_view_flat.empty())
{
video_tree_root.reset(new MythGenericTree(QObject::tr("Video Home"),
kRootNode, false));
video_tree_root.get()->addNode(QObject::tr("No files found"),
video_tree_root.data()->addNode(QObject::tr("No files found"),
kNoFilesFound, false);
}

return video_tree_root.get();
return video_tree_root.data();
}

bool VideoListImp::refreshNode(MythGenericTree *node)
Expand Down

0 comments on commit 922daba

Please sign in to comment.