1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00

fix qqtorderedmap.h for msvc building.

QQtOrderedDictionary 在 MSVC2015 环境里,导出正常。
This commit is contained in:
tianduanrui 2021-04-23 11:30:50 +08:00
parent b003a97b1d
commit b146c581ad
3 changed files with 8 additions and 28 deletions

View File

@ -1,30 +1,5 @@
#include <qqtdicthelper.h>
//增加 QOrderedMap<..., ...> 的定义帮助MSVC export and import。
typedef QOrderedMap<QString, QString> QStringQStringOrderedMap;
typedef QOrderedMap<QByteArray, QByteArray> QByteArryQByteArrayOrderedMap;
typedef QOrderedMap<QString, QVariant> QStringOrderedMap;
typedef QOrderedMap<QByteArray, QVariant> QByteArrayOrderedMap;
typedef QOrderedMap<QVariant, QVariant> QVariantOrderedMap;
typedef QOrderedMap<QString, QQtOrderedDictionary> QQtOrderedDictionaryMap;
typedef QOrderedMapIterator<QString, QQtOrderedDictionary> QQtOrderedDictionaryMapIterator;
typedef QMutableOrderedMapIterator<QString, QQtOrderedDictionary> QQtOrderedDictionaryMutableMapIterator;
typedef QList<QQtOrderedDictionary> QQtOrderedDictionaryList;
typedef QListIterator<QQtOrderedDictionary> QQtOrderedDictionaryListIterator;
typedef QMutableListIterator<QQtOrderedDictionary> QQtOrderedDictionaryMutableListIterator;
QStringQStringOrderedMap ____map1____;
QByteArryQByteArrayOrderedMap ____map2____;
QStringOrderedMap ____map3____;
QByteArrayOrderedMap ____map4____;
QVariantOrderedMap ____map5____;
QQtOrderedDictionaryMap ____map6____;
QQtOrderedDictionaryMapIterator ____map7_iterator____(____map6____);
QQtOrderedDictionaryMutableMapIterator ____map8_iterator____(____map6____);
QQtDictionary& QQtGetDictNode ( QQtDictionary& rootDict, QList<QString>& keyList1, bool numberAsString )
{
QListIterator<QString> itor ( keyList1 );

View File

@ -429,8 +429,8 @@ private:
return true;
#endif
}
public:
public:
//template <class Key, class T>
inline QOrderedMap ( const QOrderedMap<Key, T>& other )
{
@ -839,12 +839,14 @@ public:
return it;
}
private:
//template <class Key, class T>
Q_OUTOFLINE_TEMPLATE void detach_helper()
{
d->detach();
}
public:
//template <class Key, class T>
Q_OUTOFLINE_TEMPLATE QList<Key> uniqueKeys() const
{
@ -974,6 +976,7 @@ public:
return amap;
}
};
template <class Key, class T>
class QQTSHARED_EXPORT QOrderedMultiMap : public QOrderedMap<Key, T>
{
@ -1042,8 +1045,8 @@ QOrderedMultiMap ( QOrderedMap<Key, T>&& other ) Q_DECL_NOTHROW : QOrderedMap<Ke
private:
T& operator[] ( const Key& key );
const T operator[] ( const Key& key ) const;
public:
public:
//template <class Key, class T>
Q_INLINE_TEMPLATE bool contains ( const Key& key, const T& value ) const
{
@ -1086,6 +1089,7 @@ public:
return n;
}
};
Q_DECLARE_ASSOCIATIVE_ITERATOR ( OrderedMap )
Q_DECLARE_MUTABLE_ASSOCIATIVE_ITERATOR ( OrderedMap )

View File

@ -8,7 +8,8 @@
// MSVC2015不使用QQtOrderedDictionary就可以了其他模块正常。
// 2021年4月23日
// 已解决
// 已解决。
// MSVC2015QQtOrderedDictionary导出正常。
#include <qqtorderedmap.h>