diff options
author | Ken Moore <moorekou@gmail.com> | 2015-11-10 12:37:12 -0500 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-11-10 12:37:12 -0500 |
commit | df1b1ce03827d8efae1fa1124a504fd972eb40dc (patch) | |
tree | 8c26ff37d4eaf66c46f6e25261665e780d9bf412 /libLumina/LuminaUtils.cpp | |
parent | Adjust the user validation routine a bit in lumina-checkpass: (diff) | |
download | lumina-df1b1ce03827d8efae1fa1124a504fd972eb40dc.tar.gz lumina-df1b1ce03827d8efae1fa1124a504fd972eb40dc.tar.bz2 lumina-df1b1ce03827d8efae1fa1124a504fd972eb40dc.zip |
Re-work how Lumina finds/loads icons from the current theme. This bypasses the QIcon::fromTheme() functionality completely, that way we get more detection/control over finding bad files and such (SVG files in particular).
Diffstat (limited to 'libLumina/LuminaUtils.cpp')
-rw-r--r-- | libLumina/LuminaUtils.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp index 39e000a2..0e836748 100644 --- a/libLumina/LuminaUtils.cpp +++ b/libLumina/LuminaUtils.cpp @@ -199,12 +199,15 @@ QString LUtils::PathToAbsolute(QString path){ return path; } -QStringList LUtils::imageExtensions(){ +QStringList LUtils::imageExtensions(bool wildcards){ //Note that all the image extensions are lowercase!! static QStringList imgExtensions; if(imgExtensions.isEmpty()){ QList<QByteArray> fmt = QImageReader::supportedImageFormats(); - for(int i=0; i<fmt.length(); i++){ imgExtensions << QString::fromLocal8Bit(fmt[i]); } + for(int i=0; i<fmt.length(); i++){ + if(wildcards){ imgExtensions << "*."+QString::fromLocal8Bit(fmt[i]); } + else{ imgExtensions << QString::fromLocal8Bit(fmt[i]); } + } } return imgExtensions; } |