Fix compiling against recent Qt 5

This commit is contained in:
Martchus 2019-03-14 18:03:24 +01:00 committed by Marius Kittler
parent aeb43180f0
commit d56a6d47db
2 changed files with 7 additions and 8 deletions

View File

@ -10,7 +10,7 @@ set(META_APP_URL "https://github.com/${META_APP_AUTHOR}/${META_PROJECT_NAME}")
set(META_APP_DESCRIPTION "Simple video downloader with Qt GUI (currently only YouTube and Vimeo are maintained)")
set(META_VERSION_MAJOR 1)
set(META_VERSION_MINOR 3)
set(META_VERSION_PATCH 3)
set(META_VERSION_PATCH 4)
# add project files
set(HEADER_FILES

View File

@ -6,6 +6,7 @@
#include <QMouseEvent>
#include <QPaintEvent>
#include <QStylePainter>
#include <QStyleOption>
namespace QtGui {
@ -22,12 +23,10 @@ DownloadWidget::~DownloadWidget()
void DownloadWidget::paintEvent(QPaintEvent *)
{
if (true) {
QStylePainter painter(this);
QStyleOptionFocusRect option;
option.initFrom(this);
option.backgroundColor = palette().color(QPalette::Highlight);
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
}
QStylePainter painter(this);
QStyleOptionFocusRect option;
option.initFrom(this);
option.backgroundColor = palette().color(QPalette::Highlight);
painter.drawPrimitive(QStyle::PE_FrameFocusRect, option);
}
}