From 9f1a99de65ea9e3b7ba5f93b3b6a76a25e2b13b9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 29 Jul 2015 10:49:07 -0400 Subject: 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). --- libLumina/LuminaUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libLumina') 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 #include #include +#include #include #include @@ -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 } -- cgit