From 5ee15978933b6a6a6f37b1a033c0ef797f78778d Mon Sep 17 00:00:00 2001 From: samelian Date: Mon, 24 Jan 2011 19:30:21 +0000 Subject: [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 --- kfilereplace/kfilereplacepart.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kfilereplace/kfilereplacepart.cpp b/kfilereplace/kfilereplacepart.cpp index adfd6a4f..3955e643 100644 --- a/kfilereplace/kfilereplacepart.cpp +++ b/kfilereplace/kfilereplacepart.cpp @@ -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(); -- cgit v1.2.1