mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-22 21:53:03 +03:00
fix(registry): use QMultiMap instead of deprecated QMap::insertMulti()
This commit is contained in:
parent
1f14668fcf
commit
bf64b4ffdd
@ -446,7 +446,7 @@ void Docset::countSymbols()
|
||||
}
|
||||
|
||||
const QString symbolType = parseSymbolType(symbolTypeStr);
|
||||
m_symbolStrings.insertMulti(symbolType, symbolTypeStr);
|
||||
m_symbolStrings.insert(symbolType, symbolTypeStr);
|
||||
m_symbolCounts[symbolType] += m_db->value(1).toInt();
|
||||
}
|
||||
}
|
||||
@ -485,9 +485,9 @@ void Docset::loadSymbols(const QString &symbolType, const QString &symbolString)
|
||||
|
||||
QMap<QString, QUrl> &symbols = m_symbols[symbolType];
|
||||
while (m_db->next()) {
|
||||
symbols.insertMulti(m_db->value(0).toString(),
|
||||
createPageUrl(m_db->value(1).toString(),
|
||||
m_db->value(2).toString()));
|
||||
symbols.insert(m_db->value(0).toString(),
|
||||
createPageUrl(m_db->value(1).toString(),
|
||||
m_db->value(2).toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <QIcon>
|
||||
#include <QMap>
|
||||
#include <QMetaObject>
|
||||
#include <QMultiMap>
|
||||
#include <QUrl>
|
||||
|
||||
namespace Zeal {
|
||||
@ -115,9 +116,9 @@ private:
|
||||
QUrl m_indexFileUrl;
|
||||
QString m_indexFilePath;
|
||||
|
||||
QMap<QString, QString> m_symbolStrings;
|
||||
QMultiMap<QString, QString> m_symbolStrings;
|
||||
QMap<QString, int> m_symbolCounts;
|
||||
mutable QMap<QString, QMap<QString, QUrl>> m_symbols;
|
||||
mutable QMap<QString, QMultiMap<QString, QUrl>> m_symbols;
|
||||
Util::SQLiteDatabase *m_db = nullptr;
|
||||
bool m_fuzzySearchEnabled = false;
|
||||
bool m_javaScriptEnabled = false;
|
||||
|
Loading…
Reference in New Issue
Block a user