Commit 5ac39ab5 authored by Mike Kremer's avatar Mike Kremer
Browse files

Fixed issue with lacking file open dialogs in case the file extension consists of capitals.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11764 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c18bdd4d
......@@ -65,7 +65,7 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
int count = 0;
QStringList names;
for (uint t=0; t < supportedTypes_.size(); t++){
for (unsigned int t=0; t < supportedTypes_.size(); t++){
QString filters;
......@@ -73,8 +73,8 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
filters = supportedTypes_[t].loadFilters;
else
filters = supportedTypes_[t].saveFilters;
if (filters.contains(ext_[i])){
if (filters.contains("." + ext_[i],Qt::CaseInsensitive)){
count++;
names.push_back( supportedTypes_[t].name );
usefulPlugins.push_back( t );
......@@ -115,7 +115,7 @@ FileOptionsDialog::FileOptionsDialog(std::vector<fileTypes>& _supportedTypes, QS
//add option widgets from all fileplugins
for (uint t=0; t < supportedTypes_.size(); t++){
for (unsigned int t=0; t < supportedTypes_.size(); t++){
if ( !usefulPlugins.contains(t) )
continue;
......@@ -160,7 +160,7 @@ FileOptionsDialog::~FileOptionsDialog()
tabs_.removeTab(i);
//and set parent of widgets to NULL
for (uint t=0; t < supportedTypes_.size(); t++){
for (unsigned int t=0; t < supportedTypes_.size(); t++){
QWidget* widget;
......@@ -186,7 +186,7 @@ void FileOptionsDialog::slotPluginChanged(QString _name){
QComboBox* box = dynamic_cast<QComboBox*>(QObject::sender());
for (uint t=0; t < supportedTypes_.size(); t++)
for (unsigned int t=0; t < supportedTypes_.size(); t++)
if ( supportedTypes_[t].name == _name ){
emit setPluginForExtension(box->accessibleName(), t ); //accessibleName contains the extension
break;
......
......@@ -210,10 +210,11 @@ void LoadWidget::loadFile(){
pluginForExtension_.clear();
for (int i=0; i < ext.size(); i++){
for (uint t=0; t < supportedTypes_.size(); t++){
QString filters = supportedTypes_[t].loadFilters;
if (filters.contains(ext[i],Qt::CaseInsensitive)){
pluginForExtension_[ ext[i] ] = t;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment