Fix index to id lookup in merge factory.
This commit is contained in:
@@ -185,11 +185,11 @@ namespace merge
|
|||||||
///
|
///
|
||||||
QString Factory::indexToId( int index )
|
QString Factory::indexToId( int index )
|
||||||
{
|
{
|
||||||
QList<QString> ids = mBackendIdMap.keys();
|
if ( (index > 0) && (index < mNameList.size()) )
|
||||||
|
|
||||||
if ( (index > 0) && (index < ids.size()) )
|
|
||||||
{
|
{
|
||||||
return ids[index];
|
QString name = mNameList[index];
|
||||||
|
|
||||||
|
return mBackendNameMap[ name ].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "None";
|
return "None";
|
||||||
@@ -206,6 +206,7 @@ namespace merge
|
|||||||
{
|
{
|
||||||
BackendEntry backend;
|
BackendEntry backend;
|
||||||
|
|
||||||
|
backend.id = id;
|
||||||
backend.name = name;
|
backend.name = name;
|
||||||
backend.type = type;
|
backend.type = type;
|
||||||
backend.create = create;
|
backend.create = create;
|
||||||
|
|||||||
Reference in New Issue
Block a user