forked from qt-creator/qt-creator
Remove duplicated code
Merge QtOutputFormatter::linkFormat and PythonOutputFormatter::linkFormat to OutputFormatter::linkFormat because these two functions were identical. Fixes: QTCREATORBUG-23562 Change-Id: I1337b2fd66fc7d7b6742eb5e9c1a2caf1dc6b5bd Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -60,16 +60,6 @@ using namespace Utils;
|
||||
namespace Python {
|
||||
namespace Internal {
|
||||
|
||||
static QTextCharFormat linkFormat(const QTextCharFormat &inputFormat, const QString &href)
|
||||
{
|
||||
QTextCharFormat result = inputFormat;
|
||||
result.setForeground(creatorTheme()->color(Theme::TextColorLink));
|
||||
result.setUnderlineStyle(QTextCharFormat::SingleUnderline);
|
||||
result.setAnchor(true);
|
||||
result.setAnchorHref(href);
|
||||
return result;
|
||||
}
|
||||
|
||||
class PythonOutputFormatter : public OutputFormatter
|
||||
{
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user