Cleanup allowing for tags to be available at later points, adds TAGMSG
[quassel.git] / src / uisupport / colorbutton.cpp
index d173010..c4e0c71 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-2014 by the Quassel Project                        *
+ *   Copyright (C) 2005-2019 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
 
 #include "colorbutton.h"
 
+#include <QColorDialog>
 #include <QPainter>
 #include <QStyle>
 #include <QStyleOptionFrame>
 
-#ifdef HAVE_KDE
-#  include <KColorDialog>
-#else
-#  include <QColorDialog>
-#endif
-
-ColorButton::ColorButton(QWidget *parent) : QToolButton(parent)
+ColorButton::ColorButton(QWidget* parent)
+    : QToolButton(parent)
 {
     setText("");
-    connect(this, SIGNAL(clicked()), SLOT(chooseColor()));
+    connect(this, &QAbstractButton::clicked, this, &ColorButton::chooseColor);
 }
 
-
-void ColorButton::setColor(const QColor &color)
+void ColorButton::setColor(const QColor& color)
 {
     _color = color;
     QPixmap pixmap(QSize(32, 32));
@@ -47,22 +42,14 @@ void ColorButton::setColor(const QColor &color)
     emit colorChanged(color);
 }
 
-
 QColor ColorButton::color() const
 {
     return _color;
 }
 
-
 void ColorButton::chooseColor()
 {
-#ifdef HAVE_KDE
-    QColor c = color();
-    KColorDialog::getColor(c, this);
-#else
     QColor c = QColorDialog::getColor(color(), this);
-#endif
-
     if (c.isValid()) {
         setColor(c);
     }