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