correcting

This commit is contained in:
Marek Kochanowicz 2014-02-20 14:10:03 +01:00
parent 4fe21dc38f
commit b788ab8b4c
3 changed files with 80 additions and 81 deletions

View file

@ -128,159 +128,159 @@ CSMWorld::UniversalId::Type CSMWorld::TableMimeData::convertEnums (CSMWorld::Col
{ {
case CSMWorld::ColumnBase::Display_Race: case CSMWorld::ColumnBase::Display_Race:
return CSMWorld::UniversalId::Type_Race; return CSMWorld::UniversalId::Type_Race;
break;
case CSMWorld::ColumnBase::Display_Skill: case CSMWorld::ColumnBase::Display_Skill:
return CSMWorld::UniversalId::Type_Skill; return CSMWorld::UniversalId::Type_Skill;
break;
case CSMWorld::ColumnBase::Display_Class: case CSMWorld::ColumnBase::Display_Class:
return CSMWorld::UniversalId::Type_Class; return CSMWorld::UniversalId::Type_Class;
break;
case CSMWorld::ColumnBase::Display_Faction: case CSMWorld::ColumnBase::Display_Faction:
return CSMWorld::UniversalId::Type_Faction; return CSMWorld::UniversalId::Type_Faction;
break;
case CSMWorld::ColumnBase::Display_Sound: case CSMWorld::ColumnBase::Display_Sound:
return CSMWorld::UniversalId::Type_Sound; return CSMWorld::UniversalId::Type_Sound;
break;
case CSMWorld::ColumnBase::Display_Region: case CSMWorld::ColumnBase::Display_Region:
return CSMWorld::UniversalId::Type_Region; return CSMWorld::UniversalId::Type_Region;
break;
case CSMWorld::ColumnBase::Display_Birthsign: case CSMWorld::ColumnBase::Display_Birthsign:
return CSMWorld::UniversalId::Type_Birthsign; return CSMWorld::UniversalId::Type_Birthsign;
break;
case CSMWorld::ColumnBase::Display_Spell: case CSMWorld::ColumnBase::Display_Spell:
return CSMWorld::UniversalId::Type_Spell; return CSMWorld::UniversalId::Type_Spell;
break;
case CSMWorld::ColumnBase::Display_Cell: case CSMWorld::ColumnBase::Display_Cell:
return CSMWorld::UniversalId::Type_Cell; return CSMWorld::UniversalId::Type_Cell;
break;
case CSMWorld::ColumnBase::Display_Referenceable: case CSMWorld::ColumnBase::Display_Referenceable:
return CSMWorld::UniversalId::Type_Referenceable; return CSMWorld::UniversalId::Type_Referenceable;
break;
case CSMWorld::ColumnBase::Display_Activator: case CSMWorld::ColumnBase::Display_Activator:
return CSMWorld::UniversalId::Type_Activator; return CSMWorld::UniversalId::Type_Activator;
break;
case CSMWorld::ColumnBase::Display_Potion: case CSMWorld::ColumnBase::Display_Potion:
return CSMWorld::UniversalId::Type_Potion; return CSMWorld::UniversalId::Type_Potion;
break;
case CSMWorld::ColumnBase::Display_Apparatus: case CSMWorld::ColumnBase::Display_Apparatus:
return CSMWorld::UniversalId::Type_Apparatus; return CSMWorld::UniversalId::Type_Apparatus;
break;
case CSMWorld::ColumnBase::Display_Armor: case CSMWorld::ColumnBase::Display_Armor:
return CSMWorld::UniversalId::Type_Armor; return CSMWorld::UniversalId::Type_Armor;
break;
case CSMWorld::ColumnBase::Display_Book: case CSMWorld::ColumnBase::Display_Book:
return CSMWorld::UniversalId::Type_Book; return CSMWorld::UniversalId::Type_Book;
break;
case CSMWorld::ColumnBase::Display_Clothing: case CSMWorld::ColumnBase::Display_Clothing:
return CSMWorld::UniversalId::Type_Clothing; return CSMWorld::UniversalId::Type_Clothing;
break;
case CSMWorld::ColumnBase::Display_Container: case CSMWorld::ColumnBase::Display_Container:
return CSMWorld::UniversalId::Type_Container; return CSMWorld::UniversalId::Type_Container;
break;
case CSMWorld::ColumnBase::Display_Creature: case CSMWorld::ColumnBase::Display_Creature:
return CSMWorld::UniversalId::Type_Creature; return CSMWorld::UniversalId::Type_Creature;
break;
case CSMWorld::ColumnBase::Display_Door: case CSMWorld::ColumnBase::Display_Door:
return CSMWorld::UniversalId::Type_Door; return CSMWorld::UniversalId::Type_Door;
break;
case CSMWorld::ColumnBase::Display_Ingredient: case CSMWorld::ColumnBase::Display_Ingredient:
return CSMWorld::UniversalId::Type_Ingredient; return CSMWorld::UniversalId::Type_Ingredient;
break;
case CSMWorld::ColumnBase::Display_CreatureLevelledList: case CSMWorld::ColumnBase::Display_CreatureLevelledList:
return CSMWorld::UniversalId::Type_CreatureLevelledList; return CSMWorld::UniversalId::Type_CreatureLevelledList;
break;
case CSMWorld::ColumnBase::Display_ItemLevelledList: case CSMWorld::ColumnBase::Display_ItemLevelledList:
return CSMWorld::UniversalId::Type_ItemLevelledList; return CSMWorld::UniversalId::Type_ItemLevelledList;
break;
case CSMWorld::ColumnBase::Display_Light: case CSMWorld::ColumnBase::Display_Light:
return CSMWorld::UniversalId::Type_Light; return CSMWorld::UniversalId::Type_Light;
break;
case CSMWorld::ColumnBase::Display_Lockpick: case CSMWorld::ColumnBase::Display_Lockpick:
return CSMWorld::UniversalId::Type_Lockpick; return CSMWorld::UniversalId::Type_Lockpick;
break;
case CSMWorld::ColumnBase::Display_Miscellaneous: case CSMWorld::ColumnBase::Display_Miscellaneous:
return CSMWorld::UniversalId::Type_Miscellaneous; return CSMWorld::UniversalId::Type_Miscellaneous;
break;
case CSMWorld::ColumnBase::Display_Npc: case CSMWorld::ColumnBase::Display_Npc:
return CSMWorld::UniversalId::Type_Npc; return CSMWorld::UniversalId::Type_Npc;
break;
case CSMWorld::ColumnBase::Display_Probe: case CSMWorld::ColumnBase::Display_Probe:
return CSMWorld::UniversalId::Type_Probe; return CSMWorld::UniversalId::Type_Probe;
break;
case CSMWorld::ColumnBase::Display_Repair: case CSMWorld::ColumnBase::Display_Repair:
return CSMWorld::UniversalId::Type_Repair; return CSMWorld::UniversalId::Type_Repair;
break;
case CSMWorld::ColumnBase::Display_Static: case CSMWorld::ColumnBase::Display_Static:
return CSMWorld::UniversalId::Type_Static; return CSMWorld::UniversalId::Type_Static;
break;
case CSMWorld::ColumnBase::Display_Weapon: case CSMWorld::ColumnBase::Display_Weapon:
return CSMWorld::UniversalId::Type_Weapon; return CSMWorld::UniversalId::Type_Weapon;
break;
case CSMWorld::ColumnBase::Display_Reference: case CSMWorld::ColumnBase::Display_Reference:
return CSMWorld::UniversalId::Type_Reference; return CSMWorld::UniversalId::Type_Reference;
break;
case CSMWorld::ColumnBase::Display_Filter: case CSMWorld::ColumnBase::Display_Filter:
return CSMWorld::UniversalId::Type_Filter; return CSMWorld::UniversalId::Type_Filter;
break;
case CSMWorld::ColumnBase::Display_Topic: case CSMWorld::ColumnBase::Display_Topic:
return CSMWorld::UniversalId::Type_Topic; return CSMWorld::UniversalId::Type_Topic;
break;
case CSMWorld::ColumnBase::Display_Journal: case CSMWorld::ColumnBase::Display_Journal:
return CSMWorld::UniversalId::Type_Journal; return CSMWorld::UniversalId::Type_Journal;
break;
case CSMWorld::ColumnBase::Display_TopicInfo: case CSMWorld::ColumnBase::Display_TopicInfo:
return CSMWorld::UniversalId::Type_TopicInfo; return CSMWorld::UniversalId::Type_TopicInfo;
break;
case CSMWorld::ColumnBase::Display_JournalInfo: case CSMWorld::ColumnBase::Display_JournalInfo:
return CSMWorld::UniversalId::Type_JournalInfo; return CSMWorld::UniversalId::Type_JournalInfo;
break;
case CSMWorld::ColumnBase::Display_Scene: case CSMWorld::ColumnBase::Display_Scene:
return CSMWorld::UniversalId::Type_Scene; return CSMWorld::UniversalId::Type_Scene;
break;
case CSMWorld::ColumnBase::Display_Script: case CSMWorld::ColumnBase::Display_Script:
return CSMWorld::UniversalId::Type_Script; return CSMWorld::UniversalId::Type_Script;
break;
default: default:
return CSMWorld::UniversalId::Type_None; return CSMWorld::UniversalId::Type_None;
break;
} }
} }
@ -290,158 +290,158 @@ CSMWorld::ColumnBase::Display CSMWorld::TableMimeData::convertEnums (CSMWorld::U
{ {
case CSMWorld::UniversalId::Type_Race: case CSMWorld::UniversalId::Type_Race:
return CSMWorld::ColumnBase::Display_Race; return CSMWorld::ColumnBase::Display_Race;
break;
case CSMWorld::UniversalId::Type_Skill: case CSMWorld::UniversalId::Type_Skill:
return CSMWorld::ColumnBase::Display_Skill; return CSMWorld::ColumnBase::Display_Skill;
break;
case CSMWorld::UniversalId::Type_Class: case CSMWorld::UniversalId::Type_Class:
return CSMWorld::ColumnBase::Display_Class; return CSMWorld::ColumnBase::Display_Class;
break;
case CSMWorld::UniversalId::Type_Faction: case CSMWorld::UniversalId::Type_Faction:
return CSMWorld::ColumnBase::Display_Faction; return CSMWorld::ColumnBase::Display_Faction;
break;
case CSMWorld::UniversalId::Type_Sound: case CSMWorld::UniversalId::Type_Sound:
return CSMWorld::ColumnBase::Display_Sound; return CSMWorld::ColumnBase::Display_Sound;
break;
case CSMWorld::UniversalId::Type_Region: case CSMWorld::UniversalId::Type_Region:
return CSMWorld::ColumnBase::Display_Region; return CSMWorld::ColumnBase::Display_Region;
break;
case CSMWorld::UniversalId::Type_Birthsign: case CSMWorld::UniversalId::Type_Birthsign:
return CSMWorld::ColumnBase::Display_Birthsign; return CSMWorld::ColumnBase::Display_Birthsign;
break;
case CSMWorld::UniversalId::Type_Spell: case CSMWorld::UniversalId::Type_Spell:
return CSMWorld::ColumnBase::Display_Spell; return CSMWorld::ColumnBase::Display_Spell;
break;
case CSMWorld::UniversalId::Type_Cell: case CSMWorld::UniversalId::Type_Cell:
return CSMWorld::ColumnBase::Display_Cell; return CSMWorld::ColumnBase::Display_Cell;
break;
case CSMWorld::UniversalId::Type_Referenceable: case CSMWorld::UniversalId::Type_Referenceable:
return CSMWorld::ColumnBase::Display_Referenceable; return CSMWorld::ColumnBase::Display_Referenceable;
break;
case CSMWorld::UniversalId::Type_Activator: case CSMWorld::UniversalId::Type_Activator:
return CSMWorld::ColumnBase::Display_Activator; return CSMWorld::ColumnBase::Display_Activator;
break;
case CSMWorld::UniversalId::Type_Potion: case CSMWorld::UniversalId::Type_Potion:
return CSMWorld::ColumnBase::Display_Potion; return CSMWorld::ColumnBase::Display_Potion;
break;
case CSMWorld::UniversalId::Type_Apparatus: case CSMWorld::UniversalId::Type_Apparatus:
return CSMWorld::ColumnBase::Display_Apparatus; return CSMWorld::ColumnBase::Display_Apparatus;
break;
case CSMWorld::UniversalId::Type_Armor: case CSMWorld::UniversalId::Type_Armor:
return CSMWorld::ColumnBase::Display_Armor; return CSMWorld::ColumnBase::Display_Armor;
break;
case CSMWorld::UniversalId::Type_Book: case CSMWorld::UniversalId::Type_Book:
return CSMWorld::ColumnBase::Display_Book; return CSMWorld::ColumnBase::Display_Book;
break;
case CSMWorld::UniversalId::Type_Clothing: case CSMWorld::UniversalId::Type_Clothing:
return CSMWorld::ColumnBase::Display_Clothing; return CSMWorld::ColumnBase::Display_Clothing;
break;
case CSMWorld::UniversalId::Type_Container: case CSMWorld::UniversalId::Type_Container:
return CSMWorld::ColumnBase::Display_Container; return CSMWorld::ColumnBase::Display_Container;
break;
case CSMWorld::UniversalId::Type_Creature: case CSMWorld::UniversalId::Type_Creature:
return CSMWorld::ColumnBase::Display_Creature; return CSMWorld::ColumnBase::Display_Creature;
break;
case CSMWorld::UniversalId::Type_Door: case CSMWorld::UniversalId::Type_Door:
return CSMWorld::ColumnBase::Display_Door; return CSMWorld::ColumnBase::Display_Door;
break;
case CSMWorld::UniversalId::Type_Ingredient: case CSMWorld::UniversalId::Type_Ingredient:
return CSMWorld::ColumnBase::Display_Ingredient; return CSMWorld::ColumnBase::Display_Ingredient;
break;
case CSMWorld::UniversalId::Type_CreatureLevelledList: case CSMWorld::UniversalId::Type_CreatureLevelledList:
return CSMWorld::ColumnBase::Display_CreatureLevelledList; return CSMWorld::ColumnBase::Display_CreatureLevelledList;
break;
case CSMWorld::UniversalId::Type_ItemLevelledList: case CSMWorld::UniversalId::Type_ItemLevelledList:
return CSMWorld::ColumnBase::Display_ItemLevelledList; return CSMWorld::ColumnBase::Display_ItemLevelledList;
break;
case CSMWorld::UniversalId::Type_Light: case CSMWorld::UniversalId::Type_Light:
return CSMWorld::ColumnBase::Display_Light; return CSMWorld::ColumnBase::Display_Light;
break;
case CSMWorld::UniversalId::Type_Lockpick: case CSMWorld::UniversalId::Type_Lockpick:
return CSMWorld::ColumnBase::Display_Lockpick; return CSMWorld::ColumnBase::Display_Lockpick;
break;
case CSMWorld::UniversalId::Type_Miscellaneous: case CSMWorld::UniversalId::Type_Miscellaneous:
return CSMWorld::ColumnBase::Display_Miscellaneous; return CSMWorld::ColumnBase::Display_Miscellaneous;
break;
case CSMWorld::UniversalId::Type_Npc: case CSMWorld::UniversalId::Type_Npc:
return CSMWorld::ColumnBase::Display_Npc; return CSMWorld::ColumnBase::Display_Npc;
break;
case CSMWorld::UniversalId::Type_Probe: case CSMWorld::UniversalId::Type_Probe:
return CSMWorld::ColumnBase::Display_Probe; return CSMWorld::ColumnBase::Display_Probe;
break;
case CSMWorld::UniversalId::Type_Repair: case CSMWorld::UniversalId::Type_Repair:
return CSMWorld::ColumnBase::Display_Repair; return CSMWorld::ColumnBase::Display_Repair;
break;
case CSMWorld::UniversalId::Type_Static: case CSMWorld::UniversalId::Type_Static:
return CSMWorld::ColumnBase::Display_Static; return CSMWorld::ColumnBase::Display_Static;
break;
case CSMWorld::UniversalId::Type_Weapon: case CSMWorld::UniversalId::Type_Weapon:
return CSMWorld::ColumnBase::Display_Weapon; return CSMWorld::ColumnBase::Display_Weapon;
break;
case CSMWorld::UniversalId::Type_Reference: case CSMWorld::UniversalId::Type_Reference:
return CSMWorld::ColumnBase::Display_Reference; return CSMWorld::ColumnBase::Display_Reference;
break;
case CSMWorld::UniversalId::Type_Filter: case CSMWorld::UniversalId::Type_Filter:
return CSMWorld::ColumnBase::Display_Filter; return CSMWorld::ColumnBase::Display_Filter;
break;
case CSMWorld::UniversalId::Type_Topic: case CSMWorld::UniversalId::Type_Topic:
return CSMWorld::ColumnBase::Display_Topic; return CSMWorld::ColumnBase::Display_Topic;
break;
case CSMWorld::UniversalId::Type_Journal: case CSMWorld::UniversalId::Type_Journal:
return CSMWorld::ColumnBase::Display_Journal; return CSMWorld::ColumnBase::Display_Journal;
break;
case CSMWorld::UniversalId::Type_TopicInfo: case CSMWorld::UniversalId::Type_TopicInfo:
return CSMWorld::ColumnBase::Display_TopicInfo; return CSMWorld::ColumnBase::Display_TopicInfo;
break;
case CSMWorld::UniversalId::Type_JournalInfo: case CSMWorld::UniversalId::Type_JournalInfo:
return CSMWorld::ColumnBase::Display_JournalInfo; return CSMWorld::ColumnBase::Display_JournalInfo;
break;
case CSMWorld::UniversalId::Type_Scene: case CSMWorld::UniversalId::Type_Scene:
return CSMWorld::ColumnBase::Display_Scene; return CSMWorld::ColumnBase::Display_Scene;
break;
case CSMWorld::UniversalId::Type_Script: case CSMWorld::UniversalId::Type_Script:
return CSMWorld::ColumnBase::Display_Script; return CSMWorld::ColumnBase::Display_Script;
break;
default: default:
return CSMWorld::ColumnBase::Display_String; return CSMWorld::ColumnBase::Display_String;
break;
} }
} }

