forked from qt-creator/qt-creator
Debugger: Tooltip in Stack Window
Show only those fields in tooltip that have proper values. Task-number: QTCREATORBUG-6336 Change-Id: I6fdc5fcae8c36e0115fb9268531f5bb16ce48fe0 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -88,18 +88,25 @@ QString StackFrame::toToolTip() const
|
|||||||
const QString filePath = QDir::toNativeSeparators(file);
|
const QString filePath = QDir::toNativeSeparators(file);
|
||||||
QString res;
|
QString res;
|
||||||
QTextStream str(&res);
|
QTextStream str(&res);
|
||||||
str << "<html><body><table>"
|
str << "<html><body><table>";
|
||||||
<< "<tr><td>" << tr("Address:") << "</td><td>0x";
|
if (address) {
|
||||||
|
str << "<tr><td>" << tr("Address:") << "</td><td>0x";
|
||||||
str.setIntegerBase(16);
|
str.setIntegerBase(16);
|
||||||
str << address;
|
str << address;
|
||||||
|
}
|
||||||
str.setIntegerBase(10);
|
str.setIntegerBase(10);
|
||||||
str << "</td></tr>"
|
str << "</td></tr>";
|
||||||
<< "<tr><td>" << tr("Function:") << "</td><td>" << function << "</td></tr>"
|
if (!function.isEmpty())
|
||||||
<< "<tr><td>" << tr("File:") << "</td><td>" << filePath << "</td></tr>"
|
str << "<tr><td>" << tr("Function:") << "</td><td>" << function << "</td></tr>";
|
||||||
<< "<tr><td>" << tr("Line:") << "</td><td>" << line << "</td></tr>"
|
if (!file.isEmpty())
|
||||||
<< "<tr><td>" << tr("From:") << "</td><td>" << from << "</td></tr>"
|
str << "<tr><td>" << tr("File:") << "</td><td>" << filePath << "</td></tr>";
|
||||||
<< "<tr><td>" << tr("To:") << "</td><td>" << to << "</td></tr>"
|
if (line != -1)
|
||||||
<< "</table></body></html>";
|
str << "<tr><td>" << tr("Line:") << "</td><td>" << line << "</td></tr>";
|
||||||
|
if (!from.isEmpty())
|
||||||
|
str << "<tr><td>" << tr("From:") << "</td><td>" << from << "</td></tr>";
|
||||||
|
if (!to.isEmpty())
|
||||||
|
str << "<tr><td>" << tr("To:") << "</td><td>" << to << "</td></tr>";
|
||||||
|
str << "</table></body></html>";
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user