summaryrefslogtreecommitdiffstats
path: root/tests/quicktestbrowser/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/quicktestbrowser/utils.h')
-rw-r--r--tests/quicktestbrowser/utils.h29
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/quicktestbrowser/utils.h b/tests/quicktestbrowser/utils.h
deleted file mode 100644
index 8521e9bf5..000000000
--- a/tests/quicktestbrowser/utils.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-#ifndef UTILS_H
-#define UTILS_H
-
-#include <QtCore/QFileInfo>
-#include <QtCore/QUrl>
-
-class Utils : public QObject {
- Q_OBJECT
-public:
- Q_INVOKABLE static QUrl fromUserInput(const QString& userInput);
- Q_INVOKABLE static QString domainFromString(const QString& urlString);
-};
-
-inline QUrl Utils::fromUserInput(const QString& userInput)
-{
- QFileInfo fileInfo(userInput);
- if (fileInfo.exists())
- return QUrl::fromLocalFile(fileInfo.absoluteFilePath());
- return QUrl::fromUserInput(userInput);
-}
-
-inline QString Utils::domainFromString(const QString& urlString)
-{
- return QUrl::fromUserInput(urlString).host();
-}
-
-#endif // UTILS_H