src: replaced references to NODE_FILE with call to isFile
This commit is contained in:
@@ -22,7 +22,7 @@ QtHistoryItem::QtHistoryItem(const SearchMatch& match, size_t index, bool isCurr
|
||||
layout->setContentsMargins(0, 0, 0, 0);
|
||||
layout->setAlignment(Qt::AlignTop);
|
||||
|
||||
std::string name = utility::elide(match.nodeType.getType() == NodeType::NODE_FILE ? match.text : match.name, utility::ELIDE_RIGHT, 100);
|
||||
std::string name = utility::elide(match.nodeType.isFile() ? match.text : match.name, utility::ELIDE_RIGHT, 100);
|
||||
|
||||
m_name = new QLabel(name.c_str(), this);
|
||||
m_name->setAttribute(Qt::WA_MacShowFocusRect, 0);
|
||||
|
||||
@@ -879,7 +879,7 @@ void QtMainWindow::setupHistoryMenu()
|
||||
for (size_t i = 0; i < m_history.size(); i++)
|
||||
{
|
||||
SearchMatch& match = m_history[i];
|
||||
std::string name = utility::elide(match.nodeType.getType() == NodeType::NODE_FILE ? match.text : match.name, utility::ELIDE_RIGHT, 50);
|
||||
std::string name = utility::elide(match.nodeType.isFile() ? match.text : match.name, utility::ELIDE_RIGHT, 50);
|
||||
|
||||
QAction* action = new QAction();
|
||||
action->setText(name.c_str());
|
||||
|
||||
Reference in New Issue
Block a user