remove definitions for features that are no longer supported [ci reset]

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-02-24 15:10:49 +02:00
parent 54bbcee791
commit f4e311aa34
10 changed files with 16 additions and 149 deletions

View file

@ -44,84 +44,6 @@
#define Q_LITTLE_ENDIAN 1234 #define Q_LITTLE_ENDIAN 1234
#define Q_BYTE_ORDER ${KATIE_BYTE_ORDER} #define Q_BYTE_ORDER ${KATIE_BYTE_ORDER}
// No longer supported
#define QT_NO_OPENVG
#define QT_NO_PHONON
#define QT_NO_WIN_ACTIVEQT
#define QT_NO_DIRECTPAINTER
#define QT_NO_COP
#define QT_NO_BLITTABLE
#define QT_NO_PICTURE
#define QT_NO_PICTUREIO
#define QT_NO_SOFTKEYMANAGER
#define QT_NO_SXE
#define QT_NO_QWS_QPF2
#define QT_NO_QWS_INPUTMETHODS
#define QT_NO_QWSEMBEDWIDGET
#define QT_NO_QWS_CURSOR
#define QT_NO_QWS_DECORATION_DEFAULT
#define QT_NO_QWS_DECORATION_STYLED
#define QT_NO_QWS_DECORATION_WINDOWS
#define QT_NO_QWS_MANAGER
#define QT_NO_QWS_KEYBOARD
#define QT_NO_QWS_MOUSE
#define QT_NO_QWS_MOUSE_AUTO
#define QT_NO_QWS_MOUSE_MANUAL
#define QT_NO_QWS_MULTIPROCESS
#define QT_NO_QWS_SOUNDSERVER
#define QT_NO_QWS_PROPERTIES
#define QT_NO_QWS_PROXYSCREEN
#define QT_NO_QWS_DYNAMICSCREENTRANSFORMATION
#define QT_NO_QWS_TRANSFORMED
#define QT_NO_QWS_VNC
#define QT_NO_AUDIO_BACKEND
#define QT_NO_DIRECTWRITE
#define QT_NO_STYLE_WINDOWSCE
#define QT_NO_STYLE_WINDOWSMOBILE
#define QT_NO_STYLE_WINDOWSXP
#define QT_NO_STYLE_WINDOWSVISTA
#define QT_NO_STYLE_MAC
#define QT_NO_STYLE_S60
#define QT_NO_STYLE_GTK
#define QT_NO_STYLE_QGTK
#define QT_NO_STYLE_CDE
#define QT_NO_STATEMACHINE
#define QT_NO_XIM
#define QT_NO_IM
#define QT_NO_INPUTMETHOD
#define QT_NO_SOUND
#define QT_NO_EGL
#define QT_NO_OPENGL
#define QT_NO_TABLET
#define QT_NO_TABLETEVENT
#define QT_NO_RAWFONT
#define QT_NO_IMAGE_TEXT
#define QT_NO_IMAGEFORMAT_BMP
#define QT_NO_IMAGEFORMAT_MNG
#define QT_NO_IMAGEFORMAT_XBM
#define QT_NO_IMAGEFORMAT_TGA
#define QT_NO_IMAGEFORMAT_TIFF
#define QT_NO_IMAGEFORMAT_ICO
#define QT_NO_IMAGEFORMAT_JPEG
#define QT_NO_TEXTODFWRITER
#define QT_NO_TEXTCODECPLUGIN
#define QT_NO_SYSTEMLOCALE
#define QT_NO_STL_WCHAR
#define QT_NO_BEARERMANAGEMENT
#define QT_NO_GESTURES
#define QT_NO_STYLE_MOTIF
#define QT_NO_STYLE_PLASTIQUE
#define QT_NO_ACCESSIBILITY
#define QT_NO_SVGGENERATOR
#define QT_NO_SVGWIDGET
#define QT_NO_GRAPHICSSVGITEM
#define QT_NO_FTP
#define QT_NO_HTTP
#define QT_NO_NETWORKDISKCACHE
#define QT_NO_SOCKS5
#define QT_NO_URLINFO
#define QT_NO_NETWORKPROXY
// Not supported, used to bootstrap // Not supported, used to bootstrap
#cmakedefine QT_NO_QOBJECT #cmakedefine QT_NO_QOBJECT
#cmakedefine QT_NO_COMPRESS #cmakedefine QT_NO_COMPRESS

