mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
QWidget::sizeHint() is const-qualified, so Clang warns that non-const sizeHint() member functions merely hide the virtual function of the base class.664dac3401
and9f53ae6efc
introduced these member functions in 2014 without const qualifiers. QWidget::sizeHint() was const-qualified even in Qt 3. Since these member functions have never had any effect, they should be removed rather than const-qualified to preserve the long-standing behaviors of the two classes. Add a TODO for a similar but less straightforward issue with PropertiesDialog::sizeHint().
33 lines
679 B
C++
33 lines
679 B
C++
#include "comics_view_transition.h"
|
|
|
|
#include <QVBoxLayout>
|
|
#include <QLabel>
|
|
#include <QMovie>
|
|
#include <QSettings>
|
|
#include <QTimer>
|
|
#include <QSizePolicy>
|
|
#include <QPainter>
|
|
|
|
#include "yacreader_global_gui.h"
|
|
|
|
ComicsViewTransition::ComicsViewTransition(QWidget *parent)
|
|
: QWidget(parent)
|
|
{
|
|
#ifdef Q_OS_MAC
|
|
setStyleSheet("QWidget {background:#FFFFFF}");
|
|
#else
|
|
setStyleSheet("QWidget {background:#2A2A2A}");
|
|
#endif
|
|
}
|
|
|
|
void ComicsViewTransition::paintEvent(QPaintEvent *)
|
|
{
|
|
QPainter painter(this);
|
|
|
|
#ifdef Q_OS_MAC
|
|
painter.fillRect(0, 0, width(), height(), QColor("#FFFFFF"));
|
|
#else
|
|
painter.fillRect(0, 0, width(), height(), QColor("#2A2A2A"));
|
|
#endif
|
|
}
|