Fix build errors for GraphicsViewBenchmark
QGL* has been removed amongst other things Task-number: QTBUG-74408 Task-number: QTBUG-74409 Change-Id: Ia19774f2bb6d0b86b3fbde224cbc8652b4ae0b22 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
This commit is contained in:
parent
b6fad7588a
commit
3673ee9823
@ -1,7 +1,7 @@
|
|||||||
TEMPLATE = app
|
TEMPLATE = app
|
||||||
|
|
||||||
QT += svg testlib
|
QT += svg testlib
|
||||||
qtHaveModule(opengl): QT += opengl
|
qtHaveModule(opengl): QT += opengl openglwidgets
|
||||||
|
|
||||||
HEADERS += widgets/gvbwidget.h \
|
HEADERS += widgets/gvbwidget.h \
|
||||||
widgets/abstractscrollarea.h \
|
widgets/abstractscrollarea.h \
|
||||||
|
@ -28,9 +28,8 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include <QtGui/qgraphicsview.h>
|
|
||||||
#include <QtGui/qpixmapcache.h>
|
#include <QtGui/qpixmapcache.h>
|
||||||
#include <QtGui/qdesktopwidget.h>
|
#include <QtGui/QScreen>
|
||||||
|
|
||||||
#include "mainview.h"
|
#include "mainview.h"
|
||||||
#include "dummydatagen.h"
|
#include "dummydatagen.h"
|
||||||
@ -308,7 +307,8 @@ void tst_GraphicsViewBenchmark::initTestCase()
|
|||||||
if (mSettings->size().width() > 0 && mSettings->size().height() > 0) {
|
if (mSettings->size().width() > 0 && mSettings->size().height() > 0) {
|
||||||
mMainView->resize(mSettings->size().width(), mSettings->size().height());
|
mMainView->resize(mSettings->size().width(), mSettings->size().height());
|
||||||
mMainView->show();
|
mMainView->show();
|
||||||
} else if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) {
|
} else if (QGuiApplication::primaryScreen()->geometry().width() < 360
|
||||||
|
|| QGuiApplication::primaryScreen()->geometry().height() < 640) {
|
||||||
mMainView->showFullScreen();
|
mMainView->showFullScreen();
|
||||||
} else {
|
} else {
|
||||||
mMainView->resize(360, 640);
|
mMainView->resize(360, 640);
|
||||||
@ -326,7 +326,7 @@ void tst_GraphicsViewBenchmark::initTestCase()
|
|||||||
currentListSize = -1;
|
currentListSize = -1;
|
||||||
currentListType = None;
|
currentListType = None;
|
||||||
|
|
||||||
QVERIFY(QTest::qWaitForWindowShown(mMainView));
|
QVERIFY(QTest::qWaitForWindowExposed(mMainView));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tst_GraphicsViewBenchmark::cleanupTestCase()
|
void tst_GraphicsViewBenchmark::cleanupTestCase()
|
||||||
@ -760,7 +760,8 @@ int main(int argc, char *argv[])
|
|||||||
if (settings.size().width() > 0 && settings.size().height() > 0) {
|
if (settings.size().width() > 0 && settings.size().height() > 0) {
|
||||||
view.resize(settings.size().width(), settings.size().height());
|
view.resize(settings.size().width(), settings.size().height());
|
||||||
view.show();
|
view.show();
|
||||||
} else if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) {
|
} else if (QGuiApplication::primaryScreen()->geometry().width() < 360
|
||||||
|
|| QApplication::primaryScreen()->geometry().height() < 640) {
|
||||||
view.showFullScreen();
|
view.showFullScreen();
|
||||||
} else {
|
} else {
|
||||||
view.resize(360, 640);
|
view.resize(360, 640);
|
||||||
|
@ -26,10 +26,12 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtGui>
|
|
||||||
#include "button.h"
|
#include "button.h"
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QGraphicsSceneMouseEvent>
|
||||||
|
|
||||||
static const int MinTextWidthAsChars = 8;
|
static const int MinTextWidthAsChars = 8;
|
||||||
|
|
||||||
class ButtonPrivate {
|
class ButtonPrivate {
|
||||||
|
@ -78,7 +78,7 @@ bool ListModel::setData(const QModelIndex &index, const QVariant &value, int rol
|
|||||||
void ListModel::clear()
|
void ListModel::clear()
|
||||||
{
|
{
|
||||||
m_items.clear();
|
m_items.clear();
|
||||||
reset();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex ListModel::index(int row, int column, const QModelIndex &parent) const
|
QModelIndex ListModel::index(int row, int column, const QModelIndex &parent) const
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QGraphicsLinearLayout>
|
#include <QGraphicsLinearLayout>
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
#include <QGLWidget>
|
#include <QtOpenGLWidgets/QOpenGLWidget>
|
||||||
#endif
|
#endif
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
@ -253,10 +253,10 @@ void MainView::construct()
|
|||||||
if (m_enableOpenGL) {
|
if (m_enableOpenGL) {
|
||||||
qDebug() << "OpenGL enabled";
|
qDebug() << "OpenGL enabled";
|
||||||
m_scene->setSortCacheEnabled(false);
|
m_scene->setSortCacheEnabled(false);
|
||||||
setViewport(new QGLWidget);
|
setViewport(new QOpenGLWidget);
|
||||||
|
|
||||||
// Qt doc says: This is the preferred update mode for
|
// Qt doc says: This is the preferred update mode for
|
||||||
// viewports that do not support partial updates, such as QGLWidget...
|
// viewports that do not support partial updates, such as QOpenGLWidget...
|
||||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include <QtGui>
|
|
||||||
|
|
||||||
#include "simplelistview.h"
|
#include "simplelistview.h"
|
||||||
#include "scrollbar.h"
|
#include "scrollbar.h"
|
||||||
#include "simplelistview.h"
|
#include "simplelistview.h"
|
||||||
@ -36,6 +34,10 @@
|
|||||||
#include "listitemcache.h"
|
#include "listitemcache.h"
|
||||||
#include "theme.h"
|
#include "theme.h"
|
||||||
|
|
||||||
|
#include <QtGui>
|
||||||
|
#include <QGraphicsGridLayout>
|
||||||
|
#include <QGraphicsSceneResizeEvent>
|
||||||
|
|
||||||
class SimpleListViewPrivate
|
class SimpleListViewPrivate
|
||||||
{
|
{
|
||||||
Q_DECLARE_PUBLIC(SimpleListView)
|
Q_DECLARE_PUBLIC(SimpleListView)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user