View file

@ -295,8 +295,7 @@ void tst_GraphicsViewBenchmark::insertListData()
void tst_GraphicsViewBenchmark::initTestCase() void tst_GraphicsViewBenchmark::initTestCase()
{ {
mMainView = new MainView(mSettings->options() & Settings::UseOpenGL, mMainView = new MainView(Settings::OutputFps);
mSettings->options() & Settings::OutputFps);
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());
@ -735,7 +734,7 @@ int main(int argc, char *argv[])
int returnValue = 0; int returnValue = 0;
if (settings.options() & Settings::ManualTest) { if (settings.options() & Settings::ManualTest) {
MainView view(settings.options() & Settings::UseOpenGL, settings.options() & Settings::OutputFps); MainView view(settings.options() & Settings::OutputFps);
DummyDataGenerator dataGenerator; DummyDataGenerator dataGenerator;
dataGenerator.Reset(); dataGenerator.Reset();
@ -760,16 +759,12 @@ int main(int argc, char *argv[])
view.resize(settings.size().width(), settings.size().height()); view.resize(settings.size().width(), settings.size().height());
view.show(); view.show();
} else { } else {
#if defined(Q_WS_MAEMO_5)
view.showFullScreen();
#else
if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) { if (QApplication::desktop()->width() < 360 || QApplication::desktop()->height() < 640) {
view.showFullScreen(); view.showFullScreen();
} else { } else {
view.resize(360, 640); view.resize(360, 640);
view.show(); view.show();
} }
#endif
} }
returnValue = app.exec(); returnValue = app.exec();
} else { } else {

View file

@ -30,7 +30,6 @@ static void usage(const char *appname)
printf(" GraphicsViewBenchmark related options:\n"); printf(" GraphicsViewBenchmark related options:\n");
printf(" -h,-help,--help: This help\n"); printf(" -h,-help,--help: This help\n");
printf(" -resolution : UI resolution in format WxH where width and height are positive values\n"); printf(" -resolution : UI resolution in format WxH where width and height are positive values\n");
printf(" -opengl : Enables OpenGL usage. Building PRECONDITIONS: QT_NO_OPENGL is off.\n");
printf(" -manual : Run test manually \n"); printf(" -manual : Run test manually \n");
printf("\n The following options are available in manual mode:\n"); printf("\n The following options are available in manual mode:\n");
printf(" -rotation : UI rotation in degrees\n"); printf(" -rotation : UI rotation in degrees\n");
@ -51,12 +50,8 @@ static inline bool argumentOnlyAvailableInManualMode(const char *arg)
bool readSettingsFromCommandLine(int argc, char *argv[], bool readSettingsFromCommandLine(int argc, char *argv[],
Settings& config) Settings& config)
{ {
bool builtWithOpenGL = false;
Settings::Options options; Settings::Options options;
#ifndef QT_NO_OPENGL
builtWithOpenGL = true;
#endif
for (int i = 1; i < argc; ++i) { for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "-manual") == 0) { if (strcmp(argv[i], "-manual") == 0) {
options |= Settings::ManualTest; options |= Settings::ManualTest;
@ -72,16 +67,7 @@ bool readSettingsFromCommandLine(int argc, char *argv[],
usage(argv[0]); usage(argv[0]);
return true; return true;
} }
if (strcmp(argv[i], "-opengl") == 0) { if (strcmp(argv[i], "-resolution") == 0) {
if (builtWithOpenGL) {
options |= Settings::UseOpenGL;
argv[i] = 0;
} else {
printf("-opengl parameter can be used only with building PRECONDITIONS: QT_NO_OPENGL is off.\n");
usage(argv[0]);
return false;
}
} else if (strcmp(argv[i], "-resolution") == 0) {
if (i + 1 >= argc) { if (i + 1 >= argc) {
printf("-resolution needs an extra parameter specifying the application UI resolution\n"); printf("-resolution needs an extra parameter specifying the application UI resolution\n");
usage(argv[0]); usage(argv[0]);

View file

@ -22,9 +22,6 @@
#include <QDebug> #include <QDebug>
#include <QApplication> #include <QApplication>
#include <QGraphicsLinearLayout> #include <QGraphicsLinearLayout>
#ifndef QT_NO_OPENGL
#include <QGLWidget>
#endif
#include <QObject> #include <QObject>
#include "button.h" #include "button.h"
@ -36,7 +33,7 @@
#include "mainview.h" #include "mainview.h"
#include "gvbwidget.h" #include "gvbwidget.h"
MainView::MainView(const bool enableOpenGL, const bool outputFps, const bool imageRendering, QWidget *parent) MainView::MainView(const bool outputFps, const bool imageRendering, QWidget *parent)
: QGraphicsView(parent) : QGraphicsView(parent)
, m_scene(0) , m_scene(0)
, m_mainLayout(0) , m_mainLayout(0)
@ -48,7 +45,6 @@ MainView::MainView(const bool enableOpenGL, const bool outputFps, const bool ima
, m_fpsUpdated() , m_fpsUpdated()
, m_Fpss() , m_Fpss()
, m_angle(0) , m_angle(0)
, m_enableOpenGL(enableOpenGL)
{ {
construct(); construct();
} }
@ -242,17 +238,7 @@ void MainView::construct()
{ {
m_scene = new QGraphicsScene; m_scene = new QGraphicsScene;
#ifndef QT_NO_OPENGL setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
if (m_enableOpenGL) {
qDebug() << "OpenGL enabled";
setViewport(new QGLWidget);
// Qt doc says: This is the preferred update mode for
// viewports that do not support partial updates, such as QGLWidget...
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
} else
#endif
setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
setScene(m_scene); setScene(m_scene);
m_scene->setItemIndexMethod(QGraphicsScene::NoIndex); m_scene->setItemIndexMethod(QGraphicsScene::NoIndex);

View file

@ -41,7 +41,7 @@ class MainView : public QGraphicsView {
Q_OBJECT Q_OBJECT
public: public:
MainView(const bool enableOpenGL, const bool outputFps, const bool imageBasedRendering = false, QWidget *parent = 0); MainView(const bool outputFps, const bool imageBasedRendering = false, QWidget *parent = 0);
~MainView(); ~MainView();
void setTestWidget(QGraphicsWidget *testWidget); void setTestWidget(QGraphicsWidget *testWidget);
@ -97,7 +97,6 @@ private:
QList<qreal> m_Fpss; QList<qreal> m_Fpss;
int m_angle; int m_angle;
bool m_enableOpenGL;
}; };
#endif //__MAINWINDOW_H__ #endif //__MAINWINDOW_H__

View file

@ -34,10 +34,9 @@ public:
enum Option { enum Option {
NoOptions = 0x1, NoOptions = 0x1,
UseListItemCache = 0x2, UseListItemCache = 0x2,
UseOpenGL = 0x4, OutputFps = 0x4,
OutputFps = 0x8, NoResourceUsage = 0x8,
NoResourceUsage = 0x10, ManualTest = 0x10
ManualTest = 0x20
}; };
Q_DECLARE_FLAGS(Options, Option) Q_DECLARE_FLAGS(Options, Option)

View file

@ -23,9 +23,6 @@
#include "chip.h" #include "chip.h"
#include <QtGui> #include <QtGui>
#ifndef QT_NO_OPENGL
#include <QtOpenGL>
#endif
ChipTester::ChipTester(QWidget *parent) ChipTester::ChipTester(QWidget *parent)
: QGraphicsView(parent), : QGraphicsView(parent),
@ -48,13 +45,6 @@ void ChipTester::setAntialias(bool enabled)
setRenderHint(QPainter::Antialiasing, enabled); setRenderHint(QPainter::Antialiasing, enabled);
} }
void ChipTester::setOpenGL(bool enabled)
{
#ifndef QT_NO_OPENGL
setViewport(enabled ? new QGLWidget(QGLFormat(QGL::SampleBuffers)) : 0);
#endif
}
void ChipTester::setOperation(Operation operation) void ChipTester::setOperation(Operation operation)
{ {
this->operation = operation; this->operation = operation;

View file

@ -39,7 +39,6 @@ public:
ChipTester(QWidget *parent = nullptr); ChipTester(QWidget *parent = nullptr);
void setAntialias(bool enabled); void setAntialias(bool enabled);
void setOpenGL(bool enabled);
void runBenchmark(); void runBenchmark();
void setOperation(Operation operation); void setOperation(Operation operation);

View file

@ -373,31 +373,22 @@ void tst_QGraphicsView::mapRectFromScene()
void tst_QGraphicsView::chipTester_data() void tst_QGraphicsView::chipTester_data()
{ {
QTest::addColumn<bool>("antialias"); QTest::addColumn<bool>("antialias");
QTest::addColumn<bool>("opengl");
QTest::addColumn<int>("operation"); QTest::addColumn<int>("operation");
QTest::newRow("rotate, normal") << false << false << 0; QTest::newRow("rotate") << false << 0;
QTest::newRow("rotate, normal, antialias") << true << false << 0; QTest::newRow("rotate, antialias") << true << 0;
QTest::newRow("rotate, opengl") << false << true << 0; QTest::newRow("zoom") << false << 1;
QTest::newRow("rotate, opengl, antialias") << true << true << 0; QTest::newRow("zoom, antialias") << true << 1;
QTest::newRow("zoom, normal") << false << false << 1; QTest::newRow("translate") << false << 2;
QTest::newRow("zoom, normal, antialias") << true << false << 1; QTest::newRow("translate, antialias") << true << 2;
QTest::newRow("zoom, opengl") << false << true << 1;
QTest::newRow("zoom, opengl, antialias") << true << true << 1;
QTest::newRow("translate, normal") << false << false << 2;
QTest::newRow("translate, normal, antialias") << true << false << 2;
QTest::newRow("translate, opengl") << false << true << 2;
QTest::newRow("translate, opengl, antialias") << true << true << 2;
} }
void tst_QGraphicsView::chipTester() void tst_QGraphicsView::chipTester()
{ {
QFETCH(bool, antialias); QFETCH(bool, antialias);
QFETCH(bool, opengl);
QFETCH(int, operation); QFETCH(int, operation);
ChipTester tester; ChipTester tester;
tester.setAntialias(antialias); tester.setAntialias(antialias);
tester.setOpenGL(opengl);
tester.setOperation(ChipTester::Operation(operation)); tester.setOperation(ChipTester::Operation(operation));
tester.show(); tester.show();
QTest::qWaitForWindowShown(&tester); QTest::qWaitForWindowShown(&tester);

View file

@ -3,7 +3,7 @@
** Copyright (C) 2015 The Qt Company Ltd. ** Copyright (C) 2015 The Qt Company Ltd.
** Copyright (C) 2016 Ivailo Monev ** Copyright (C) 2016 Ivailo Monev
** **
** This file is part of the QtOpenGL module of the Katie Toolkit. ** This file is part of the test suite of the Katie Toolkit.
** **
** $QT_BEGIN_LICENSE:LGPL$ ** $QT_BEGIN_LICENSE:LGPL$
** **