Commit 83a5c063 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: check colorDialog return function

Close #5679
(cherry picked from commit bb12c0023452e86a26e407d6e728d961e4544f5e)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e4592151
...@@ -1175,10 +1175,13 @@ int ColorConfigControl::getValue() const ...@@ -1175,10 +1175,13 @@ int ColorConfigControl::getValue() const
void ColorConfigControl::selectColor() void ColorConfigControl::selectColor()
{ {
QColor color = QColorDialog::getColor( QColor( i_color ) ); QColor color = QColorDialog::getColor( QColor( i_color ) );
if( color.isValid() )
{
i_color = (color.red() << 16) + (color.green() << 8) + color.blue(); i_color = (color.red() << 16) + (color.green() << 8) + color.blue();
color_px->fill( QColor( i_color ) ); color_px->fill( QColor( i_color ) );
color_but->setIcon( QIcon( *color_px ) ); color_but->setIcon( QIcon( *color_px ) );
}
} }
......
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