From db3cd00232d72a5603ebff9e71198554b5abe3ed Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 20 Jul 2022 20:14:20 +0200 Subject: [PATCH] Drop Qt5: Remove porting.h Checked also plugins in tqtc-qtc-super and in qtc-super. Change-Id: I3e5b114a49e26ae52b71c11ef6a1f90264dd5a38 Reviewed-by: Qt CI Bot Reviewed-by: Eike Ziller --- src/libs/utils/CMakeLists.txt | 1 - src/libs/utils/porting.h | 51 --------------------------- src/libs/utils/utils.qbs | 1 - src/tools/sdktool/CMakeLists.txt | 1 - src/tools/sdktool/sdktoollib.qbs | 1 - tests/manual/proparser/CMakeLists.txt | 5 --- tests/manual/proparser/testreader.qbs | 4 --- 7 files changed, 64 deletions(-) delete mode 100644 src/libs/utils/porting.h diff --git a/src/libs/utils/CMakeLists.txt b/src/libs/utils/CMakeLists.txt index 4029752e899..45551143ba3 100644 --- a/src/libs/utils/CMakeLists.txt +++ b/src/libs/utils/CMakeLists.txt @@ -116,7 +116,6 @@ add_qtc_library(Utils persistentsettings.cpp persistentsettings.h pointeralgorithm.h port.cpp port.h - porting.h portlist.cpp portlist.h predicates.h processenums.h diff --git a/src/libs/utils/porting.h b/src/libs/utils/porting.h deleted file mode 100644 index bf447ec15e8..00000000000 --- a/src/libs/utils/porting.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2020 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of Qt Creator. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3 as published by the Free Software -** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-3.0.html. -** -****************************************************************************/ - -#pragma once - -#include "utils_global.h" - -#include - -namespace Utils { - -// FIXME: Remove when downstream has been adapted - -using QHashValueType = size_t; -using QtSizeType = qsizetype; -using StringView = QStringView; - -inline QStringView make_stringview(const QString &s) -{ - return QStringView(s); -} - -// QStringView::mid in Qt5 does not do bounds checking, in Qt6 it does -inline QStringView midView(const QString &s, int offset, int length = -1) -{ - return QStringView(s).mid(offset, length); -} - -} // namespace Utils diff --git a/src/libs/utils/utils.qbs b/src/libs/utils/utils.qbs index 8636eb0bdc1..ad13b9bc0bc 100644 --- a/src/libs/utils/utils.qbs +++ b/src/libs/utils/utils.qbs @@ -222,7 +222,6 @@ Project { "pointeralgorithm.h", "port.cpp", "port.h", - "porting.h", "portlist.cpp", "portlist.h", "processenums.h", diff --git a/src/tools/sdktool/CMakeLists.txt b/src/tools/sdktool/CMakeLists.txt index e25a8c0b2c4..aebe6836e0f 100644 --- a/src/tools/sdktool/CMakeLists.txt +++ b/src/tools/sdktool/CMakeLists.txt @@ -77,7 +77,6 @@ extend_qtc_library(sdktoolLib namevaluedictionary.cpp namevaluedictionary.h namevalueitem.cpp namevalueitem.h persistentsettings.cpp persistentsettings.h - porting.h qtcassert.cpp qtcassert.h savefile.cpp savefile.h stringutils.cpp stringutils.h diff --git a/src/tools/sdktool/sdktoollib.qbs b/src/tools/sdktool/sdktoollib.qbs index 4bc7a8777eb..520bcb7197f 100644 --- a/src/tools/sdktool/sdktoollib.qbs +++ b/src/tools/sdktool/sdktoollib.qbs @@ -96,7 +96,6 @@ QtcLibrary { "namevaluedictionary.cpp", "namevaluedictionary.h", "namevalueitem.cpp", "namevalueitem.h", "persistentsettings.cpp", "persistentsettings.h", - "porting.h", "qtcassert.cpp", "qtcassert.h", "savefile.cpp", "savefile.h", "stringutils.cpp" diff --git a/tests/manual/proparser/CMakeLists.txt b/tests/manual/proparser/CMakeLists.txt index a3fecbe5076..d376a7bb8c1 100644 --- a/tests/manual/proparser/CMakeLists.txt +++ b/tests/manual/proparser/CMakeLists.txt @@ -32,11 +32,6 @@ extend_qtc_test(tst_manual_proparser registry.cpp registry_p.h ) -extend_qtc_test(tst_manual_proparser - SOURCES_PREFIX "${PROJECT_SOURCE_DIR}/src/libs/utils/" - SOURCES porting.h -) - extend_qtc_test(tst_manual_proparser CONDITION WIN32 DEPENDS advapi32 ) diff --git a/tests/manual/proparser/testreader.qbs b/tests/manual/proparser/testreader.qbs index 0bc7b9387f3..4d71ff0f21a 100644 --- a/tests/manual/proparser/testreader.qbs +++ b/tests/manual/proparser/testreader.qbs @@ -53,9 +53,5 @@ QtcManualtest { Group { name: "Porting Helper" prefix: "../../../src/libs/utils/" - - files: [ - "porting.h" - ] } }