aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2022-06-20 13:34:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-21 22:23:28 +0000
commitbf37f694aedfb2f6ccc4f71b3332b51d86c0098d (patch)
tree429784a60caaa41ae2708d016a2a35a7cec9e5d3
parent197e328676e8d2eab1d92efcf8ea3e6e06fc5e7b (diff)
Remove dead code in TextEdit/TextInput tests
It was distracting to have functions there with XXX comments, and no longer in use anyway. I don't see Carbon APIs in use either (egads). Change-Id: I7e64deeb0b7df1ae0a3edb66e052aeb6beca23ef Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit c724ae207ab019f91009bc4c57864c6625f8d8a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp20
-rw-r--r--tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp20
2 files changed, 0 insertions, 40 deletions
diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
index e2043ee81a..63417bf32f 100644
--- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
+++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
@@ -35,10 +35,6 @@
#include <QtGui/qstylehints.h>
#include <qmath.h>
-#ifdef Q_OS_MAC
-#include <Carbon/Carbon.h>
-#endif
-
Q_DECLARE_METATYPE(QQuickTextEdit::SelectionMode)
Q_DECLARE_METATYPE(Qt::Key)
DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
@@ -50,22 +46,6 @@ static bool isPlatformWayland()
return !QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive);
}
-QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual)
-{
- // XXX This will be replaced by some clever persistent platform image store.
- QString persistent_dir = QQmlDataTest::instance()->dataDirectory();
- QString arch = "unknown-architecture"; // QTest needs to help with this.
-
- QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png";
-
- if (!QFile::exists(expectfile)) {
- actual.save(expectfile);
- qWarning() << "created" << expectfile;
- }
-
- return expectfile;
-}
-
typedef QPair<int, QChar> Key;
class tst_qquicktextedit : public QQmlDataTest
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index f3f687c5e1..ad9bd7a501 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -22,10 +22,6 @@
#include <math.h>
#include <qmath.h>
-#ifdef Q_OS_OSX
-#include <Carbon/Carbon.h>
-#endif
-
#include "qplatformdefs.h"
#include <QtQuickTestUtils/private/platformquirks_p.h>
#include <QtQuickTestUtils/private/platforminputcontext_p.h>
@@ -36,22 +32,6 @@ Q_DECLARE_METATYPE(Qt::Key)
DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
-QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual)
-{
- // XXX This will be replaced by some clever persistent platform image store.
- QString persistent_dir = QQmlDataTest::instance()->dataDirectory();
- QString arch = "unknown-architecture"; // QTest needs to help with this.
-
- QString expectfile = persistent_dir + QDir::separator() + filebasename + QLatin1Char('-') + arch + ".png";
-
- if (!QFile::exists(expectfile)) {
- actual.save(expectfile);
- qWarning() << "created" << expectfile;
- }
-
- return expectfile;
-}
-
template <typename T> static T evaluate(QObject *scope, const QString &expression)
{
QQmlExpression expr(qmlContext(scope), scope, expression);