diff options
author | gregory guy <gregory-tde@laposte.net> | 2020-08-19 13:08:28 +0200 |
---|---|---|
committer | gregory guy <gregory-tde@laposte.net> | 2020-08-19 13:08:28 +0200 |
commit | 3eda17fbb27cf5425b4fdf0590e17f04ae64b4a1 (patch) | |
tree | 98b8b95ea92cc37e0fbc98b16456d86e46df1f8c /kpacman/keys.cpp | |
parent | 5debd26d86e7e1bb9ad9dcfa9b98e672440c195b (diff) | |
download | tdepacman-3eda17fbb27cf5425b4fdf0590e17f04ae64b4a1.tar.gz tdepacman-3eda17fbb27cf5425b4fdf0590e17f04ae64b4a1.zip |
fix FTBFS, 'keys' class object being out of scope.
see comments starting from https://mirror.git.trinitydesktop.org/gitea/TDE/kpacman/issues/1#issuecomment-9217
Patch is provided by François Andriot with contribution from Slávek Banko
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'kpacman/keys.cpp')
-rw-r--r-- | kpacman/keys.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/kpacman/keys.cpp b/kpacman/keys.cpp index 46b55d7..780e895 100644 --- a/kpacman/keys.cpp +++ b/kpacman/keys.cpp @@ -13,8 +13,8 @@ #include <ntqpixmap.h> #include <ntqstring.h> -Keys::Keys( TQWidget *parent, const char *name) - : TQDialog( parent, name, TRUE ) +PKeys::PKeys( TQWidget *parent, const char *name) + : TQDialog( parent, name, TRUE, 0 ) { TDEStandardDirs *dirs = TDEGlobal::dirs(); @@ -88,7 +88,7 @@ Keys::Keys( TQWidget *parent, const char *name) init(); } -void Keys::keyPressEvent( TQKeyEvent *e ) +void PKeys::keyPressEvent( TQKeyEvent *e ) { uint kCode = e->key() & ~(SHIFT | CTRL | ALT); TQString string = TDEAccel::keyToString(kCode); @@ -103,27 +103,27 @@ void Keys::keyPressEvent( TQKeyEvent *e ) reject(); } -void Keys::butUp() +void PKeys::butUp() { getKey(0); } -void Keys::butDown() +void PKeys::butDown() { getKey(1); } -void Keys::butLeft() +void PKeys::butLeft() { getKey(2); } -void Keys::butRight() +void PKeys::butRight() { getKey(3); } -void Keys::getKey(int i) +void PKeys::getKey(int i) { if ( lab != 0) focusOut(lab); @@ -131,14 +131,14 @@ void Keys::getKey(int i) focusIn(labels[i]); } -void Keys::focusOut(TQLabel *l) +void PKeys::focusOut(TQLabel *l) { l->setFrameStyle( TQFrame::NoFrame ); l->setBackgroundColor(backgroundColor()); l->repaint(); } -void Keys::focusIn(TQLabel *l) +void PKeys::focusIn(TQLabel *l) { lab = l; lab->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); @@ -146,7 +146,7 @@ void Keys::focusIn(TQLabel *l) lab->repaint(); } -void Keys::defaults() +void PKeys::defaults() { if ( lab != 0) focusOut(lab); @@ -159,7 +159,7 @@ void Keys::defaults() labels[3]->setText("Right"); } -void Keys::init() +void PKeys::init() { TQString up("Up"); up = kapp->config()->readEntry("upKey", (const char*) up); @@ -178,7 +178,7 @@ void Keys::init() labels[3]->setText(right); } -void Keys::ok() +void PKeys::ok() { kapp->config()->writeEntry("upKey", (const char*) labels[0]->text() ); kapp->config()->writeEntry("downKey", (const char*) labels[1]->text() ); |