diff options
author | Timothy Pearson <[email protected]> | 2013-06-10 13:21:44 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-06-10 13:21:44 -0500 |
commit | 33e14b0aa37fd7bc47547ec187d4adde826f0da1 (patch) | |
tree | 7fc1e649d0dacfbaad54533bd97e569cfbbe138e | |
parent | 245c821c1974c8a9bce0f2977ab5f462c87a9cba (diff) | |
download | tqt3-33e14b0aa37fd7bc47547ec187d4adde826f0da1.tar.gz tqt3-33e14b0aa37fd7bc47547ec187d4adde826f0da1.zip |
Automated update from Qt3
-rw-r--r-- | src/kernel/qapplication.cpp | 2 | ||||
-rw-r--r-- | src/tools/qstring.cpp | 21 | ||||
-rw-r--r-- | src/widgets/qlistview.cpp | 6 |
3 files changed, 23 insertions, 6 deletions
diff --git a/src/kernel/qapplication.cpp b/src/kernel/qapplication.cpp index 83d8b6c58..73b2e44d6 100644 --- a/src/kernel/qapplication.cpp +++ b/src/kernel/qapplication.cpp @@ -3732,7 +3732,7 @@ void TQApplication::removePostedEvent( TQEvent * event ) void tqThreadTerminationHandlerRecursive( TQObject* object, TQThread* originThread, TQThread* destinationThread ) { #ifdef QT_THREAD_SUPPORT TQThread* objectThread = object->contextThreadObject(); - if (objectThread && (objectThread != destinationThread)) { + if (objectThread && (objectThread == originThread)) { TQThread::CleanupType cleanupType = objectThread->cleanupType(); if (cleanupType == TQThread::CleanupMergeObjects) { object->moveToThread(destinationThread); diff --git a/src/tools/qstring.cpp b/src/tools/qstring.cpp index 1ea356933..f7b5c233d 100644 --- a/src/tools/qstring.cpp +++ b/src/tools/qstring.cpp @@ -1071,13 +1071,20 @@ TQStringData::TQStringData(TQChar *u, uint l, uint m) : TQShared(), } TQStringData::~TQStringData() { - if ( unicode ) delete[] ((char*)unicode); + if ( unicode ) { + delete[] ((char*)unicode); + } if ( ascii && security_unpaged ) { munlock(ascii, LINUX_MEMLOCK_LIMIT_BYTES); } - if ( ascii ) delete[] ascii; + if ( ascii ) { + delete[] ascii; + } #ifdef QT_THREAD_SUPPORT - if ( mutex ) delete mutex; + if ( mutex ) { + delete mutex; + mutex = NULL; + } #endif // QT_THREAD_SUPPORT } @@ -1675,6 +1682,13 @@ TQString::TQString( TQStringData* dd, bool /* dummy */ ) { TQString::~TQString() { +#if defined(QT_CHECK_RANGE) + if (!d) { + tqWarning( "TQString::~TQString: Double free or delete detected!" ); + return; + } +#endif + #ifdef QT_THREAD_SUPPORT d->mutex->lock(); #endif // QT_THREAD_SUPPORT @@ -1684,6 +1698,7 @@ TQString::~TQString() d->mutex->unlock(); #endif // QT_THREAD_SUPPORT d->deleteSelf(); + d = NULL; } else { #ifdef QT_THREAD_SUPPORT diff --git a/src/widgets/qlistview.cpp b/src/widgets/qlistview.cpp index 42aebfbe6..79d338120 100644 --- a/src/widgets/qlistview.cpp +++ b/src/widgets/qlistview.cpp @@ -5181,11 +5181,13 @@ void TQListView::keyPressEvent( TQKeyEvent * e ) TQListViewItem * TQListView::itemAt( const TQPoint & viewPos ) const { - if ( viewPos.x() > contentsWidth() - contentsX() ) + if ( viewPos.x() > contentsWidth() - contentsX() ) { return 0; + } - if ( !d->drawables || d->drawables->isEmpty() ) + if ( !d->drawables || d->drawables->isEmpty() ) { buildDrawableList(); + } TQListViewPrivate::DrawableItem * c = d->drawables->first(); int g = viewPos.y() + contentsY(); |