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 @@ ...@@ -41,9 +41,10 @@
using namespace Konsole; using namespace Konsole;
const char* const KeyboardTranslatorManager::defaultTranslatorText = const QByteArray KeyboardTranslatorManager::defaultTranslatorText(
#include <DefaultTranslatorText.h> "keyboard \"Fallback Key Translator\"\n"
; "key Tab : \"\\t\""
);
KeyboardTranslatorManager::KeyboardTranslatorManager() KeyboardTranslatorManager::KeyboardTranslatorManager()
: _haveLoadedAll(false) : _haveLoadedAll(false)
...@@ -146,7 +147,8 @@ const KeyboardTranslator* KeyboardTranslatorManager::defaultTranslator() ...@@ -146,7 +147,8 @@ const KeyboardTranslator* KeyboardTranslatorManager::defaultTranslator()
if (!translator) if (!translator)
{ {
QBuffer textBuffer; QBuffer textBuffer;
textBuffer.setData(defaultTranslatorText,strlen(defaultTranslatorText)); textBuffer.setData(defaultTranslatorText);
textBuffer.open(QIODevice::ReadOnly);
translator = loadTranslator(&textBuffer,"fallback"); translator = loadTranslator(&textBuffer,"fallback");
} }
return translator; return translator;
......
...@@ -493,7 +493,7 @@ public: ...@@ -493,7 +493,7 @@ public:
static KeyboardTranslatorManager* instance(); static KeyboardTranslatorManager* instance();
private: private:
static const char* const defaultTranslatorText; static const QByteArray defaultTranslatorText;
void findTranslators(); // locate the available translators void findTranslators(); // locate the available translators
KeyboardTranslator* loadTranslator(const QString& name); // loads the translator 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