mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 02:35:38 +08:00
refs #403 extern templates
This commit is contained in:
@@ -169,7 +169,20 @@ namespace BlackMisc
|
||||
size_t heapSizeOf(const QMetaObject &objectType);
|
||||
|
||||
//! A map converted to string
|
||||
template<class K, class V> QString qmapToString(const QMap<K, V> &map);
|
||||
template<class K, class V> QString qmapToString(const QMap<K, V> &map)
|
||||
{
|
||||
QString s;
|
||||
const QString kv("%1: %2 ");
|
||||
QMapIterator<K, V> i(map);
|
||||
while (i.hasNext())
|
||||
{
|
||||
i.next();
|
||||
s.append(
|
||||
kv.arg(i.key()).arg(i.value())
|
||||
);
|
||||
}
|
||||
return s.trimmed();
|
||||
}
|
||||
|
||||
//! Bool to on/off
|
||||
QString boolToOnOff(bool v, bool i18n = false);
|
||||
|
||||
Reference in New Issue
Block a user