diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-19 11:01:18 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-19 11:01:18 -0500 |
commit | 5410180572e2719d063a901a3235e85cf42c9a7b (patch) | |
tree | f2c2f938fac1176fd410210842e8f2cbbde6b702 /libLumina/LuminaXDG.cpp | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-5410180572e2719d063a901a3235e85cf42c9a7b.tar.gz lumina-5410180572e2719d063a901a3235e85cf42c9a7b.tar.bz2 lumina-5410180572e2719d063a901a3235e85cf42c9a7b.zip |
Make sure that the second round of mimetype filters is performed case-insensitive (case was already taken care of with the first filter).
Diffstat (limited to 'libLumina/LuminaXDG.cpp')
-rw-r--r-- | libLumina/LuminaXDG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index 22193786..3ec16887 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -394,7 +394,7 @@ QString LXDG::findAppMimeForFile(QString filename, bool multiple){ if(mimes.isEmpty()){ mimes = mimefull.filter(":*."+extension, Qt::CaseInsensitive); } //Now ensure that the filter was accurate (*.<extention>.<something> will still be caught) for(int i=0; i<mimes.length(); i++){ - if(!filename.endsWith( mimes[i].section(":*",-1) )){ mimes.removeAt(i); i--; } + if(!filename.endsWith( mimes[i].section(":*",-1), Qt::CaseInsensitive )){ mimes.removeAt(i); i--; } } } //Look for globs at the start of the filename @@ -403,7 +403,7 @@ QString LXDG::findAppMimeForFile(QString filename, bool multiple){ //Note: This initial filter will only work if the wildcard (*) is not within the first 2 characters of the pattern //Now ensure that the filter was accurate for(int i=0; i<mimes.length(); i++){ - if(!filename.startsWith( mimes[i].section(":",3,50,QString::SectionSkipEmpty).section("*",0,0) )){ mimes.removeAt(i); i--; } + if(!filename.startsWith( mimes[i].section(":",3,50,QString::SectionSkipEmpty).section("*",0,0), Qt::CaseInsensitive )){ mimes.removeAt(i); i--; } } } mimes.sort(); //this automatically puts them in weight order (100 on down) |