summaryrefslogtreecommitdiffstats
path: root/src/qt3support
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-02-22 13:39:39 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-02-22 14:50:26 (GMT)
commitd033442f92cfee0de952578044bbcb5e858ee835 (patch)
tree4a888fc9dd4a136901f816968ac82cb3d57516dd /src/qt3support
parentbbbd8d402ed5c37d43bd419e7b461f9bacad792f (diff)
downloadQt-d033442f92cfee0de952578044bbcb5e858ee835.zip
Qt-d033442f92cfee0de952578044bbcb5e858ee835.tar.gz
Qt-d033442f92cfee0de952578044bbcb5e858ee835.tar.bz2
Imporve win64 support for mingw
Reviewed-by: ogoffart
Diffstat (limited to 'src/qt3support')
-rw-r--r--src/qt3support/text/q3richtext.cpp2
-rw-r--r--src/qt3support/text/q3textstream.cpp2
-rw-r--r--src/qt3support/tools/q3gcache.cpp10
-rw-r--r--src/qt3support/tools/q3gdict.cpp4
4 files changed, 9 insertions, 9 deletions
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/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)