GUI: Add tooltips for error items.
This commit is contained in:
parent
66c2825b23
commit
a0a1ad806a
|
@ -74,9 +74,10 @@ void ResultsTree::Initialize(QSettings *settings, ApplicationList *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QStandardItem *ResultsTree::CreateItem(const QString &name)
|
QStandardItem *ResultsTree::CreateNormalItem(const QString &name)
|
||||||
{
|
{
|
||||||
QStandardItem *item = new QStandardItem(name);
|
QStandardItem *item = new QStandardItem(name);
|
||||||
|
item->setData(name, Qt::ToolTipRole);
|
||||||
item->setEditable(false);
|
item->setEditable(false);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
@ -174,13 +175,13 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent,
|
||||||
QList<QStandardItem*> list;
|
QList<QStandardItem*> list;
|
||||||
// Ensure shown path is with native separators
|
// Ensure shown path is with native separators
|
||||||
const QString file = QDir::toNativeSeparators(item.file);
|
const QString file = QDir::toNativeSeparators(item.file);
|
||||||
list << CreateItem(file);
|
list << CreateNormalItem(file);
|
||||||
list << CreateItem(tr(item.severity.toLatin1()));
|
list << CreateNormalItem(tr(item.severity.toLatin1()));
|
||||||
list << CreateItem(QString("%1").arg(item.line));
|
list << CreateNormalItem(QString("%1").arg(item.line));
|
||||||
//TODO message has parameter names so we'll need changes to the core
|
//TODO message has parameter names so we'll need changes to the core
|
||||||
//cppcheck so we can get proper translations
|
//cppcheck so we can get proper translations
|
||||||
list << CreateItem(tr(item.summary.toLatin1()));
|
list << CreateNormalItem(tr(item.summary.toLatin1()));
|
||||||
list << CreateItem(tr(item.message.toLatin1()));
|
list << CreateNormalItem(tr(item.message.toLatin1()));
|
||||||
|
|
||||||
// Check for duplicate rows and don't add them if found
|
// Check for duplicate rows and don't add them if found
|
||||||
for (int i = 0; i < parent->rowCount(); i++)
|
for (int i = 0; i < parent->rowCount(); i++)
|
||||||
|
@ -376,7 +377,7 @@ QStandardItem *ResultsTree::EnsureFileItem(const QString &fullpath, bool hide)
|
||||||
|
|
||||||
// Ensure shown path is with native separators
|
// Ensure shown path is with native separators
|
||||||
name = QDir::toNativeSeparators(name);
|
name = QDir::toNativeSeparators(name);
|
||||||
item = CreateItem(name);
|
item = CreateNormalItem(name);
|
||||||
item->setIcon(QIcon(":images/text-x-generic.png"));
|
item->setIcon(QIcon(":images/text-x-generic.png"));
|
||||||
|
|
||||||
//Add user data to that item
|
//Add user data to that item
|
||||||
|
|
|
@ -270,12 +270,12 @@ protected:
|
||||||
QString AskFileDir(const QString &file);
|
QString AskFileDir(const QString &file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a new QStandardItem
|
* @brief Create new normal item.
|
||||||
*
|
*
|
||||||
* @param name name for the item
|
* @param name name for the item
|
||||||
* @return new QStandardItem
|
* @return new QStandardItem
|
||||||
*/
|
*/
|
||||||
QStandardItem *CreateItem(const QString &name);
|
QStandardItem *CreateNormalItem(const QString &name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Finds a file item
|
* @brief Finds a file item
|
||||||
|
|
Loading…
Reference in New Issue