summaryrefslogtreecommitdiffstats
path: root/quanta/src/document.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/src/document.cpp')
-rw-r--r--quanta/src/document.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp
index c3309a42..f42986ab 100644
--- a/quanta/src/document.cpp
+++ b/quanta/src/document.cpp
@@ -164,7 +164,7 @@ Document::Document(KTextEditor::Document *doc,
m_encoding = encodingIf->encoding();
if (m_encoding.isEmpty())
m_encoding = "utf8"; //final fallback
- m_codec = TQTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding.ascii());
selectionIf = dynamic_cast<KTextEditor::SelectionInterface *>(m_doc);
selectionIfExt = dynamic_cast<KTextEditor::SelectionInterfaceExt *>(m_doc);
@@ -630,7 +630,7 @@ void Document::createTempFile()
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tempFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
+ tempFile->textStream()->setCodec(TQTextCodec::codecForName(encoding.ascii()));
* (tempFile->textStream()) << editIf->text();
m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
@@ -852,7 +852,7 @@ void Document::slotCharactersInserted(int line, int column, const TQString& stri
if (encoding != m_encoding)
{
m_encoding = encoding;
- m_codec = TQTextCodec::codecForName(encoding);
+ m_codec = TQTextCodec::codecForName(encoding.ascii());
}
if (!m_codec->canEncode(string[0]))
{
@@ -2708,7 +2708,7 @@ void Document::createBackup(KConfig* config)
if (file.open(IO_WriteOnly))
{
TQTextStream stream(&file);
- stream.setCodec(TQTextCodec::codecForName(encoding));
+ stream.setCodec(TQTextCodec::codecForName(encoding.ascii()));
stream << editIf->text();
file.close();
}
@@ -2870,7 +2870,7 @@ void Document::open(const KURL &url, const TQString &encoding)
{
encodingIf->setEncoding(encoding);
m_encoding = encoding;
- m_codec = TQTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding.ascii());
}
connect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
connect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));