diff options
Diffstat (limited to 'libLumina/LuminaXDG.cpp')
-rw-r--r-- | libLumina/LuminaXDG.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libLumina/LuminaXDG.cpp b/libLumina/LuminaXDG.cpp index 7934c924..84e9ad90 100644 --- a/libLumina/LuminaXDG.cpp +++ b/libLumina/LuminaXDG.cpp @@ -32,8 +32,13 @@ XDGDesktop LXDG::loadDesktopFile(QString filePath, bool& ok){ } QTextStream os(&file); //Read in the File + bool insection=false; while(!os.atEnd()){ QString line = os.readLine(); + //Check that this is the entry portion of the file (not the action/other sections) + if(line=="[Desktop Entry]"){ insection=true; continue; } + else if(line.startsWith("[")){ insection=false; } + if(!insection || line.startsWith("#")){ continue; } //Now parse out the file line = line.simplified(); QString var = line.section("=",0,0).simplified(); |