View file

@ -63,7 +63,7 @@ void CSVFilter::EditWidget::createFilterRequest (std::vector< std::pair< std::st
clear(); clear();
std::string filter(generateFilter(*filterSource.begin())); std::string filter(generateFilter(*filterSource.begin()));
insert(QString::fromStdString(filter)); insert(QString::fromUtf8(filter.c_str()));
for (unsigned i = 0; i < filterSource.size(); ++i) //test for (unsigned i = 0; i < filterSource.size(); ++i) //test
{ {
@ -86,7 +86,6 @@ std::string CSVFilter::EditWidget::generateFilter (std::pair< std::string, std::
{ {
case 0: //empty case 0: //empty
return ""; //no column to filter return ""; //no column to filter
break;
case 1: //one column to look for case 1: //one column to look for
multipleColumns = false; multipleColumns = false;

View file

@ -496,7 +496,7 @@ void CSVWorld::Table::dropEvent(QDropEvent *event)
CSMWorld::UniversalId record (mime->returnMatching (display)); CSMWorld::UniversalId record (mime->returnMatching (display));
std::auto_ptr<CSMWorld::ModifyCommand> command (new CSMWorld::ModifyCommand std::auto_ptr<CSMWorld::ModifyCommand> command (new CSMWorld::ModifyCommand
(*mProxyModel, index, QVariant (QString::fromStdString (record.getId())))); (*mProxyModel, index, QVariant (QString::fromUtf8 (record.getId().c_str()))));
mUndoStack.push (command.release()); mUndoStack.push (command.release());
} }