summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Krause <[email protected]>2015-09-10 17:53:02 +0200
committerVolker Krause <[email protected]>2015-09-11 01:48:49 +0200
commitd0c5ff864b7b833b5c57b3a13d12a313da0132d1 (patch)
tree7b2d3d353df2e59ebc38c8141d8a1c7507ff80f5
parentba3cb34b42d3fcbedf1e2db122dcd48b511250ab (diff)
Make the rendertest independent of the local configuration.
This fixes two separate issues, the use of SVG icons from the Breeze theme, and the difference in positive/neutral/negative colors in the color themes.
-rw-r--r--messageviewer/autotests/setupenv.cpp3
-rw-r--r--messageviewer/autotests/testcsshelper.cpp7
2 files changed, 10 insertions, 0 deletions
diff --git a/messageviewer/autotests/setupenv.cpp b/messageviewer/autotests/setupenv.cpp
index 3ec151a..b005cf6 100644
--- a/messageviewer/autotests/setupenv.cpp
+++ b/messageviewer/autotests/setupenv.cpp
@@ -20,6 +20,8 @@
#include "setupenv.h"
+#include <QStandardPaths>
+
#include <QFile>
#include <QDir>
@@ -27,5 +29,6 @@ void MessageViewer::Test::setupEnv()
{
setenv("LC_ALL", "C", 1);
setenv("KDEHOME", QFile::encodeName(QDir::homePath() + QString::fromLatin1("/.kde-unit-test")), 1);
+ QStandardPaths::setTestModeEnabled(true);
}
diff --git a/messageviewer/autotests/testcsshelper.cpp b/messageviewer/autotests/testcsshelper.cpp
index 9db5878..a024b64 100644
--- a/messageviewer/autotests/testcsshelper.cpp
+++ b/messageviewer/autotests/testcsshelper.cpp
@@ -52,6 +52,13 @@ TestCSSHelper::TestCSSHelper(const QPaintDevice *pd) :
cPgpOk0H = QColor(0xff, 0xff, 0x40);
cPgpWarnH = QColor(0xff, 0xff, 0x40);
cPgpErrH = QColor(0xff, 0x00, 0x00);
+
+ cPgpEncrHT = QColor(0xff, 0xff, 0xff);
+ cPgpOk1HT = QColor(0x27, 0xae, 0x60);
+ cPgpOk0HT = QColor(0xf6, 0x74, 0x00);
+ cPgpWarnHT = QColor(0xf6, 0x74, 0x00);
+ cPgpErrHT = QColor(0xda, 0x44, 0x53);
+
cHtmlWarning = QColor(0xff, 0x40, 0x40);
for (int i = 0 ; i < 3 ; ++i) {
mQuoteColor[i] = QColor(0x00, 0x80 - i * 0x10, 0x00);