mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:33:23 +00:00
fulltext: rename fulltext_reload() to fulltext_populate()
This function was named improperly: it was only used on freshly loaded data. Indeed, attempts to use it to actually reload lead to crashes. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d8b92a1852
commit
d9599589c7
3 changed files with 6 additions and 6 deletions
|
@ -831,7 +831,7 @@ void process_loaded_dives()
|
|||
/* Autogroup dives if desired by user. */
|
||||
autogroup_dives(&dive_table, &trip_table);
|
||||
|
||||
fulltext_reload();
|
||||
fulltext_populate();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -18,7 +18,7 @@ class FullText {
|
|||
std::map<QString, std::vector<dive *>> words; // Dives that belong to each word
|
||||
public:
|
||||
|
||||
void reload(); // Rebuild from current dive_table
|
||||
void populate(); // Rebuild from current dive_table
|
||||
void registerDive(struct dive *d); // Note: can be called repeatedly
|
||||
void unregisterDive(struct dive *d); // Note: can be called repeatedly
|
||||
void unregisterAll(); // Unregister all dives in the dive table
|
||||
|
@ -51,9 +51,9 @@ void fulltext_unregister_all()
|
|||
self.unregisterAll();
|
||||
}
|
||||
|
||||
void fulltext_reload()
|
||||
void fulltext_populate()
|
||||
{
|
||||
self.reload();
|
||||
self.populate();
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
@ -141,7 +141,7 @@ static std::vector<QString> getWords(const dive *d)
|
|||
return res;
|
||||
}
|
||||
|
||||
void FullText::reload()
|
||||
void FullText::populate()
|
||||
{
|
||||
// we want this to be two calls as the second text is overwritten below by the lines starting with "\r"
|
||||
uiNotification(QObject::tr("Create full text index"));
|
||||
|
|
|
@ -24,7 +24,7 @@ struct dive;
|
|||
void fulltext_register(struct dive *d); // Note: can be called repeatedly
|
||||
void fulltext_unregister(struct dive *d); // Note: can be called repeatedly
|
||||
void fulltext_unregister_all(); // Unregisters all dives in the dive table
|
||||
void fulltext_reload(); // Registers all dives in the dive table
|
||||
void fulltext_populate(); // Registers all dives in the dive table
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue