diff options
-rw-r--r-- | kcm_gtk/kcmgtk.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kcm_gtk/kcmgtk.cpp b/kcm_gtk/kcmgtk.cpp index 0667731..bd3ab79 100644 --- a/kcm_gtk/kcmgtk.cpp +++ b/kcm_gtk/kcmgtk.cpp @@ -509,13 +509,14 @@ void KcmGtk::save() if (file.exists()) { file.open(IO_ReadOnly); - TQByteArray fileData = file.readAll(); + TQTextStream fileDataStream = TQTextStream(&file); + fileDataStream.setEncoding(TQTextStream::Locale); + TQString fileDataString = fileDataStream.read(); file.close(); TQString rcLine = "export GTK2_RC_FILES=$HOME/.gtkrc-2.0"; - TQString fileDataString(fileData); fileDataString.replace("\n" + rcLine, "\n# (This is no longer needed from version 0.8 of the theme engine)\n# " + rcLine); - + file.open(IO_WriteOnly); stream.setDevice(TQT_TQIODEVICE(&file)); stream << fileDataString; |