Commit 63178a55 authored by Allen Winter's avatar Allen Winter

views/collectionview/reparentingmodel.cpp - use intptr_t instead of long

as this is a type that is best capable of holding a pointer
parent cd9d66f2
......@@ -36,7 +36,6 @@ ReparentingModel::Node::Node(ReparentingModel &model)
personModel(model),
mIsSourceNode(false)
{
}
ReparentingModel::Node::Node(ReparentingModel &model, ReparentingModel::Node *p, const QModelIndex &srcIndex)
......@@ -127,7 +126,6 @@ bool ReparentingModel::Node::isDuplicateOf(const QModelIndex & /* sourceIndex */
void ReparentingModel::Node::update(const Node::Ptr &/* node */)
{
}
bool ReparentingModel::Node::isSourceNode() const
......@@ -153,7 +151,6 @@ ReparentingModel::ReparentingModel(QObject *parent)
mRootNode(*this),
mNodeManager(NodeManager::Ptr(new NodeManager(*this)))
{
}
ReparentingModel::~ReparentingModel()
......@@ -185,7 +182,7 @@ bool ReparentingModel::validateNode(const Node *node) const
qCWarning(KORGANIZER_LOG) << "nullptr" << depth;
return false;
}
if ((long)(n) < 1000) {
if ((intptr_t)(n) < 1000) {
//Detect corruptions with unlikely pointers
qCWarning(KORGANIZER_LOG) << "corrupt pointer" << depth;
return false;
......@@ -862,4 +859,3 @@ int ReparentingModel::columnCount(const QModelIndex & /* parent */) const
{
return 1;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment