Remove Qt6 switches from QtGui
Removing now dead code Change-Id: I021539da6517fdb8443f8ae9431fc172b7910cfc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
93038767b7
commit
50b9a4b357
@ -94,9 +94,6 @@ public:
|
|||||||
OptimizedWrite,
|
OptimizedWrite,
|
||||||
ProgressiveScanWrite,
|
ProgressiveScanWrite,
|
||||||
ImageTransformation
|
ImageTransformation
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
, TransformedByDefault
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Transformation {
|
enum Transformation {
|
||||||
|
@ -1142,10 +1142,6 @@ bool QImageReader::autoTransform() const
|
|||||||
case QImageReaderPrivate::DoNotApplyTransform:
|
case QImageReaderPrivate::DoNotApplyTransform:
|
||||||
return false;
|
return false;
|
||||||
case QImageReaderPrivate::UsePluginDefault:
|
case QImageReaderPrivate::UsePluginDefault:
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
if (d->initHandler())
|
|
||||||
return d->handler->supportsOption(QImageIOHandler::TransformedByDefault);
|
|
||||||
#endif
|
|
||||||
Q_FALLTHROUGH();
|
Q_FALLTHROUGH();
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -1994,11 +1994,7 @@ bool QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window,
|
|||||||
return platformWindow->windowEvent(event);
|
return platformWindow->windowEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
|
bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
|
||||||
#else
|
|
||||||
bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return window->nativeEvent(eventType, message, result);
|
return window->nativeEvent(eventType, message, result);
|
||||||
}
|
}
|
||||||
|
@ -187,11 +187,7 @@ public:
|
|||||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
|
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result);
|
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result);
|
||||||
#else
|
|
||||||
static bool processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static bool sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event);
|
static bool sendQWindowEventToQPlatformWindow(QWindow *window, QEvent *event);
|
||||||
|
|
||||||
|
@ -2653,11 +2653,7 @@ void QWindow::tabletEvent(QTabletEvent *ev)
|
|||||||
Should return true only if the event was handled.
|
Should return true only if the event was handled.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
bool QWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
|
bool QWindow::nativeEvent(const QByteArray &eventType, void *message, qintptr *result)
|
||||||
#else
|
|
||||||
bool QWindow::nativeEvent(const QByteArray &eventType, void *message, long *result)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Q_UNUSED(eventType);
|
Q_UNUSED(eventType);
|
||||||
Q_UNUSED(message);
|
Q_UNUSED(message);
|
||||||
|
@ -374,11 +374,7 @@ protected:
|
|||||||
#if QT_CONFIG(tabletevent)
|
#if QT_CONFIG(tabletevent)
|
||||||
virtual void tabletEvent(QTabletEvent *);
|
virtual void tabletEvent(QTabletEvent *);
|
||||||
#endif
|
#endif
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
|
virtual bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result);
|
||||||
#else
|
|
||||||
virtual bool nativeEvent(const QByteArray &eventType, void *message, long *result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QWindow(QWindowPrivate &dd, QWindow *parent);
|
QWindow(QWindowPrivate &dd, QWindow *parent);
|
||||||
|
|
||||||
|
@ -896,11 +896,7 @@ QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, cons
|
|||||||
\note This function can only be called from the GUI thread.
|
\note This function can only be called from the GUI thread.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
|
bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result)
|
||||||
#else
|
|
||||||
bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
|
return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
|
||||||
}
|
}
|
||||||
|
@ -244,11 +244,7 @@ public:
|
|||||||
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
|
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
|
||||||
#endif // QT_CONFIG(draganddrop)
|
#endif // QT_CONFIG(draganddrop)
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result);
|
static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, qintptr *result);
|
||||||
#else
|
|
||||||
static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Changes to the screen
|
// Changes to the screen
|
||||||
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary = false);
|
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary = false);
|
||||||
|
@ -616,16 +616,6 @@ QFontEngineData::~QFontEngineData()
|
|||||||
\since 5.2
|
\since 5.2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
/*
|
|
||||||
\obsolete
|
|
||||||
Constructs a font from \a font for use on the paint device \a pd.
|
|
||||||
*/
|
|
||||||
QFont::QFont(const QFont &font, QPaintDevice *pd)
|
|
||||||
: QFont(font, static_cast<const QPaintDevice*>(pd))
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 5.13
|
\since 5.13
|
||||||
Constructs a font from \a font for use on the paint device \a pd.
|
Constructs a font from \a font for use on the paint device \a pd.
|
||||||
|
@ -169,9 +169,6 @@ public:
|
|||||||
QFont();
|
QFont();
|
||||||
QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false);
|
QFont(const QString &family, int pointSize = -1, int weight = -1, bool italic = false);
|
||||||
explicit QFont(const QStringList &families, int pointSize = -1, int weight = -1, bool italic = false);
|
explicit QFont(const QStringList &families, int pointSize = -1, int weight = -1, bool italic = false);
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
QFont(const QFont &font, QPaintDevice *pd);
|
|
||||||
#endif
|
|
||||||
QFont(const QFont &font, const QPaintDevice *pd);
|
QFont(const QFont &font, const QPaintDevice *pd);
|
||||||
QFont(const QFont &font);
|
QFont(const QFont &font);
|
||||||
~QFont();
|
~QFont();
|
||||||
|
@ -352,21 +352,7 @@ QTextLayout::QTextLayout(const QString& text)
|
|||||||
calculations will be done in screen metrics.
|
calculations will be done in screen metrics.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
/*!
|
|
||||||
\if !defined(qt6)
|
|
||||||
\fn QTextLayout::QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice)
|
|
||||||
\obsolete
|
|
||||||
Identical to QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
|
|
||||||
\else
|
|
||||||
\nothing
|
|
||||||
\endif
|
|
||||||
*/
|
|
||||||
|
|
||||||
QTextLayout::QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice)
|
|
||||||
#else
|
|
||||||
QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
|
QTextLayout::QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
const QFont f(paintdevice ? QFont(font, paintdevice) : font);
|
const QFont f(paintdevice ? QFont(font, paintdevice) : font);
|
||||||
d = new QTextEngine((text.isNull() ? (const QString&)QString::fromLatin1("") : text), f);
|
d = new QTextEngine((text.isNull() ? (const QString&)QString::fromLatin1("") : text), f);
|
||||||
|
@ -108,19 +108,7 @@ public:
|
|||||||
// does itemization
|
// does itemization
|
||||||
QTextLayout();
|
QTextLayout();
|
||||||
QTextLayout(const QString& text);
|
QTextLayout(const QString& text);
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
QTextLayout(const QString &text, const QFont &font, QPaintDevice *paintdevice = nullptr);
|
|
||||||
#ifndef Q_QDOC
|
|
||||||
// the template is necessary to make QTextLayout(font,text,nullptr) and QTextLayout(font,text,NULL)
|
|
||||||
// not ambiguous. Implementation detail that should not be documented.
|
|
||||||
template<char = 0>
|
|
||||||
#endif
|
|
||||||
QTextLayout(const QString &textData, const QFont &textFont, const QPaintDevice *paintdevice)
|
|
||||||
: QTextLayout(textData, textFont, const_cast<QPaintDevice*>(paintdevice))
|
|
||||||
{}
|
|
||||||
#else
|
|
||||||
QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice = nullptr);
|
QTextLayout(const QString &text, const QFont &font, const QPaintDevice *paintdevice = nullptr);
|
||||||
#endif
|
|
||||||
QTextLayout(const QTextBlock &b);
|
QTextLayout(const QTextBlock &b);
|
||||||
~QTextLayout();
|
~QTextLayout();
|
||||||
|
|
||||||
|
@ -1020,13 +1020,7 @@ void tst_QGuiApplication::genericPluginsAndWindowSystemEvents()
|
|||||||
QCoreApplication::postEvent(&testReceiver, new QEvent(QEvent::User));
|
QCoreApplication::postEvent(&testReceiver, new QEvent(QEvent::User));
|
||||||
QCOMPARE(testReceiver.customEvents, 0);
|
QCOMPARE(testReceiver.customEvents, 0);
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
QStaticPlugin testPluginInfo(qt_plugin_instance, qt_plugin_query_metadata);
|
QStaticPlugin testPluginInfo(qt_plugin_instance, qt_plugin_query_metadata);
|
||||||
#else
|
|
||||||
QStaticPlugin testPluginInfo;
|
|
||||||
testPluginInfo.instance = qt_plugin_instance;
|
|
||||||
testPluginInfo.rawMetaData = qt_plugin_query_metadata;
|
|
||||||
#endif
|
|
||||||
qRegisterStaticPluginFunction(testPluginInfo);
|
qRegisterStaticPluginFunction(testPluginInfo);
|
||||||
int argc = 3;
|
int argc = 3;
|
||||||
char *argv[] = { const_cast<char*>(QTest::currentAppName()), const_cast<char*>("-plugin"), const_cast<char*>("testplugin") };
|
char *argv[] = { const_cast<char*>(QTest::currentAppName()), const_cast<char*>("-plugin"), const_cast<char*>("testplugin") };
|
||||||
|
@ -1800,12 +1800,10 @@ void tst_QTextDocument::toHtml()
|
|||||||
QCOMPARE(output, expectedOutput);
|
QCOMPARE(output, expectedOutput);
|
||||||
|
|
||||||
QDomDocument document;
|
QDomDocument document;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
QEXPECT_FAIL("charfmt-for-list-item",
|
QEXPECT_FAIL("charfmt-for-list-item",
|
||||||
"The attribute \"style\" is redefined in the generated HTML, which is not valid "
|
"The attribute \"style\" is redefined in the generated HTML, which is not valid "
|
||||||
"according to XML standard. The new QDomDocument implementation follows the XML "
|
"according to XML standard. The new QDomDocument implementation follows the XML "
|
||||||
"standard.", Continue);
|
"standard.", Continue);
|
||||||
#endif
|
|
||||||
QVERIFY2(document.setContent(output), "Output was not valid XML");
|
QVERIFY2(document.setContent(output), "Output was not valid XML");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user