logic: add name delimiter to NameHierarchy
* NameHierarchy now looks like this: <delimiter>\tm<all the rest> * made new baseclasses for SettingsMigration and SettingsMigrator * Use the migration system for SqliteBookmarkStorage as well
This commit is contained in:
@@ -185,7 +185,7 @@ bool QtSmartSearchBox::event(QEvent *event)
|
||||
{
|
||||
if (m_highlightedMatch.hasChildren)
|
||||
{
|
||||
setEditText((m_highlightedMatch.getFullName() + NameHierarchy::getDelimiter()).c_str());
|
||||
setEditText((m_highlightedMatch.getFullName() + nameDelimiterTypeToString(m_highlightedMatch.delimiter)).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -256,7 +256,8 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<std::string> names = utility::splitToVector(text().toStdString(), NameHierarchy::getDelimiter());
|
||||
const NameDelimiterType delimiter = detectDelimiterType(text().toStdString());
|
||||
std::vector<std::string> names = utility::splitToVector(text().toStdString(), delimiter);
|
||||
if (names.back() == "")
|
||||
{
|
||||
names.pop_back();
|
||||
@@ -269,7 +270,7 @@ void QtSmartSearchBox::keyPressEvent(QKeyEvent* event)
|
||||
else
|
||||
{
|
||||
names.back() = "";
|
||||
setEditText(utility::join(names, NameHierarchy::getDelimiter()).c_str());
|
||||
setEditText(utility::join(names, delimiter).c_str());
|
||||
}
|
||||
|
||||
requestAutoCompletions();
|
||||
|
||||
@@ -93,7 +93,7 @@ void QtGraphNodeData::onClick()
|
||||
FilePath path = getFilePath();
|
||||
|
||||
MessageActivateNodes message;
|
||||
message.addNode(m_data->getId(), path.empty() ? m_data->getNameHierarchy() : path.str());
|
||||
message.addNode(m_data->getId(), path.empty() ? m_data->getNameHierarchy() : NameHierarchy(path.str(), NAME_DELIMITER_FILE));
|
||||
message.dispatch();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user