forked from qt-creator/qt-creator
Cpp{Editor,Tools}: Remove some Qt4-only code
Change-Id: I94ca7b239e974b6b400933466ee2ef5ae4def336 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -60,7 +60,7 @@ QString StringTable::insert(const QString &string)
|
||||
if (string.isEmpty())
|
||||
return string;
|
||||
|
||||
#if QT_VERSION >= 0x050000 && QT_SUPPORTS(UNSHARABLE_CONTAINERS)
|
||||
#if QT_SUPPORTS(UNSHARABLE_CONTAINERS)
|
||||
QTC_ASSERT(const_cast<QString&>(string).data_ptr()->ref.isSharable(), return string);
|
||||
#endif
|
||||
|
||||
@@ -90,12 +90,8 @@ enum {
|
||||
|
||||
static inline bool isQStringInUse(const QString &string)
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
QArrayData *data_ptr = const_cast<QString&>(string).data_ptr();
|
||||
return data_ptr->ref.isShared() || data_ptr->ref.isStatic();
|
||||
#else
|
||||
return const_cast<QString&>(string).data_ptr()->ref != 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void StringTable::GC()
|
||||
|
||||
Reference in New Issue
Block a user