Commit d61c190b authored by Sandro Knauß's avatar Sandro Knauß

Define the palette to make sure test is not dependen on a Qt version.

parent d2f699fa
......@@ -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()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment