Prevent unnecessary dialog when updating with no new changes

FossilOrigin-Name: f718ab845eb859700e230090f2fcbc7ddb068e62
This commit is contained in:
kostas
2015-05-03 09:22:18 +00:00
parent 3987a35083
commit 8e21224a5e
5 changed files with 50 additions and 39 deletions

View File

@@ -306,3 +306,26 @@ bool ShowExplorerMenu(HWND hwnd, const QString &path, const QPoint &qpoint)
#endif
//-----------------------------------------------------------------------------
void ParseProperties(QStringMap &properties, const QStringList &lines, QChar separator)
{
properties.clear();
foreach(QString l, lines)
{
l = l.trimmed();
int index = l.indexOf(separator);
QString key;
QString value;
if(index!=-1)
{
key = l.left(index).trimmed();
value = l.mid(index).trimmed();
}
else
key = l;
properties.insert(key, value);
}
}