Commit ebfb9636 authored by Nate Graham's avatar Nate Graham
Browse files

Merge branch 'release/20.12'

parents a60f21ac 7ed543b5
...@@ -51,7 +51,7 @@ else() ...@@ -51,7 +51,7 @@ else()
set(GWENVIEW_SEMANTICINFO_BACKEND_BALOO ON) set(GWENVIEW_SEMANTICINFO_BACKEND_BALOO ON)
endif() endif()
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Concurrent Svg OpenGL PrintSupport) find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED Core Widgets Concurrent Svg PrintSupport)
find_package(Qt5DBus ${QT_MIN_VERSION} CONFIG QUIET) find_package(Qt5DBus ${QT_MIN_VERSION} CONFIG QUIET)
set(HAVE_QTDBUS ${Qt5DBus_FOUND}) set(HAVE_QTDBUS ${Qt5DBus_FOUND})
......
...@@ -262,7 +262,6 @@ endif() ...@@ -262,7 +262,6 @@ endif()
target_link_libraries(gwenviewlib target_link_libraries(gwenviewlib
Qt5::Concurrent Qt5::Concurrent
Qt5::Svg Qt5::Svg
Qt5::OpenGL
Qt5::PrintSupport Qt5::PrintSupport
KF5::KIOCore KF5::KIOCore
KF5::KIOWidgets KF5::KIOWidgets
......
...@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA ...@@ -30,7 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// KF // KF
// Qt // Qt
#include <QGLWidget> #include <QOpenGLWidget>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QTimer> #include <QTimer>
...@@ -87,13 +87,8 @@ DocumentViewContainer::DocumentViewContainer(QWidget* parent) ...@@ -87,13 +87,8 @@ DocumentViewContainer::DocumentViewContainer(QWidget* parent)
d->q = this; d->q = this;
d->mScene = new QGraphicsScene(this); d->mScene = new QGraphicsScene(this);
if (GwenviewConfig::animationMethod() == DocumentView::GLAnimation) { if (GwenviewConfig::animationMethod() == DocumentView::GLAnimation) {
QGLWidget* glWidget = new QGLWidget; QOpenGLWidget* glWidget = new QOpenGLWidget;
if (glWidget->isValid()) { setViewport(glWidget);
setViewport(glWidget);
} else {
qCWarning(GWENVIEW_LIB_LOG) << "Failed to initialize OpenGL support!";
delete glWidget;
}
} }
setScene(d->mScene); setScene(d->mScene);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
...@@ -304,10 +299,10 @@ void DocumentViewContainer::slotFadeInFinished(DocumentView* view) ...@@ -304,10 +299,10 @@ void DocumentViewContainer::slotFadeInFinished(DocumentView* view)
void DocumentViewContainer::slotConfigChanged() void DocumentViewContainer::slotConfigChanged()
{ {
bool currentlyGL = qobject_cast<QGLWidget*>(viewport()); bool currentlyGL = qobject_cast<QOpenGLWidget*>(viewport());
bool wantGL = GwenviewConfig::animationMethod() == DocumentView::GLAnimation; bool wantGL = GwenviewConfig::animationMethod() == DocumentView::GLAnimation;
if (currentlyGL != wantGL) { if (currentlyGL != wantGL) {
setViewport(wantGL ? new QGLWidget() : new QWidget()); setViewport(wantGL ? new QOpenGLWidget() : new QWidget());
} }
} }
......
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