summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/phoneaccess.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/libkdepim/phoneaccess.cpp b/libkdepim/phoneaccess.cpp
index c0bd6cc..357cd39 100644
--- a/libkdepim/phoneaccess.cpp
+++ b/libkdepim/phoneaccess.cpp
@@ -40,7 +40,7 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
QString fileName = QDir::homeDirPath() +"/.gammurc";
#endif
//qDebug("save %d ", load );
- QString content;
+ QString content = "[gammu]\n";;
bool write = false;
bool addPort = true, addConnection = true, addModel = true;
QFile file( fileName );
@@ -95,16 +95,12 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
}
if ( addConnection ) {
- if ( ! write )
- content += "[gammu]\n";
write = true;
content += "connection = ";
content += connection;
content += "\n";
}
if ( addPort ) {
- if ( ! write )
- content += "[gammu]\n";
write = true;
content += "port = ";
content += device;
@@ -112,8 +108,6 @@ void PhoneAccess::writeConfig( QString device, QString connection, QString model
}
if ( addModel ) {
- if ( ! write )
- content += "[gammu]\n";
write = true;
content += "model = ";
content += model;