qa: Resolve Qt deprecation warnings - default-construct QFlags
[quassel.git] / src / qtui / verticaldock.h
index ba616ff..703b47c 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005/06 by the Quassel Project                          *
+ *   Copyright (C) 2005-2020 by the Quassel Project                        *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -15,7 +15,7 @@
  *   You should have received a copy of the GNU General Public License     *
  *   along with this program; if not, write to the                         *
  *   Free Software Foundation, Inc.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
 #ifndef VERTICALDOCKTITLE_H
 #include <QDockWidget>
 #include <QSize>
 
-class VerticalDockTitle : public QWidget {
-  Q_OBJECT
+class VerticalDockTitle : public QWidget
+{
+    Q_OBJECT
 
 public:
-  VerticalDockTitle(QDockWidget *parent);
+    VerticalDockTitle(QDockWidget* parent);
 
-  virtual QSize sizeHint() const;
-  virtual QSize minimumSizeHint() const;
-  void show(bool show_);
+    QSize sizeHint() const override;
+    QSize minimumSizeHint() const override;
+    void show(bool show_);
 
 protected:
-  virtual void paintEvent(QPaintEvent *event);
+    void paintEvent(QPaintEvent* event) override;
 
 private:
-  bool _show;
+    bool _show;
 };
 
-class EmptyDockTitle : public QWidget {
-  Q_OBJECT
+class EmptyDockTitle : public QWidget
+{
+    Q_OBJECT
 
 public:
-  inline EmptyDockTitle(QDockWidget *parent) : QWidget(parent) {}
+    inline EmptyDockTitle(QDockWidget* parent)
+        : QWidget(parent)
+    {}
 
-  inline virtual QSize sizeHint() const { return QSize(0,0); }
+    inline QSize sizeHint() const override { return {0, 0}; }
 };
 
-
-class VerticalDock : public QDockWidget {
-  Q_OBJECT
+class VerticalDock : public QDockWidget
+{
+    Q_OBJECT
 
 public:
-  VerticalDock(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
-  VerticalDock(QWidget *parent = 0, Qt::WindowFlags flags = 0);
+    VerticalDock(const QString& title, QWidget* parent = nullptr, Qt::WindowFlags flags = {});
+    VerticalDock(QWidget* parent = nullptr, Qt::WindowFlags flags = {});
 
-  void showTitle(bool show);
-  void setDefaultTitleWidget();
+    void showTitle(bool show);
+    void setDefaultTitleWidget();
 };
 
-
-#endif // VERTICALDOCKTITLE_H
-  
+#endif  // VERTICALDOCKTITLE_H