2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
#include "announcethread.h"
|
|
|
|
|
#include "frame.h"
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QSharedData>
|
2023-08-05 10:55:52 +02:00
|
|
|
#include <QList>
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
|
|
2011-05-18 17:05:49 +02:00
|
|
|
namespace Valgrind {
|
|
|
|
|
namespace XmlProtocol {
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
class AnnounceThread::Private : public QSharedData
|
|
|
|
|
{
|
|
|
|
|
public:
|
2018-12-10 08:11:18 +01:00
|
|
|
qint64 hThreadId = -1;
|
2023-08-05 10:55:52 +02:00
|
|
|
QList<Frame> stack;
|
2011-03-04 12:15:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
AnnounceThread::AnnounceThread()
|
|
|
|
|
: d(new Private)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-12-10 08:11:18 +01:00
|
|
|
AnnounceThread::AnnounceThread(const AnnounceThread &other) = default;
|
2011-03-04 12:15:18 +01:00
|
|
|
|
2018-12-10 08:11:18 +01:00
|
|
|
AnnounceThread::~AnnounceThread() = default;
|
2011-03-04 12:15:18 +01:00
|
|
|
|
|
|
|
|
void AnnounceThread::swap(AnnounceThread &other)
|
|
|
|
|
{
|
|
|
|
|
qSwap(d, other.d);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AnnounceThread &AnnounceThread::operator=(const AnnounceThread &other)
|
|
|
|
|
{
|
|
|
|
|
AnnounceThread tmp(other);
|
|
|
|
|
swap(tmp);
|
|
|
|
|
return *this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AnnounceThread::operator==(const AnnounceThread &other) const
|
|
|
|
|
{
|
|
|
|
|
return d->stack == other.d->stack
|
|
|
|
|
&& d->hThreadId == other.d->hThreadId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
qint64 AnnounceThread::helgrindThreadId() const
|
|
|
|
|
{
|
|
|
|
|
return d->hThreadId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AnnounceThread::setHelgrindThreadId(qint64 id)
|
|
|
|
|
{
|
|
|
|
|
d->hThreadId = id;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-05 10:55:52 +02:00
|
|
|
QList<Frame> AnnounceThread::stack() const
|
2011-03-04 12:15:18 +01:00
|
|
|
{
|
|
|
|
|
return d->stack;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-05 10:55:52 +02:00
|
|
|
void AnnounceThread::setStack(const QList<Frame> &stack)
|
2011-03-04 12:15:18 +01:00
|
|
|
{
|
|
|
|
|
d->stack = stack;
|
|
|
|
|
}
|
2011-05-18 17:05:49 +02:00
|
|
|
|
|
|
|
|
} // namespace XmlProtocol
|
|
|
|
|
} // namespace Valgrind
|