2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 Denis Mingulov
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2010-07-16 11:18:30 +02:00
|
|
|
|
|
|
|
|
#include "classviewsymbollocation.h"
|
2022-10-25 18:10:16 +02:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QHash>
|
2010-07-16 11:18:30 +02:00
|
|
|
|
|
|
|
|
namespace ClassView {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2013-05-24 17:35:14 +02:00
|
|
|
/*!
|
|
|
|
|
\class SymbolLocation
|
|
|
|
|
\brief The SymbolLocation class stores information about symbol location
|
|
|
|
|
to know the exact location to open when the user clicks on a tree item.
|
|
|
|
|
|
|
|
|
|
This class might be used in QSet and QHash.
|
|
|
|
|
*/
|
|
|
|
|
|
2010-07-16 11:18:30 +02:00
|
|
|
SymbolLocation::SymbolLocation() :
|
|
|
|
|
m_line(0),
|
|
|
|
|
m_column(0),
|
|
|
|
|
m_hash(0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-16 01:37:49 +01:00
|
|
|
SymbolLocation::SymbolLocation(const QString &file, int lineNumber, int columnNumber)
|
|
|
|
|
: m_fileName(file)
|
|
|
|
|
, m_line(lineNumber)
|
|
|
|
|
, m_column(qMax(columnNumber, 0))
|
|
|
|
|
, m_hash(qHashMulti(0, m_fileName, m_line, m_column))
|
|
|
|
|
{
|
2010-07-16 11:18:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace ClassView
|