summaryrefslogtreecommitdiffstats
path: root/quanta/src/document.cpp
diff options
context:
space:
mode:
authorsamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-16 14:35:51 +0000
committersamelian <samelian@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-16 14:35:51 +0000
commit7af884d886e2428d5b28e9cf7d81c97d7e378123 (patch)
tree64fe5f9f02f7d338baa54c3a380e43a66ae45f8f /quanta/src/document.cpp
parentaf2166652dfcfacffa91a7e1466e3abed19862ce (diff)
downloadtdewebdev-7af884d886e2428d5b28e9cf7d81c97d7e378123.tar.gz
tdewebdev-7af884d886e2428d5b28e9cf7d81c97d7e378123.zip
[kdewebdev/quanta] fix deprecation warnings; make compatible with QT_NO_ASCII_CAST flag
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1214823 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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&)));