Commit 51eaa82b authored by Jan Möbius's avatar Jan Möbius

Removed use of deprecated Functions

parent a73dfbdf
......@@ -382,12 +382,10 @@ QIcon ColorPlugin::generateIcon(OpenMesh::Vec4f _color){
* @param _color a color
* @return the icon
*/
QIcon ColorPlugin::generateIcon(QRgb _color){
QColor color(_color);
QIcon ColorPlugin::generateIcon(QColor _color){
QPixmap pic(32,32);
pic.fill( color );
pic.fill( _color );
return QIcon( pic );
}
......@@ -438,9 +436,9 @@ void ColorPlugin::getColorDialog(){
bool ok;
QRgb newColor = QColorDialog::getRgba ( getIconColor( button->icon() ) , &ok );
QColor newColor = QColorDialog::getColor( getIconColor( button->icon() ) );
if (ok)
if (newColor.isValid() )
button->setIcon( generateIcon(newColor) );
}
......
......@@ -125,7 +125,7 @@ class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterfac
ColorOptions* optionsWidget_;
/// generate an icon from a given color
QIcon generateIcon(QRgb _color);
QIcon generateIcon(QColor _color);
/// generate an icon from a given color
QIcon generateIcon(OpenMesh::Vec4f _color);
......
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