[kdewebdev/kfilereplace] compatibility with QT_NO_ASCII_CAST

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1216783 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
samelian 14 years ago
parent 039cc9f8f7
commit 5ee1597893

@ -1029,7 +1029,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
if (m_option->m_encoding == "utf8")
currentStream.setEncoding(TQTextStream::UnicodeUTF8);
else
currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
currentStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
TQString line = currentStream.read(),
backupLine = line;
@ -1068,7 +1068,7 @@ void KFileReplacePart::replaceAndBackup(const TQString& currentDir, const TQStri
if (m_option->m_encoding == "utf8")
newStream.setEncoding(TQTextStream::UnicodeUTF8);
else
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
newStream << line;
newFile.close();
}
@ -1121,7 +1121,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
if (m_option->m_encoding == "utf8")
oldStream.setEncoding(TQTextStream::UnicodeUTF8);
else
oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
oldStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
TQString line = oldStream.read();
oldFile.close();
@ -1146,7 +1146,7 @@ void KFileReplacePart::replaceAndOverwrite(const TQString& currentDir, const TQS
if (m_option->m_encoding == "utf8")
newStream.setEncoding(TQTextStream::UnicodeUTF8);
else
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
newStream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
newStream << line;
newFile.close();
}
@ -1340,7 +1340,7 @@ void KFileReplacePart::search(const TQString& currentDir, const TQString& fileNa
if (m_option->m_encoding == "utf8")
stream.setEncoding(TQTextStream::UnicodeUTF8);
else
stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding));
stream.setCodec(TQTextCodec::codecForName(m_option->m_encoding.ascii()));
TQString line = stream.read();
file.close();

Loading…
Cancel
Save