diff options
Diffstat (limited to 'src/qt3support')
-rw-r--r-- | src/qt3support/itemviews/q3listview.cpp | 9 | ||||
-rw-r--r-- | src/qt3support/network/q3socketdevice_win.cpp | 1 | ||||
-rw-r--r-- | src/qt3support/other/q3process_win.cpp | 2 | ||||
-rw-r--r-- | src/qt3support/text/q3richtext.cpp | 2 | ||||
-rw-r--r-- | src/qt3support/text/q3textedit.cpp | 2 | ||||
-rw-r--r-- | src/qt3support/text/q3textstream.cpp | 2 | ||||
-rw-r--r-- | src/qt3support/tools/q3gcache.cpp | 10 | ||||
-rw-r--r-- | src/qt3support/tools/q3gdict.cpp | 4 |
8 files changed, 19 insertions, 13 deletions
diff --git a/src/qt3support/itemviews/q3listview.cpp b/src/qt3support/itemviews/q3listview.cpp index 12dad84..4900827 100644 --- a/src/qt3support/itemviews/q3listview.cpp +++ b/src/qt3support/itemviews/q3listview.cpp @@ -1324,8 +1324,15 @@ void Q3ListViewItem::sortChildItems(int column, bool ascending) const int nColumns = (listView() ? listView()->columns() : 0); // and don't sort if we already have the right sorting order - if (column > nColumns || childItem == 0 || childItem->siblingItem == 0) + if (column > nColumns || childItem == 0) return; + + // If there is just one child, just sort its children + if (childItem->siblingItem == 0) { + if (childItem->isOpen()) + childItem->sortChildItems(column, ascending); + return; + } // make an array for qHeapSort() Q3ListViewPrivate::SortableItem * siblings diff --git a/src/qt3support/network/q3socketdevice_win.cpp b/src/qt3support/network/q3socketdevice_win.cpp index 528b50a..1354cfa 100644 --- a/src/qt3support/network/q3socketdevice_win.cpp +++ b/src/qt3support/network/q3socketdevice_win.cpp @@ -47,7 +47,6 @@ #include <string.h> -# include <qt_windows.h> #if defined (QT_NO_IPV6) # include <winsock.h> #else diff --git a/src/qt3support/other/q3process_win.cpp b/src/qt3support/other/q3process_win.cpp index da39bdc..9b69520 100644 --- a/src/qt3support/other/q3process_win.cpp +++ b/src/qt3support/other/q3process_win.cpp @@ -384,7 +384,7 @@ bool Q3Process::start( QStringList *env ) return true; } -static BOOL CALLBACK qt_terminateApp( HWND hwnd, LPARAM procId ) +static BOOL QT_WIN_CALLBACK qt_terminateApp( HWND hwnd, LPARAM procId ) { DWORD procId_win; GetWindowThreadProcessId( hwnd, &procId_win ); diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index 21383bd..8614076 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -6667,7 +6667,7 @@ Q3TextImage::Q3TextImage(Q3TextDocument *p, const QMap<QString, QString> &attr, imageName = attr[QLatin1String("source")]; if (!imageName.isEmpty()) { - imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((ulong)&factory); + imgId = QString::fromLatin1("%1,%2,%3,%4").arg(imageName).arg(width).arg(height).arg((quintptr)&factory); if (!pixmap_map) pixmap_map = new QMap<QString, QPixmapInt>; if (pixmap_map->contains(imgId)) { diff --git a/src/qt3support/text/q3textedit.cpp b/src/qt3support/text/q3textedit.cpp index 7f51bea..d4f75ed 100644 --- a/src/qt3support/text/q3textedit.cpp +++ b/src/qt3support/text/q3textedit.cpp @@ -6238,7 +6238,7 @@ void Q3TextEdit::optimParseTags(QString * line, int lineNo, int indexOffset) } else { tmp = tagStack.isEmpty() ? 0 : tagStack.pop(); if (!tmp) { - if (((QLatin1Char('/') + cur->tag) == tag->tag) || + if ((QString(QLatin1Char('/') + cur->tag) == tag->tag) || (tag->tag == QLatin1String("/font") && cur->tag.left(4) == QLatin1String("font"))) { // set up the left and parent of this tag tag->leftTag = cur; diff --git a/src/qt3support/text/q3textstream.cpp b/src/qt3support/text/q3textstream.cpp index 41aab4d..8c86c7c 100644 --- a/src/qt3support/text/q3textstream.cpp +++ b/src/qt3support/text/q3textstream.cpp @@ -2084,7 +2084,7 @@ Q3TextStream &Q3TextStream::operator<<( void *ptr ) setf( hex, basefield ); setf( showbase ); unsetf( uppercase ); - output_int( I_LONG | I_UNSIGNED, (ulong)ptr, FALSE ); + output_int( I_LONG | I_UNSIGNED, (quintptr)ptr, FALSE ); flags( f ); return *this; } diff --git a/src/qt3support/tools/q3gcache.cpp b/src/qt3support/tools/q3gcache.cpp index a31f827..ada8330 100644 --- a/src/qt3support/tools/q3gcache.cpp +++ b/src/qt3support/tools/q3gcache.cpp @@ -226,7 +226,7 @@ public: bool remove_ascii(Q3CacheItem *item) { return Q3GDict::remove_ascii((const char *)item->key,item); } bool remove_int(Q3CacheItem *item) - { return Q3GDict::remove_int((long)item->key,item);} + { return Q3GDict::remove_int((quintptr)item->key,item);} void statistics() { Q3GDict::statistics(); } @@ -426,7 +426,7 @@ bool Q3GCache::insert_other(const char *key, Q3PtrCollection::Item data, if (keytype == AsciiKey) dict->insert_ascii(key, ci); else - dict->insert_int((long)key, ci); + dict->insert_int((quintptr)key, ci); tCost += cost; return true; } @@ -486,7 +486,7 @@ Q3PtrCollection::Item Q3GCache::take_other(const char *key) if (keytype == AsciiKey) ci = dict->take_ascii(key); else - ci = dict->take_int((long)key); + ci = dict->take_int((quintptr)key); Item d; if (ci) { d = ci->data; @@ -563,7 +563,7 @@ Q3PtrCollection::Item Q3GCache::find_string(const QString &key, bool ref) const Q3PtrCollection::Item Q3GCache::find_other(const char *key, bool ref) const { Q3CacheItem *ci = keytype == AsciiKey ? dict->find_ascii(key) - : dict->find_int((long)key); + : dict->find_int((quintptr)key); #if defined(QT_DEBUG) lruList->finds++; #endif @@ -811,7 +811,7 @@ const char *Q3GCacheIterator::getKeyAscii() const long Q3GCacheIterator::getKeyInt() const { Q3CacheItem *item = it->current(); - return item ? (long)item->key : 0; + return item ? (quintptr)item->key : 0; } /*! diff --git a/src/qt3support/tools/q3gdict.cpp b/src/qt3support/tools/q3gdict.cpp index a968407..e8144fe 100644 --- a/src/qt3support/tools/q3gdict.cpp +++ b/src/qt3support/tools/q3gdict.cpp @@ -437,7 +437,7 @@ Q3PtrCollection::Item Q3GDict::look_int(long key, Q3PtrCollection::Item d, int o Q3PtrCollection::Item Q3GDict::look_ptr(void *key, Q3PtrCollection::Item d, int op) { Q3PtrBucket *n; - int index = (int)((ulong)key % vlen); // simple hash + int index = (int)((quintptr)key % vlen); // simple hash if (op == op_find) { // find for (n=(Q3PtrBucket*)vec[index]; n; n=(Q3PtrBucket*)n->getNext()) { @@ -650,7 +650,7 @@ Q3PtrBucket *Q3GDict::unlink_ptr(void *key, Q3PtrCollection::Item d) return 0; Q3PtrBucket *n; Q3PtrBucket *prev = 0; - int index = (int)((ulong)key % vlen); + int index = (int)((quintptr)key % vlen); for (n=(Q3PtrBucket *)vec[index]; n; n=(Q3PtrBucket *)n->getNext()) { bool found = (n->getKey() == key); if (found && d) |