Changeset View
Changeset View
Standalone View
Standalone View
src/core/kremoteencoding.cpp
Show All 10 Lines | 1 | /* This file is part of the KDE libraries | |||
---|---|---|---|---|---|
11 | Library General Public License for more details. | 11 | Library General Public License for more details. | ||
12 | 12 | | |||
13 | You should have received a copy of the GNU Library General Public License | 13 | You should have received a copy of the GNU Library General Public License | ||
14 | along with this library; see the file COPYING.LIB. If not, write to | 14 | along with this library; see the file COPYING.LIB. If not, write to | ||
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
16 | Boston, MA 02110-1301, USA. | 16 | Boston, MA 02110-1301, USA. | ||
17 | */ | 17 | */ | ||
18 | 18 | | |||
19 | // TODO: remove me | | |||
20 | #undef QT_NO_CAST_FROM_BYTEARRAY | | |||
21 | | ||||
22 | #include "kremoteencoding.h" | 19 | #include "kremoteencoding.h" | ||
23 | 20 | | |||
24 | #include <kstringhandler.h> | 21 | #include <kstringhandler.h> | ||
25 | #include <QTextCodec> | 22 | #include <QTextCodec> | ||
26 | #include <QUrl> | 23 | #include <QUrl> | ||
27 | 24 | | |||
28 | class KRemoteEncodingPrivate | 25 | class KRemoteEncodingPrivate | ||
29 | { | 26 | { | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 81 | { | |||
90 | return encode(dir); | 87 | return encode(dir); | ||
91 | } | 88 | } | ||
92 | 89 | | |||
93 | QByteArray KRemoteEncoding::fileName(const QUrl &url) const | 90 | QByteArray KRemoteEncoding::fileName(const QUrl &url) const | ||
94 | { | 91 | { | ||
95 | return encode(url.fileName()); | 92 | return encode(url.fileName()); | ||
96 | } | 93 | } | ||
97 | 94 | | |||
98 | const char *KRemoteEncoding::encoding() const | 95 | const char *KRemoteEncoding::encoding() const | ||
dfaure: KF6 TODO: return QByteArray | |||||
99 | { | 96 | { | ||
100 | return d->m_codec->name(); | 97 | // KF6 TODO: return QByteArray | ||
98 | return d->m_codec->name().constData(); | ||||
101 | } | 99 | } | ||
102 | 100 | | |||
103 | int KRemoteEncoding::encodingMib() const | 101 | int KRemoteEncoding::encodingMib() const | ||
104 | { | 102 | { | ||
105 | return d->m_codec->mibEnum(); | 103 | return d->m_codec->mibEnum(); | ||
106 | } | 104 | } | ||
107 | 105 | | |||
108 | void KRemoteEncoding::setEncoding(const char *name) | 106 | void KRemoteEncoding::setEncoding(const char *name) | ||
Show All 24 Lines |
KF6 TODO: return QByteArray