summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <[email protected]>2017-12-01 12:42:25 +0100
committerSandro Knauß <[email protected]>2017-12-01 12:43:38 +0100
commitd61c190be6027de291e0c9bff3868c338a7f2800 (patch)
treed56a901091b95ef2599f068367832dce22923226
parentd2f699facce57bda4e41c901ef52a1fdea55d3b2 (diff)
Define the palette to make sure test is not dependen on a Qt version.
-rw-r--r--plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp b/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp
index f6b43f4..cc48a39 100644
--- a/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp
+++ b/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp
@@ -29,6 +29,7 @@
#include <KMime/Message>
#include <QDir>
#include <QIcon>
+#include <QPalette>
#include <QProcess>
#include <QStandardPaths>
#include <QStyle>
@@ -53,7 +54,12 @@ Q_CONSTRUCTOR_FUNCTION(initLocale)
void RenderTest::initTestCase()
{
QApplication::setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
- QApplication::setPalette(QApplication::style()->standardPalette());
+ QPalette p(QApplication::style()->standardPalette());
+ p.setCurrentColorGroup(QPalette::Normal);
+ p.setColor(QPalette::Button, QColor::fromRgb(0xef,0xeb,0xe7));
+ p.setColor(QPalette::ButtonText, QColor::fromRgb(0, 0, 0));
+ p.setColor(QPalette::Shadow, QColor::fromRgb(0x76,0x74,0x72));
+ QApplication::setPalette(p);
}
void RenderTest::testRender_data()