aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <moorekou@gmail.com>2015-07-29 10:49:07 -0400
committerKen Moore <moorekou@gmail.com>2015-07-29 10:49:07 -0400
commit9f1a99de65ea9e3b7ba5f93b3b6a76a25e2b13b9 (patch)
treeb9560adb6c678d0c9c92d11b1f56aebefd524f9b
parentOops, make sure that any new duplicate session setting overwrites the previou... (diff)
downloadlumina-9f1a99de65ea9e3b7ba5f93b3b6a76a25e2b13b9.tar.gz
lumina-9f1a99de65ea9e3b7ba5f93b3b6a76a25e2b13b9.tar.bz2
lumina-9f1a99de65ea9e3b7ba5f93b3b6a76a25e2b13b9.zip
Final fix for the line find/replace functionality in luminaDesktop.conf parsing - needed to explicitly use a QREgExp with wildcard matching rules (verified that it works properly).
-rw-r--r--libLumina/LuminaUtils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index 88dec8b9..3d77cfd4 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -14,6 +14,7 @@
#include <QDebug>
#include <QDesktopWidget>
#include <QImageReader>
+#include <QRegExp>
#include <LuminaOS.h>
#include <LuminaThemes.h>
@@ -459,12 +460,13 @@ void LUtils::LoadSystemDefaults(bool skipOS){
else if(var=="session_default_email"){ loset = "email="+val; }
//Put the line into the file (overwriting any previous assignment as necessary)
if(!loset.isEmpty()){
- int index = lopenset.indexOf(loset.section("=",0,0)+"=*");
+ int index = lopenset.indexOf(QRegExp(loset.section("=",0,0)+"=*", Qt::CaseSensitive, QRegExp::Wildcard));
+ qDebug() << "loset line:" << loset << index << lopenset;
if(index<0){ lopenset << loset; } //new line
else{ lopenset[index] = loset; } //overwrite the other line
}
if(!sset.isEmpty()){
- int index = sesset.indexOf(sset.section("=",0,0)+"=*");
+ int index = sesset.indexOf(QRegExp(sset.section("=",0,0)+"=*", Qt::CaseSensitive, QRegExp::Wildcard));
if(index<0){ sesset << sset; } //new line
else{ sesset[index] = sset; } //overwrite the other line
}
bgstack15