Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/multikey/keyboard.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index b71f929..671868c 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -996,48 +996,58 @@ void Keys::setKey(const int row, const int qcode, const ushort unicode, key->width = width; // share key->pressed between same keys bool found = 0; for (int i = 1; i <= 5; i++) { for (unsigned int j = 0; j < keys[i].count(); j++) if (keys[i].at(j)->qcode == qcode && keys[i].at(j)->unicode == unicode) { key->pressed = keys[i].at(j)->pressed; found = 1; } } if (!found) { key->pressed = new bool; *(key->pressed) = 0; } key->pix = pix; keys[row].append(key); } + +// Keys::~Keys {{{2 +Keys::~Keys() { + + for (int i = 1; i <= 5; i++) + for (unsigned int j = 0; j < keys[i].count(); j++) + delete keys[i].at(j); + +} + // Keys:: other functions {{{2 int Keys::width(const int row, const int col) { return keys[row].at(col)->width; } ushort Keys::uni(const int row, const int col) { return keys[row].at(col)->unicode; } int Keys::qcode(const int row, const int col) { return keys[row].at(col)->qcode; } QPixmap *Keys::pix(const int row, const int col) { return keys[row].at(col)->pix; } bool Keys::pressed(const int row, const int col) { |