summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-05 11:17:22 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-05-05 19:26:56 +0200
commit50b9a4b357376c13ee00e060b44a1e505c632592 (patch)
treef18b8290b3e33ea5875233dae718830bc9a352e6 /src/gui
parent93038767b71559f1606c787f97d7c307fba82723 (diff)
Remove Qt6 switches from QtGui
Removing now dead code Change-Id: I021539da6517fdb8443f8ae9431fc172b7910cfc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimageiohandler.h3
-rw-r--r--src/gui/image/qimagereader.cpp4
-rw-r--r--src/gui/kernel/qguiapplication.cpp4
-rw-r--r--src/gui/kernel/qguiapplication_p.h4
-rw-r--r--src/gui/kernel/qwindow.cpp4
-rw-r--r--src/gui/kernel/qwindow.h4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp4
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h4
-rw-r--r--src/gui/text/qfont.cpp10
-rw-r--r--src/gui/text/qfont.h3
-rw-r--r--src/gui/text/qtextlayout.cpp14
-rw-r--r--src/gui/text/qtextlayout.h12
12 files changed, 0 insertions, 70 deletions
diff --git a/src/gui/image/qimageiohandler.h b/src/gui/image/qimageiohandler.h
index 1923443997..8eb5264499 100644
--- a/src/gui/image/qimageiohandler.h
+++ b/src/gui/image/qimageiohandler.h
@@ -94,9 +94,6 @@ public:
OptimizedWrite,
ProgressiveScanWrite,
ImageTransformation
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- , TransformedByDefault
-#endif
};
enum Transformation {
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index fccf67b428..8af36f911b 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1142,10 +1142,6 @@ bool QImageReader::autoTransform() const
case QImageReaderPrivate::DoNotApplyTransform:
return false;
case QImageReaderPrivate::UsePluginDefault:
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
- if (d->initHandler())
- return d->handler->supportsOption(QImageIOHandler::TransformedByDefault);
-#endif
Q_FALLTHROUGH();
default:
break;
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 114beb6dde..eed035c221 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1994,11 +1994,7 @@ bool QGuiApplicationPrivate::sendQWindowEventToQPlatformWindow(QWindow *window,
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)
-#else
-bool QGuiApplicationPrivate::processNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
-#endif
{
return window->nativeEvent(eventType, message, result);
}
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 39bc5f36a4..7cbfb76bee 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -187,11 +187,7 @@ public:
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
#endif
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
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);
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index 1680a6d0b2..7b0f977458 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -2653,11 +2653,7 @@ void QWindow::tabletEvent(QTabletEvent *ev)
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)
-#else
-bool QWindow::nativeEvent(const QByteArray &eventType, void *message, long *result)
-#endif
{
Q_UNUSED(eventType);
Q_UNUSED(message);
diff --git a/src/gui/kernel/qwindow.h b/src/gui/kernel/qwindow.h
index d7625c5da4..14d8ba1810 100644
--- a/src/gui/kernel/qwindow.h
+++ b/src/gui/kernel/qwindow.h
@@ -374,11 +374,7 @@ protected:
#if QT_CONFIG(tabletevent)
virtual void tabletEvent(QTabletEvent *);
#endif
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
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);
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index 58bb0f1cc9..31097dfac6 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -896,11 +896,7 @@ QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *window, cons
\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)
-#else
-bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)
-#endif
{
return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
}
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index dc03b00dc7..742d8201dd 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -244,11 +244,7 @@ public:
Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers);
#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);
-#else
- static bool handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result);
-#endif
// Changes to the screen
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary = false);
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 45310d0406..4b2e257231 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -616,16 +616,6 @@ QFontEngineData::~QFontEngineData()
\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
Constructs a font from \a font for use on the paint device \a pd.
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index fa17011fe2..87fc08dda9 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -169,9 +169,6 @@ public:
QFont();
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);
-#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);
~QFont();
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index b37baaf655..48f26f8665 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -352,21 +352,7 @@ QTextLayout::QTextLayout(const QString& text)
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)
-#endif
{
const QFont f(paintdevice ? QFont(font, paintdevice) : font);
d = new QTextEngine((text.isNull() ? (const QString&)QString::fromLatin1("") : text), f);
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h
index 16dde50f05..5c6dead276 100644
--- a/src/gui/text/qtextlayout.h
+++ b/src/gui/text/qtextlayout.h
@@ -108,19 +108,7 @@ public:
// does itemization
QTextLayout();
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);
-#endif
QTextLayout(const QTextBlock &b);
~QTextLayout();