diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-17 09:38:27 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-17 09:38:27 -0500 |
commit | ddcd3abc1b3779c832dc6591766f49887e2e43e9 (patch) | |
tree | 1c454e0dbc87d4a20d245e560a4786413c157075 /libLumina/LuminaXDG.cpp | |
parent | Oops, fix another crash with desktop plugins: forgot to disable the synctimer... (diff) | |
download | lumina-ddcd3abc1b3779c832dc6591766f49887e2e43e9.tar.gz lumina-ddcd3abc1b3779c832dc6591766f49887e2e43e9.tar.bz2 lumina-ddcd3abc1b3779c832dc6591766f49887e2e43e9.zip |
Clean up a few things in Lumina:
1) When finding a file mimetype, try a case-insensitive filter if nothing came out of the case-sensitive search.
2) lumina-fm: when removing a slideshow file, try to automatically go to the next/previous picture instead of index=0;
3) Add a bunch more processEvents() calls to the lumina-fm file operations dialog. This should keep the UI's more responsive and update the visuals more often while running operations on large numbers of files.
4) lumina-fm: Fix another upper->lower case extension issue when checking if a file is supported by Qt's read/write operations.
Diffstat (limited to 'libLumina/LuminaXDG.cpp')
-rw-r--r-- | libLumina/LuminaXDG.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index 347f1161..cf49977a 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -380,7 +380,11 @@ QString LXDG::findAppMimeForFile(QString filename, bool multiple){ int weight = 0; QStringList mimefull = LXDG::loadMimeFileGlobs2(); QStringList mimes; - if(!extension.isEmpty()){ mimes = mimefull.filter(":*."+extension); } + if(!extension.isEmpty()){ + mimes = mimefull.filter(":*."+extension); + //If nothing found, try a case-insensitive search + if(mimes.isEmpty()){ mimes = mimefull.filter(":*."+extension, Qt::CaseInsensitive); } + } if(mimes.isEmpty()){ mimes = mimefull.filter(":"+filename.left(3)); } //look for the first 3 characters only (FIX WILDCARD DETECTION LATER) mimes.sort(); QStringList matches; |