summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/hciconfwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/hciconfwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/hciconfwrapper.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opietooth/manager/hciconfwrapper.cpp b/noncore/net/opietooth/manager/hciconfwrapper.cpp
index 35e9cd9..71c935c 100644
--- a/noncore/net/opietooth/manager/hciconfwrapper.cpp
+++ b/noncore/net/opietooth/manager/hciconfwrapper.cpp
@@ -74,16 +74,16 @@ namespace OpieTooth {
74 for (it = m_file.begin(); it != m_file.end(); ++it ) { 74 for (it = m_file.begin(); it != m_file.end(); ++it ) {
75 str = (*it); 75 str = (*it);
76 if( (str.contains(key)) > 0 ) { 76 if( (str.contains(key)) > 0 ) {
77 qDebug("Found"); 77 odebug << "Found" << oendl;
78 // still need to look if its commented out!!! 78 // still need to look if its commented out!!!
79 str.simplifyWhiteSpace(); 79 str.simplifyWhiteSpace();
80 qDebug( key ); 80 odebug << key << oendl;
81 if (str.startsWith("#")) { 81 if (str.startsWith("#")) {
82 str = (key + " " + value + ";"); 82 str = (key + " " + value + ";");
83 } else { 83 } else {
84 str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";"); 84 str = str.replace( QRegExp( "\\s*"+key+"\\s+[^\\s][^;]*;" ), key + " " + value + ";");
85 } 85 }
86 qDebug( str ); 86 odebug << str << oendl;
87 it = m_file.remove( it ); 87 it = m_file.remove( it );
88 it = m_file.insert( it, str ); 88 it = m_file.insert( it, str );
89 //return; the regexp is too wide -zecke // all set 89 //return; the regexp is too wide -zecke // all set
@@ -98,11 +98,11 @@ namespace OpieTooth {
98 * the m_file 98 * the m_file
99 */ 99 */
100 void HciConfWrapper::load() { 100 void HciConfWrapper::load() {
101 qWarning("loaded"); 101 owarn << "loaded" << oendl;
102 m_file.clear(); 102 m_file.clear();
103 QFile file( m_fileName ); 103 QFile file( m_fileName );
104 if (!file.open( IO_ReadOnly ) ) { 104 if (!file.open( IO_ReadOnly ) ) {
105 qDebug("Could not open"); 105 odebug << "Could not open" << oendl;
106 return; 106 return;
107 } 107 }
108 108
@@ -119,13 +119,13 @@ namespace OpieTooth {
119 } 119 }
120 } 120 }
121 void HciConfWrapper::save() { 121 void HciConfWrapper::save() {
122 qWarning("save"); 122 owarn << "save" << oendl;
123 if (m_file.isEmpty() ) // load first 123 if (m_file.isEmpty() ) // load first
124 return; 124 return;
125 125
126 QFile file( m_fileName ); 126 QFile file( m_fileName );
127 if ( !file.open(IO_WriteOnly ) ) { 127 if ( !file.open(IO_WriteOnly ) ) {
128 qWarning("could not open %s", m_fileName.latin1() ); 128 owarn << "could not open " << m_fileName.latin1() << "" << oendl;
129 return; 129 return;
130 } 130 }
131 131
@@ -134,6 +134,6 @@ namespace OpieTooth {
134 for ( it = m_file.begin(); it != m_file.end(); ++it ) { 134 for ( it = m_file.begin(); it != m_file.end(); ++it ) {
135 stream << (*it) << endl; 135 stream << (*it) << endl;
136 } 136 }
137 qWarning("saved"); 137 owarn << "saved" << oendl;
138 }; 138 };
139} 139}