Files
qt-creator/src/plugins/qmljsinspector/qmljscontextcrumblepath.cpp

36 lines
709 B
C++
Raw Normal View History

#include "qmljscontextcrumblepath.h"
#include <QMouseEvent>
#include <QDebug>
namespace QmlJSInspector {
namespace Internal {
ContextCrumblePath::ContextCrumblePath(QWidget *parent)
: CrumblePath(parent), m_isEmpty(true)
{
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
updateContextPath(QStringList());
}
ContextCrumblePath::~ContextCrumblePath()
{
}
void ContextCrumblePath::updateContextPath(const QStringList &path)
{
clear();
foreach(const QString &pathPart, path) {
pushElement(pathPart);
}
m_isEmpty = path.isEmpty();
if (m_isEmpty) {
pushElement(tr("[no context]"));
}
}
} // namespace Internal
} // namespace QmlJSInspector