-rw-r--r-- | noncore/net/opietooth/manager/hciconfwrapper.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp index db6a326..7b2497a 100644 --- a/noncore/net/opietooth/manager/hciconfwrapper.cpp +++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "hciconfwrapper.h" | 1 | #include "hciconfwrapper.h" |
2 | 2 | ||
3 | #include <qfile.h> | 3 | #include <qfile.h> |
4 | #include <qtextstream.h> | 4 | #include <qtextstream.h> |
5 | #include <qstringlist.h> | 5 | #include <qstringlist.h> |
@@ -90,22 +90,21 @@ namespace OpieTooth { | |||
90 | 90 | ||
91 | //qDebug(str); | 91 | //qDebug(str); |
92 | if( (str.contains(key)) > 0 ) { | 92 | if( (str.contains(key)) > 0 ) { |
93 | qDebug("Found"); | 93 | qDebug("Found"); |
94 | // still need look if its commented out!!! | 94 | // still need to look if its commented out!!! |
95 | str.simplifyWhiteSpace(); | 95 | str.simplifyWhiteSpace(); |
96 | qDebug( key ); | 96 | qDebug( key ); |
97 | if (str.startsWith("#")) { | 97 | if (str.startsWith("#")) { |
98 | outstream << (key + " " + value + ";\n"); | 98 | str = (key + " " + value + ";"); |
99 | } else { | 99 | } else { |
100 | str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";\n"); | 100 | str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";"); |
101 | } | 101 | } |
102 | 102 | ||
103 | qDebug( str ); | 103 | qDebug( str ); |
104 | outstream << str; | ||
105 | } else { | ||
106 | outstream << str + "\n"; | ||
107 | } | 104 | } |
105 | |||
106 | outstream << str << endl; | ||
108 | } | 107 | } |
109 | 108 | ||
110 | f.close(); | 109 | f.close(); |
111 | f2.flush(); | 110 | f2.flush(); |