Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


On Saturday 16 of March 2013, julien2412 wrote:
Hello,

Cppcheck reported this:
[KDESalFrame.cxx:301] -> [KDESalFrame.cxx:304]: (performance) Variable
'aMenuFore' is reassigned a value before the old one has been used.
[KDESalFrame.cxx:302] -> [KDESalFrame.cxx:305]: (performance) Variable
'aMenuBack' is reassigned a value before the old one has been used.

Indeed, there are the lines:
    292     // Menu
    293     style.SetSkipDisabledInMenus( TRUE );
    294     KMenuBar* pMenuBar = new KMenuBar();
    295     if ( pMenuBar )
    296     {
    297         // Color
    298         QPalette qMenuCG = pMenuBar->palette();
    299
    300         // Menu text and background color, theme specific
    301         Color aMenuFore = toColor( qMenuCG.color(
QPalette::WindowText ) );
    302         Color aMenuBack = toColor( qMenuCG.color( QPalette::Window
) );
    303
    304         aMenuFore = toColor( qMenuCG.color( QPalette::ButtonText )
);
    305         aMenuBack = toColor( qMenuCG.color( QPalette::Button ) );
(See
http://opengrok.libreoffice.org/xref/core/vcl/unx/kde4/KDESalFrame.cxx#292)

Must we keep QPalette::WindowText and QPalette::Window or
QPalette::ButtonText and QPalette::Button ?

 It looks like a leftover from the KDE3 version and if it's been like this all 
the time and nobody has complained, then the useless ones should be removed.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.