diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index cb00ae602..ebda63fa1 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -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); + item->setData(name, Qt::ToolTipRole); item->setEditable(false); return item; } @@ -174,13 +175,13 @@ QStandardItem *ResultsTree::AddBacktraceFiles(QStandardItem *parent, QList list; // Ensure shown path is with native separators const QString file = QDir::toNativeSeparators(item.file); - list << CreateItem(file); - list << CreateItem(tr(item.severity.toLatin1())); - list << CreateItem(QString("%1").arg(item.line)); + list << CreateNormalItem(file); + list << CreateNormalItem(tr(item.severity.toLatin1())); + list << CreateNormalItem(QString("%1").arg(item.line)); //TODO message has parameter names so we'll need changes to the core //cppcheck so we can get proper translations - list << CreateItem(tr(item.summary.toLatin1())); - list << CreateItem(tr(item.message.toLatin1())); + list << CreateNormalItem(tr(item.summary.toLatin1())); + list << CreateNormalItem(tr(item.message.toLatin1())); // Check for duplicate rows and don't add them if found 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 name = QDir::toNativeSeparators(name); - item = CreateItem(name); + item = CreateNormalItem(name); item->setIcon(QIcon(":images/text-x-generic.png")); //Add user data to that item diff --git a/gui/resultstree.h b/gui/resultstree.h index 9f4184365..875dd47e1 100644 --- a/gui/resultstree.h +++ b/gui/resultstree.h @@ -270,12 +270,12 @@ protected: QString AskFileDir(const QString &file); /** - * @brief Create a new QStandardItem + * @brief Create new normal item. * * @param name name for the item * @return new QStandardItem */ - QStandardItem *CreateItem(const QString &name); + QStandardItem *CreateNormalItem(const QString &name); /** * @brief Finds a file item