summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-10-06 16:00:14 +0200
committerLars Knoll <lars.knoll@qt.io>2020-10-12 14:49:50 +0200
commit92b7122eda835537a6bbafb41beb858f38aed538 (patch)
tree50016765154cded7c83ce8b30c2633af76fc0c23
parentfeab484b8d2f879bee4d13aa79998f4961d41804 (diff)
Remove dead code
This code has been deprecated in Qt 5. Change-Id: Ia8e0bc791ac1f43df7124b4f30db3d0bb9966015 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/dbus/qdbusextratypes.h3
-rw-r--r--src/dbus/qtdbusglobal.h3
-rw-r--r--src/gui/kernel/qpalette.h10
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h3
-rw-r--r--src/gui/text/qplatformfontdatabase.h3
-rw-r--r--src/gui/text/qtextformat.h3
-rw-r--r--src/gui/text/qtextodfwriter.cpp6
-rw-r--r--src/network/ssl/qsslcertificate.cpp19
-rw-r--r--src/network/ssl/qsslcertificate.h8
-rw-r--r--src/network/ssl/qsslellipticcurve.h3
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.cpp2
-rw-r--r--src/plugins/styles/android/qandroidstyle.cpp6
-rw-r--r--src/xml/dom/qdom.cpp19
-rw-r--r--src/xml/dom/qdom.h14
14 files changed, 4 insertions, 98 deletions
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index 6b948c6895..c4e05062c3 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -45,9 +45,6 @@
#include <QtDBus/qtdbusglobal.h>
#include <QtCore/qvariant.h>
#include <QtCore/qstring.h>
-#if QT_DEPRECATED_SINCE(5, 6)
-#include <QtCore/qhash.h>
-#endif
#include <QtCore/qhashfunctions.h>
#ifndef QT_NO_DBUS
diff --git a/src/dbus/qtdbusglobal.h b/src/dbus/qtdbusglobal.h
index 7606edf740..177b9cda6b 100644
--- a/src/dbus/qtdbusglobal.h
+++ b/src/dbus/qtdbusglobal.h
@@ -51,9 +51,6 @@
#ifdef Q_CC_MSVC
#include <QtCore/qlist.h>
#include <QtCore/qset.h>
-#if QT_DEPRECATED_SINCE(5, 5)
-#include <QtCore/qhash.h>
-#endif
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qpalette.h b/src/gui/kernel/qpalette.h
index 7724480138..8b291dec58 100644
--- a/src/gui/kernel/qpalette.h
+++ b/src/gui/kernel/qpalette.h
@@ -92,10 +92,6 @@ public:
ToolTipBase, ToolTipText,
PlaceholderText,
NColorRoles = PlaceholderText + 1,
-#if QT_DEPRECATED_SINCE(5, 13)
- Foreground Q_DECL_ENUMERATOR_DEPRECATED_X("Use QPalette::WindowText instead") = WindowText,
- Background Q_DECL_ENUMERATOR_DEPRECATED_X("Use QPalette::Window instead") = Window
-#endif
};
Q_ENUM(ColorRole)
@@ -138,12 +134,6 @@ public:
inline const QBrush &link() const { return brush(Link); }
inline const QBrush &linkVisited() const { return brush(LinkVisited); }
inline const QBrush &placeholderText() const { return brush(PlaceholderText); }
-#if QT_DEPRECATED_SINCE(5, 13)
- QT_DEPRECATED_X("Use QPalette::windowText() instead")
- inline const QBrush &foreground() const { return windowText(); }
- QT_DEPRECATED_X("Use QPalette::window() instead")
- inline const QBrush &background() const { return window(); }
-#endif
bool operator==(const QPalette &p) const;
inline bool operator!=(const QPalette &p) const { return !(operator==(p)); }
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index 080b7c7473..5d1d25a2dd 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -319,9 +319,6 @@ public:
ShowDirsOnly = 0x00000001,
DontResolveSymlinks = 0x00000002,
DontConfirmOverwrite = 0x00000004,
-#if QT_DEPRECATED_SINCE(5, 14)
- DontUseSheet Q_DECL_ENUMERATOR_DEPRECATED = 0x00000008,
-#endif
DontUseNativeDialog = 0x00000010,
ReadOnly = 0x00000020,
HideNameFilterDetails = 0x00000040,
diff --git a/src/gui/text/qplatformfontdatabase.h b/src/gui/text/qplatformfontdatabase.h
index e464855bfd..74b9e1ba12 100644
--- a/src/gui/text/qplatformfontdatabase.h
+++ b/src/gui/text/qplatformfontdatabase.h
@@ -54,9 +54,6 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QList>
-#if QT_DEPRECATED_SINCE(5, 5)
-#include <QtCore/QHash>
-#endif
#include <QtGui/QFontDatabase>
#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qfont_p.h>
diff --git a/src/gui/text/qtextformat.h b/src/gui/text/qtextformat.h
index 71ad97a635..e1668f8362 100644
--- a/src/gui/text/qtextformat.h
+++ b/src/gui/text/qtextformat.h
@@ -141,9 +141,6 @@ public:
BlockFormat = 1,
CharFormat = 2,
ListFormat = 3,
-#if QT_DEPRECATED_SINCE(5, 3)
- TableFormat = 4,
-#endif
FrameFormat = 5,
UserFormat = 100
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index 953c05c74c..df25162a89 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -547,12 +547,6 @@ void QTextOdfWriter::writeFormats(QXmlStreamWriter &writer, const QSet<int> &for
else
writeFrameFormat(writer, textFormat.toFrameFormat(), formatIndex);
break;
-#if QT_DEPRECATED_SINCE(5, 3)
- case QTextFormat::TableFormat:
- // this case never happens, because TableFormat is a FrameFormat
- Q_UNREACHABLE();
- break;
-#endif
}
}
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 956a1df29c..5dd3f49524 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -247,25 +247,6 @@ QSslCertificate &QSslCertificate::operator=(const QSslCertificate &other)
\sa clear()
*/
-#if QT_DEPRECATED_SINCE(5,0)
-/*!
- \fn bool QSslCertificate::isValid() const
- \obsolete
-
- To verify a certificate, use verify().
- To check if a certificate is blacklisted, use isBlacklisted().
- To check if a certificate has expired or is not yet valid, compare
- expiryDate() and effectiveDate() with QDateTime::currentDateTime()
-
- This function checks that the current
- date-time is within the date-time range during which the
- certificate is considered valid, and checks that the
- certificate is not in a blacklist of fraudulent certificates.
-
- \sa isNull(), verify(), isBlacklisted(), expiryDate(), effectiveDate()
-*/
-#endif
-
/*!
Returns \c true if this certificate is blacklisted; otherwise
returns \c false.
diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h
index 8cfeaeb273..cf97dcbee8 100644
--- a/src/network/ssl/qsslcertificate.h
+++ b/src/network/ssl/qsslcertificate.h
@@ -103,14 +103,6 @@ public:
inline bool operator!=(const QSslCertificate &other) const { return !operator==(other); }
bool isNull() const;
-#if QT_DEPRECATED_SINCE(5,0)
- QT_DEPRECATED inline bool isValid() const {
- const QDateTime currentTime = QDateTime::currentDateTimeUtc();
- return currentTime >= effectiveDate() &&
- currentTime <= expiryDate() &&
- !isBlacklisted();
- }
-#endif
bool isBlacklisted() const;
bool isSelfSigned() const;
void clear();
diff --git a/src/network/ssl/qsslellipticcurve.h b/src/network/ssl/qsslellipticcurve.h
index 95441e75bf..37f77bde68 100644
--- a/src/network/ssl/qsslellipticcurve.h
+++ b/src/network/ssl/qsslellipticcurve.h
@@ -43,9 +43,6 @@
#include <QtNetwork/qtnetworkglobal.h>
#include <QtCore/QString>
#include <QtCore/QMetaType>
-#if QT_DEPRECATED_SINCE(5, 6)
-#include <QtCore/QHash>
-#endif
#include <QtCore/qhashfunctions.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.cpp b/src/plugins/platforms/android/qandroidplatformtheme.cpp
index 9d7d84e09a..30a967cc26 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.cpp
+++ b/src/plugins/platforms/android/qandroidplatformtheme.cpp
@@ -304,7 +304,7 @@ static std::shared_ptr<AndroidStyle> loadAndroidStyle(QPalette *defaultPalette)
attributeIterator = item.find(QLatin1String("defaultBackgroundColor"));
if (attributeIterator != item.constEnd())
- palette.setColor(QPalette::Background, QRgb(int(attributeIterator.value().toDouble())));
+ palette.setColor(QPalette::Window, QRgb(int(attributeIterator.value().toDouble())));
attributeIterator = item.find(QLatin1String("TextAppearance_textColor"));
if (attributeIterator != item.constEnd())
diff --git a/src/plugins/styles/android/qandroidstyle.cpp b/src/plugins/styles/android/qandroidstyle.cpp
index d19e249cb4..1baf568fa9 100644
--- a/src/plugins/styles/android/qandroidstyle.cpp
+++ b/src/plugins/styles/android/qandroidstyle.cpp
@@ -1407,7 +1407,7 @@ void QAndroidStyle::AndroidControl::drawControl(const QStyleOption *opt, QPainte
qDrawShadePanel(p, frame->rect, frame->palette, frame->state & State_Sunken,
frame->lineWidth);
} else {
- qDrawPlainRect(p, frame->rect, frame->palette.foreground().color(), frame->lineWidth);
+ qDrawPlainRect(p, frame->rect, frame->palette.windowText().color(), frame->lineWidth);
}
} else {
if (const QStyleOptionFocusRect *fropt = qstyleoption_cast<const QStyleOptionFocusRect *>(opt)) {
@@ -1421,13 +1421,13 @@ void QAndroidStyle::AndroidControl::drawControl(const QStyleOption *opt, QPainte
else
p->setPen(Qt::white);
} else {
- p->setPen(opt->palette.foreground().color());
+ p->setPen(opt->palette.windowText().color());
}
QRect focusRect = opt->rect.adjusted(1, 1, -1, -1);
p->drawRect(focusRect.adjusted(0, 0, -1, -1)); //draw pen inclusive
p->setPen(oldPen);
} else {
- p->fillRect(opt->rect, opt->palette.brush(QPalette::Background));
+ p->fillRect(opt->rect, opt->palette.window());
}
}
}
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 43e9034ee9..5f8a93e290 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -6125,18 +6125,9 @@ bool QDomDocument::setContent(const QString& text, bool namespaceProcessing, QSt
if (!impl)
impl = new QDomDocumentPrivate();
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- QXmlInputSource source;
- source.setData(text);
- return IMPL->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
-QT_WARNING_POP
-#else
QXmlStreamReader streamReader(text);
streamReader.setNamespaceProcessing(namespaceProcessing);
return IMPL->setContent(&streamReader, namespaceProcessing, errorMsg, errorLine, errorColumn);
-#endif
}
/*!
@@ -6197,19 +6188,9 @@ bool QDomDocument::setContent(const QByteArray &data, bool namespaceProcessing,
if (!impl)
impl = new QDomDocumentPrivate();
-#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && QT_DEPRECATED_SINCE(5, 15)
- QBuffer buf;
- buf.setData(data);
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- QXmlInputSource source(&buf);
-QT_WARNING_POP
- return IMPL->setContent(&source, namespaceProcessing, errorMsg, errorLine, errorColumn);
-#else
QXmlStreamReader streamReader(data);
streamReader.setNamespaceProcessing(namespaceProcessing);
return IMPL->setContent(&streamReader, namespaceProcessing, errorMsg, errorLine, errorColumn);
-#endif
}
/*!
diff --git a/src/xml/dom/qdom.h b/src/xml/dom/qdom.h
index 5c2ece72d2..779e05805c 100644
--- a/src/xml/dom/qdom.h
+++ b/src/xml/dom/qdom.h
@@ -339,23 +339,9 @@ public:
bool setContent(const QByteArray& text, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(const QString& text, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- QT_DEPRECATED_X("Use other overloads instead")
- bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
-QT_WARNING_POP
-#endif
bool setContent(const QByteArray& text, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(const QString& text, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
bool setContent(QIODevice* dev, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
-#if QT_DEPRECATED_SINCE(5, 15)
-QT_WARNING_PUSH
-QT_WARNING_DISABLE_DEPRECATED
- QT_DEPRECATED_X("Use other overloads instead")
- bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg=nullptr, int *errorLine=nullptr, int *errorColumn=nullptr );
-QT_WARNING_POP
-#endif
bool setContent(QXmlStreamReader *reader, bool namespaceProcessing, QString *errorMsg = nullptr,
int *errorLine = nullptr, int *errorColumn = nullptr);