testincidenceformatter

Sandro Knauß sknauss at kde.org
Sat Dec 9 23:37:31 GMT 2017


Hey,

yeah well colors :) I had this issue in kdepim-addons, too. 
Additionally Qt 5.10 changed the colors for Fusion style 
(5dbd040d1c77936b5fb3584cdfac829904d76b2c - found by volker)

That's why you need to hard code the palette too and not "just" style. And if 
you don't hard code it to Fusion you would use the one from your system. So i 
ended up with following snippset:

    QApplication::setStyle(QStyleFactory::create(QStringLiteral("Fusion")));                                           
    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); 

This solved issue on CI and for Qt5.10 builds. You can see the code:
kdepim-addons/plugins/messageviewer/bodypartformatter/autotests/rendertest.cpp

Btw. better use breeze icons, because on CI the oxygen icons are not installed 
by default.

Hope this helps.

Best Regards,

sandro

On Samstag, 9. Dezember 2017 22:38:26 CET Allen Winter wrote:
> With commit 74191f391f050af1a56f12d3f198717359a7b89a I fixed the reference
> data in kcalutils so all the tests in testincidenceformatter work for me.
> 
> but I notice that jenkins isn't happy:
> https://build.kde.org/job/Applications%20kcalutils%20kf5-qt5%20SUSEQt5.9/las
> tBuild/testReport/(root)/TestSuite/kcalutils_testincidenceformatter/
> 
> I don't get it.
> 
> Am I using  a different grantlee than the jenkins setup?
> I have grantlee 5.7.40
> 
> can someone else try on their local machines?
> 
> -stumped



More information about the kde-pim mailing list