aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-theme-engine/src
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2018-04-16 08:40:54 -0400
committerGitHub <noreply@github.com>2018-04-16 08:40:54 -0400
commit99b08a25c55f46251652b8f8db215894c48c0532 (patch)
treea7d9166c890f2d2b87760977f5990b39506cfb51 /src-qt5/core/lumina-theme-engine/src
parentMerge pull request #569 from rodlie/lthemeengine-qtplugin_include (diff)
parentlthemeengine: check if dirs ends with "/" in stylesheet/color path, this fixe... (diff)
downloadlumina-99b08a25c55f46251652b8f8db215894c48c0532.tar.gz
lumina-99b08a25c55f46251652b8f8db215894c48c0532.tar.bz2
lumina-99b08a25c55f46251652b8f8db215894c48c0532.zip
Merge pull request #570 from rodlie/lthemeengine_fix_dirs
lthemeengine: check if dirs ends with "/"
Diffstat (limited to 'src-qt5/core/lumina-theme-engine/src')
-rw-r--r--src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
index cb491aa6..9ffe39f8 100644
--- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
+++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/lthemeengine.cpp
@@ -61,7 +61,10 @@ QStringList lthemeengine::sharedStyleSheetPath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/qss/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/qss/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/qss/"; } //no XDG settings - use the hardcoded path
return dirs;
}
@@ -75,7 +78,10 @@ QStringList lthemeengine::sharedDesktopStyleSheetPath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/desktop_qss/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/desktop_qss/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/desktop_qss/"; } //no XDG settings - use the hardcoded path
return dirs;
}
@@ -89,7 +95,10 @@ QStringList lthemeengine::sharedColorSchemePath(){
dirs << QString(getenv("XDG_CONFIG_HOME"));
dirs << QString(getenv("XDG_CONFIG_DIRS")).split(":");
dirs << QString(getenv("XDG_DATA_DIRS")).split(":");
- for(int i=0; i<dirs.length(); i++){ dirs[i].append("/lthemeengine/colors/"); }
+ for(int i=0; i<dirs.length(); i++){
+ if (!dirs[i].endsWith("/")){ dirs[i].append("/"); }
+ dirs[i].append("lthemeengine/colors/");
+ }
if(dirs.isEmpty()){ dirs << LTHEMEENGINE_DATADIR"/lthemeengine/colors/"; } //no XDG settings - use the hardcoded path
qDebug() << "Got Color Dirs:" << dirs;
return dirs;
bgstack15