[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/devtools/kdevelop4-extra-plugins/coverage
From: Daniel Calviño Sánchez <danxuliu () gmail ! com>
Date: 2011-09-07 15:38:32
Message-ID: 20110907153832.70429AC87D () svn ! kde ! org
[Download RAW message or body]
SVN commit 1252026 by danxuliu:
Print warning and error messages of geninfo with neutral and negative text color, \
respectively. Also, to ensure a proper parsing of geninfo output it will be now \
untranslated.
M +7 -1 covoutputdelegate.cpp
M +2 -0 covoutputdelegate.h
M +5 -0 lcovjob.cpp
--- trunk/playground/devtools/kdevelop4-extra-plugins/coverage/covoutputdelegate.cpp \
#1252025:1252026 @@ -2,6 +2,7 @@
* This file is part of KDevelop *
* Copyright (C) 2007 Andreas Pakulat <apaku@gmx.de> *
* Copyright 2008 Manuel Breugelmans <mbr.nxi@gmail.com> *
+ * Copyright 2011 Daniel Calviño Sánchez <danxuliu@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
@@ -30,7 +31,8 @@
: QItemDelegate(parent),
textBrush(KColorScheme::View, KColorScheme::NormalText),
processBrush(KColorScheme::View, KColorScheme::PositiveText),
- warningBrush( KColorScheme::View, KColorScheme::NeutralText )
+ warningBrush(KColorScheme::View, KColorScheme::NeutralText),
+ errorBrush(KColorScheme::View, KColorScheme::NegativeText)
{}
CovOutputDelegate::~CovOutputDelegate()
@@ -46,6 +48,10 @@
opt.palette.setBrush(QPalette::Text, processBrush.brush(option.palette));
} else if (text.contains("source file is newer than graph file")) {
opt.palette.setBrush(QPalette::Text, warningBrush.brush(option.palette));
+ } else if (text.contains("WARNING:")) {
+ opt.palette.setBrush(QPalette::Text, warningBrush.brush(option.palette));
+ } else if (text.contains("ERROR:")) {
+ opt.palette.setBrush(QPalette::Text, errorBrush.brush(option.palette));
}
QItemDelegate::paint(painter, opt, index);
}
--- trunk/playground/devtools/kdevelop4-extra-plugins/coverage/covoutputdelegate.h \
#1252025:1252026 @@ -2,6 +2,7 @@
* This file is part of KDevelop *
* Copyright (C) 2007 Andreas Pakulat <apaku@gmx.de> *
* Copyright 2008 Manuel Breugelmans <mbr.nxi@gmail.com> *
+ * Copyright 2011 Daniel Calviño Sánchez <danxuliu@gmail.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Library General Public License as *
@@ -41,6 +42,7 @@
KStatefulBrush textBrush;
KStatefulBrush processBrush;
KStatefulBrush warningBrush;
+ KStatefulBrush errorBrush;
};
}
--- trunk/playground/devtools/kdevelop4-extra-plugins/coverage/lcovjob.cpp \
#1252025:1252026 @@ -1,6 +1,7 @@
/* KDevelop coverage plugin
* Copyright 2008-2009 Manuel Breugelmans <mbr.nxi@gmail.com>
* Copyright 2010 Daniel Calviño Sánchez <danxuliu@gmail.com>
+ * Copyright 2011 Daniel Calviño Sánchez <danxuliu@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -117,6 +118,10 @@
m_lcov->setOutputChannelMode(KProcess::SeparateChannels);
m_lineMaker = new ProcessLineMaker(m_lcov);
+ //Ensure that the process output will be untranslated
+ m_lcov->unsetEnv("LC_ALL");
+ m_lcov->setEnv("LC_MESSAGES", "C");
+
//connect(m_lineMaker, SIGNAL(receivedStdoutLines(QStringList)),
// model(), SLOT(appendOutputs(QStringList)));
connect(m_lineMaker, SIGNAL(receivedStderrLines(QStringList)),
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic