Automated update from Qt3

pull/1/head
Timothy Pearson 10 years ago
parent a41a034902
commit 891a448afa

@ -1,9 +1,9 @@
<!DOCTYPE DCF> <!DOCTYPE DCF>
<DCF ref="assistant.html" icon="assistant.png" imagedir="../../gif" title="TQt Assistant Manual"> <DCF ref="assistant.html" icon="assistant.png" imagedir="../../gif" title="Qt Assistant Manual">
<section ref="assistant-1.html" title="Introduction"/> <section ref="assistant-1.html" title="Introduction"/>
<section ref="assistant-2.html" title="Introduction to the TQt Reference Documentation"/> <section ref="assistant-2.html" title="Introduction to the Qt Reference Documentation"/>
<section ref="assistant-3.html" title="The 1 Minute Guide to Using TQt Assistant"/> <section ref="assistant-3.html" title="The 1 Minute Guide to Using Qt Assistant"/>
<section ref="assistant-4.html" title="TQt Assistant in More Detail"/> <section ref="assistant-4.html" title="Qt Assistant in More Detail"/>
<section ref="assistant-5.html" title="Full Text Searching"/> <section ref="assistant-5.html" title="Full Text Searching"/>
<section ref="assistant-6.html" title="Customizing TQt Assistant"/> <section ref="assistant-6.html" title="Customizing Qt Assistant"/>
</DCF> </DCF>

@ -1,14 +1,14 @@
<!DOCTYPE DCF> <!DOCTYPE DCF>
<DCF ref="designer-manual.html" icon="designer.png" imagedir="../../gif" title="TQt Designer Manual"> <DCF ref="designer-manual.html" icon="designer.png" imagedir="../../gif" title="Qt Designer Manual">
<section ref="designer-manual-1.html" title="Preface"/> <section ref="designer-manual-1.html" title="Preface"/>
<section ref="designer-manual-2.html" title="Quick Start"/> <section ref="designer-manual-2.html" title="Quick Start"/>
<section ref="designer-manual-3.html" title="Creating a Main Window Application"/> <section ref="designer-manual-3.html" title="Creating a Main Window Application"/>
<section ref="designer-manual-4.html" title="Creating Dialogs"/> <section ref="designer-manual-4.html" title="Creating Dialogs"/>
<section ref="designer-manual-5.html" title="The Designer Approach"/> <section ref="designer-manual-5.html" title=" The Designer Approach"/>
<section ref="designer-manual-6.html" title="Subclassing and Dynamic Dialogs"/> <section ref="designer-manual-6.html" title="Subclassing and Dynamic Dialogs"/>
<section ref="designer-manual-7.html" title="Creating Custom Widgets"/> <section ref="designer-manual-7.html" title="Creating Custom Widgets"/>
<section ref="designer-manual-8.html" title="Creating Database Applications"/> <section ref="designer-manual-8.html" title="Creating Database Applications"/>
<section ref="designer-manual-9.html" title="Customizing and Integrating TQt Designer"/> <section ref="designer-manual-9.html" title="Customizing and Integrating Qt Designer"/>
<section ref="designer-manual-10.html" title="Reference: Key Bindings"/> <section ref="designer-manual-10.html" title="Reference: Key Bindings"/>
<section ref="designer-manual-11.html" title="Reference: Menu Options"/> <section ref="designer-manual-11.html" title="Reference: Menu Options"/>
<section ref="designer-manual-12.html" title="Reference: Toolbar Buttons"/> <section ref="designer-manual-12.html" title="Reference: Toolbar Buttons"/>

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
../src/widgets/ntqiconview.h ../src/iconview/ntqiconview.h

@ -287,14 +287,14 @@ class Q_EXPORT TQStyleControlElementData {
TQ_UINT32 topLevelWidgetFlags; TQ_UINT32 topLevelWidgetFlags;
TQPixmap paletteBgPixmap; TQPixmap paletteBgPixmap;
#ifdef ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY #ifdef ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY
public: public:
TQStyleControlElementData(const TQStyleControlElementData&); TQStyleControlElementData(const TQStyleControlElementData&);
#else // ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY #else // ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY
private: private:
// Disable copy constructor // Disable copy constructor
TQStyleControlElementData(const TQStyleControlElementData&); TQStyleControlElementData(const TQStyleControlElementData&);
#endif // ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY #endif // ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY
}; };

File diff suppressed because it is too large Load Diff

@ -1,10 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.4.1. */ /* Bison interface for Yacc-like parsers in C
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -158,7 +156,7 @@
typedef union YYSTYPE typedef union YYSTYPE
{ {
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 692 "moc.y" #line 692 "moc.y"
char char_val; char char_val;
@ -172,8 +170,8 @@ typedef union YYSTYPE
/* Line 1676 of yacc.c */ /* Line 2068 of yacc.c */
#line 177 "moc_yacc.h" #line 175 "moc_yacc.h"
} YYSTYPE; } YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */

@ -470,7 +470,7 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format )
#endif #endif
TQString home; TQString home;
home = getenv("TQT_HOME_DIR"); home = getenv("QT_HOME_DIR");
if ( !home.isEmpty() ) { if ( !home.isEmpty() ) {
home += "/"; home += "/";
TQFileInfo i( home + "qtrc" ); TQFileInfo i( home + "qtrc" );
@ -532,7 +532,7 @@ TQSettingsPrivate::TQSettingsPrivate( TQSettings::Format format )
searchPaths.append(defPath); searchPaths.append(defPath);
TQString system; TQString system;
system = getenv("TQT_SYSTEM_DIR"); system = getenv("QT_SYSTEM_DIR");
if ( !system.isEmpty() && system[0] == '/') { if ( !system.isEmpty() && system[0] == '/') {
TQFileInfo i( system + "/qtrc" ); TQFileInfo i( system + "/qtrc" );
if ( i.isReadable() ) { if ( i.isReadable() ) {

@ -46,9 +46,9 @@
#endif #endif
// WARNING // WARNING
// When MAKE_TQSTRING_THREAD_SAFE is defined, overall TQt3 performance suffers badly! // When MAKE_QSTRING_THREAD_SAFE is defined, overall TQt3 performance suffers badly!
// TQString is thread unsafe in many other areas; perhaps this option is not even useful? // TQString is thread unsafe in many other areas; perhaps this option is not even useful?
// #define MAKE_TQSTRING_THREAD_SAFE 1 // #define MAKE_QSTRING_THREAD_SAFE 1
#include "ntqstring.h" #include "ntqstring.h"
#include "ntqregexp.h" #include "ntqregexp.h"
@ -93,9 +93,9 @@
#define ULLONG_MAX TQ_UINT64_C(18446744073709551615) #define ULLONG_MAX TQ_UINT64_C(18446744073709551615)
#endif #endif
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
#include "ntqmutex.h" #include "ntqmutex.h"
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
extern TQMutex *tqt_sharedStringMutex; extern TQMutex *tqt_sharedStringMutex;
@ -1053,9 +1053,9 @@ TQStringData::TQStringData() : TQShared(),
maxl(0), maxl(0),
islatin1(FALSE), islatin1(FALSE),
security_unpaged(FALSE) { security_unpaged(FALSE) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
mutex = new TQMutex(FALSE); mutex = new TQMutex(FALSE);
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
ref(); ref();
} }
@ -1067,9 +1067,9 @@ TQStringData::TQStringData(TQChar *u, uint l, uint m) : TQShared(),
maxl(m), maxl(m),
islatin1(FALSE), islatin1(FALSE),
security_unpaged(FALSE) { security_unpaged(FALSE) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
mutex = new TQMutex(FALSE); mutex = new TQMutex(FALSE);
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
TQStringData::~TQStringData() { TQStringData::~TQStringData() {
@ -1084,12 +1084,12 @@ TQStringData::~TQStringData() {
if ( ascii ) { if ( ascii ) {
delete[] ascii; delete[] ascii;
} }
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
if ( mutex ) { if ( mutex ) {
delete mutex; delete mutex;
mutex = NULL; mutex = NULL;
} }
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
void TQStringData::setDirty() { void TQStringData::setDirty() {
@ -1457,14 +1457,14 @@ QT_STATIC_CONST_IMPL TQChar TQChar::nbsp((ushort)0x00a0);
TQStringData* TQString::makeSharedNull() TQStringData* TQString::makeSharedNull()
{ {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
if (tqt_sharedStringMutex) tqt_sharedStringMutex->lock(); if (tqt_sharedStringMutex) tqt_sharedStringMutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if (TQString::shared_null) { if (TQString::shared_null) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
if (tqt_sharedStringMutex) tqt_sharedStringMutex->unlock(); if (tqt_sharedStringMutex) tqt_sharedStringMutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
return TQString::shared_null; return TQString::shared_null;
} }
@ -1474,9 +1474,9 @@ TQStringData* TQString::makeSharedNull()
that->d = TQString::shared_null; that->d = TQString::shared_null;
#endif #endif
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
if (tqt_sharedStringMutex) tqt_sharedStringMutex->unlock(); if (tqt_sharedStringMutex) tqt_sharedStringMutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
return TQString::shared_null; return TQString::shared_null;
} }
@ -1517,13 +1517,13 @@ TQString::TQString( const TQString &s ) :
d(s.d) d(s.d)
{ {
if ( d && (d != shared_null) ) { if ( d && (d != shared_null) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
d->ref(); d->ref();
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
} }
@ -1676,20 +1676,20 @@ TQString::~TQString()
return; return;
} }
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->deref() ) { if ( d->deref() ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
d->deleteSelf(); d->deleteSelf();
d = NULL; d = NULL;
} }
else { else {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
} }
@ -1711,22 +1711,22 @@ void TQString::real_detach()
void TQString::deref() void TQString::deref()
{ {
if ( d && (d != shared_null) ) { if ( d && (d != shared_null) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->deref() ) { if ( d->deref() ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d != shared_null ) { if ( d != shared_null ) {
delete d; delete d;
} }
d = 0; d = 0;
} }
else { else {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
} }
} }
@ -1769,13 +1769,13 @@ void TQStringData::deleteSelf()
TQString &TQString::operator=( const TQString &s ) TQString &TQString::operator=( const TQString &s )
{ {
if ( s.d && (s.d != shared_null) ) { if ( s.d && (s.d != shared_null) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
s.d->mutex->lock(); s.d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
s.d->ref(); s.d->ref();
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
s.d->mutex->unlock(); s.d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
deref(); deref();
d = s.d; d = s.d;
@ -1883,9 +1883,9 @@ void TQString::truncate( uint newLen )
*/ */
void TQString::setLength( uint newLen ) void TQString::setLength( uint newLen )
{ {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->count != 1 || newLen > d->maxl || if ( d->count != 1 || newLen > d->maxl ||
( newLen * 4 < d->maxl && d->maxl > 4 ) ) { ( newLen * 4 < d->maxl && d->maxl > 4 ) ) {
@ -1896,24 +1896,24 @@ void TQString::setLength( uint newLen )
uint len = TQMIN( d->len, newLen ); uint len = TQMIN( d->len, newLen );
memcpy( nd, d->unicode, sizeof(TQChar) * len ); memcpy( nd, d->unicode, sizeof(TQChar) * len );
bool unpaged = d->security_unpaged; bool unpaged = d->security_unpaged;
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
deref(); deref();
d = new TQStringData( nd, newLen, newMax ); d = new TQStringData( nd, newLen, newMax );
setSecurityUnPaged(unpaged); setSecurityUnPaged(unpaged);
} }
else { else {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
} }
else { else {
d->len = newLen; d->len = newLen;
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
d->setDirty(); d->setDirty();
} }
} }
@ -1999,21 +1999,21 @@ void TQString::squeeze()
*/ */
void TQString::grow( uint newLen ) void TQString::grow( uint newLen )
{ {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->count != 1 || newLen > d->maxl ) { if ( d->count != 1 || newLen > d->maxl ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
setLength( newLen ); setLength( newLen );
} }
else { else {
d->len = newLen; d->len = newLen;
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
d->setDirty(); d->setDirty();
} }
} }
@ -6423,19 +6423,19 @@ TQString TQString::fromUcs2( const unsigned short *str )
*/ */
TQChar& TQString::ref(uint i) { TQChar& TQString::ref(uint i) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( (d->count != 1) || (i >= d->len) ) { if ( (d->count != 1) || (i >= d->len) ) {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
subat( i ); subat( i );
} }
else { else {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
d->setDirty(); d->setDirty();
return d->unicode[i]; return d->unicode[i];
@ -6523,9 +6523,9 @@ TQString& TQString::setUnicode( const TQChar *unicode, uint len )
} }
} }
else { else {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->count != 1 || len > d->maxl || ( len * 4 < d->maxl && d->maxl > 4 ) ) { if ( d->count != 1 || len > d->maxl || ( len * 4 < d->maxl && d->maxl > 4 ) ) {
// detach, grown or shrink // detach, grown or shrink
uint newMax = computeNewMax( len ); uint newMax = computeNewMax( len );
@ -6533,17 +6533,17 @@ TQString& TQString::setUnicode( const TQChar *unicode, uint len )
if ( unicode ) { if ( unicode ) {
memcpy( nd, unicode, sizeof(TQChar)*len ); memcpy( nd, unicode, sizeof(TQChar)*len );
} }
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
deref(); deref();
d = new TQStringData( nd, len, newMax ); d = new TQStringData( nd, len, newMax );
} }
else { else {
d->len = len; d->len = len;
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
d->setDirty(); d->setDirty();
if ( unicode ) { if ( unicode ) {
memcpy( d->unicode, unicode, sizeof(TQChar)*len ); memcpy( d->unicode, unicode, sizeof(TQChar)*len );
@ -7254,9 +7254,9 @@ TQConstString::TQConstString( const TQChar* unicode, uint length ) :
*/ */
TQConstString::~TQConstString() TQConstString::~TQConstString()
{ {
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->lock(); d->mutex->lock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
if ( d->count > 1 ) { if ( d->count > 1 ) {
TQChar* cp = QT_ALLOC_QCHAR_VEC( d->len ); TQChar* cp = QT_ALLOC_QCHAR_VEC( d->len );
@ -7268,9 +7268,9 @@ TQConstString::~TQConstString()
} }
// The original d->unicode is now unlinked. // The original d->unicode is now unlinked.
#if defined(QT_THREAD_SUPPORT) && defined(MAKE_TQSTRING_THREAD_SAFE) #if defined(QT_THREAD_SUPPORT) && defined(MAKE_QSTRING_THREAD_SAFE)
d->mutex->unlock(); d->mutex->unlock();
#endif // QT_THREAD_SUPPORT && MAKE_TQSTRING_THREAD_SAFE #endif // QT_THREAD_SUPPORT && MAKE_QSTRING_THREAD_SAFE
} }
/*! /*!

Loading…
Cancel
Save