diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-07-22 18:01:00 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-07-25 07:12:50 +0000 |
commit | 165fefffe8a34536c050c20ccb919c37cc00f307 (patch) | |
tree | b5403128f77254c372a53f768f537ea961e9b1fb | |
parent | 041ff11aae2bad95d7358023dd054da590c9c3cd (diff) |
Drop Qt5: Utils: Remove code below Qt 6.0.0
Change-Id: I6557238ceccc11c2d1fd8168f1e578fd27a1ee95
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/libs/utils/algorithm.h | 8 | ||||
-rw-r--r-- | src/libs/utils/launcherinterface.cpp | 21 | ||||
-rw-r--r-- | src/libs/utils/navigationtreeview.cpp | 4 | ||||
-rw-r--r-- | src/libs/utils/smallstring.h | 7 |
4 files changed, 4 insertions, 36 deletions
diff --git a/src/libs/utils/algorithm.h b/src/libs/utils/algorithm.h index 32ad6d3e46..a5b29db087 100644 --- a/src/libs/utils/algorithm.h +++ b/src/libs/utils/algorithm.h @@ -1296,14 +1296,6 @@ QSet<T> toSet(const QList<T> &list) return QSet<T>(list.begin(), list.end()); } -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) -template<class T> -QSet<T> toSet(const QVector<T> &vec) -{ - return QSet<T>(vec.begin(), vec.end()); -} -#endif - template<class T> QList<T> toList(const QSet<T> &set) { diff --git a/src/libs/utils/launcherinterface.cpp b/src/libs/utils/launcherinterface.cpp index 8e402f51c8..bf49629a77 100644 --- a/src/libs/utils/launcherinterface.cpp +++ b/src/libs/utils/launcherinterface.cpp @@ -48,24 +48,11 @@ class LauncherProcess : public QProcess public: LauncherProcess(QObject *parent) : QProcess(parent) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) && defined(Q_OS_UNIX) - setChildProcessModifier([this] { setupChildProcess_impl(); }); -#endif - } - -private: -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - void setupChildProcess() override - { - setupChildProcess_impl(); - } -#endif - - void setupChildProcess_impl() - { #ifdef Q_OS_UNIX - const auto pid = static_cast<pid_t>(processId()); - setpgid(pid, pid); + setChildProcessModifier([this] { + const auto pid = static_cast<pid_t>(processId()); + setpgid(pid, pid); + }); #endif } }; diff --git a/src/libs/utils/navigationtreeview.cpp b/src/libs/utils/navigationtreeview.cpp index 526bdbe7de..33e55b452a 100644 --- a/src/libs/utils/navigationtreeview.cpp +++ b/src/libs/utils/navigationtreeview.cpp @@ -68,12 +68,8 @@ void NavigationTreeView::scrollTo(const QModelIndex &index, QAbstractItemView::S QAbstractItemDelegate *delegate = itemDelegate(index); if (delegate) { -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - const QStyleOptionViewItem option = viewOptions(); -#else QStyleOptionViewItem option; initViewItemOption(&option); -#endif itemRect.setWidth(delegate->sizeHint(option, index).width()); } diff --git a/src/libs/utils/smallstring.h b/src/libs/utils/smallstring.h index cabf6975a7..1e5d2cb567 100644 --- a/src/libs/utils/smallstring.h +++ b/src/libs/utils/smallstring.h @@ -34,9 +34,7 @@ #include <QByteArray> #include <QString> -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) #include <QStringEncoder> -#endif #include <algorithm> #include <charconv> @@ -488,7 +486,6 @@ public: void append(QStringView string) { -#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) QStringEncoder encoder{QStringEncoder::Utf8}; constexpr size_type temporaryArraySize = Size * 6; @@ -518,10 +515,6 @@ public: } *newEnd = 0; setSize(newEnd - data()); -#else - QByteArray array = string.toUtf8(); - append(SmallStringView{array.data(), static_cast<size_type>(array.size())}); -#endif } BasicSmallString &operator+=(SmallStringView string) |