Commit c4e62b06 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Move the defaultTranslatorText to QByteArray and put it inside the .cpp file.


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1108108
parent 892b6451
"keyboard \"Fallback Key Translator\"\n"
"key Tab : \"\\t\" \0"
......@@ -41,9 +41,10 @@
using namespace Konsole;
const char* const KeyboardTranslatorManager::defaultTranslatorText =
#include <DefaultTranslatorText.h>
;
const QByteArray KeyboardTranslatorManager::defaultTranslatorText(
"keyboard \"Fallback Key Translator\"\n"
"key Tab : \"\\t\""
);
KeyboardTranslatorManager::KeyboardTranslatorManager()
: _haveLoadedAll(false)
......@@ -146,7 +147,8 @@ const KeyboardTranslator* KeyboardTranslatorManager::defaultTranslator()
if (!translator)
{
QBuffer textBuffer;
textBuffer.setData(defaultTranslatorText,strlen(defaultTranslatorText));
textBuffer.setData(defaultTranslatorText);
textBuffer.open(QIODevice::ReadOnly);
translator = loadTranslator(&textBuffer,"fallback");
}
return translator;
......
......@@ -493,7 +493,7 @@ public:
static KeyboardTranslatorManager* instance();
private:
static const char* const defaultTranslatorText;
static const QByteArray defaultTranslatorText;
void findTranslators(); // locate the available translators
KeyboardTranslator* loadTranslator(const QString& name); // loads the translator
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment