forked from qt-creator/qt-creator
Drop Qt5: StringTable: Remove code below Qt 6.0.0
Change-Id: I28476865bcaa9ab2fc4e5ecd1ab80a10e4734f1b Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -96,12 +96,6 @@ QString StringTablePrivate::insert(const QString &string)
|
|||||||
if (string.isEmpty())
|
if (string.isEmpty())
|
||||||
return string;
|
return string;
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
#ifndef QT_NO_UNSHARABLE_CONTAINERS
|
|
||||||
QTC_ASSERT(const_cast<QString&>(string).data_ptr()->ref.isSharable(), return string);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QMutexLocker locker(&m_lock);
|
QMutexLocker locker(&m_lock);
|
||||||
// From this point of time any possible new call to startGC() will be held until
|
// From this point of time any possible new call to startGC() will be held until
|
||||||
// we finish this function. So we are sure that after canceling the running GC() method now,
|
// we finish this function. So we are sure that after canceling the running GC() method now,
|
||||||
@@ -138,13 +132,8 @@ StringTable::~StringTable()
|
|||||||
|
|
||||||
static inline bool isQStringInUse(const QString &string)
|
static inline bool isQStringInUse(const QString &string)
|
||||||
{
|
{
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
auto data_ptr = const_cast<QString&>(string).data_ptr();
|
|
||||||
return data_ptr->ref.isShared() || data_ptr->ref.isStatic() /* QStringLiteral ? */;
|
|
||||||
#else
|
|
||||||
auto data_ptr = const_cast<QString&>(string).data_ptr();
|
auto data_ptr = const_cast<QString&>(string).data_ptr();
|
||||||
return data_ptr->isShared() || !data_ptr->isMutable() /* QStringLiteral ? */;
|
return data_ptr->isShared() || !data_ptr->isMutable() /* QStringLiteral ? */;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringTablePrivate::GC(QFutureInterface<void> &futureInterface)
|
void StringTablePrivate::GC(QFutureInterface<void> &futureInterface)
|
||||||
|
|||||||
Reference in New Issue
Block a user