Ticket #5559: mythmainwindow.diff

File mythmainwindow.diff, 1.6 KB (added by grhowes@…, 12 years ago)

patch for mythmainwindow.cpp

  • mythmainwindow.cpp

     
    105105class MythMainWindowPrivate
    106106{
    107107  public:
     108        MythMainWindowPrivate();
     109        ~MythMainWindowPrivate();
    108110    int TranslateKeyNum(QKeyEvent *e);
    109111
    110112    float wmult, hmult;
     
    170172    QWidget *paintwin;
    171173};
    172174
     175MythMainWindowPrivate::MythMainWindowPrivate()
     176
     177#ifdef USING_APPLEREMOTE
     178:appleRemote(AppleRemote::instance())
     179#endif
     180{
     181}
     182
     183MythMainWindowPrivate::~MythMainWindowPrivate()
     184{
     185}
     186
    173187// Make keynum in QKeyEvent be equivalent to what's in QKeySequence
    174188int MythMainWindowPrivate::TranslateKeyNum(QKeyEvent* e)
    175189{
     
    343357#ifdef USING_APPLEREMOTE
    344358    d->appleRemoteListener = NULL;
    345359    d->appleRemoteListener = new AppleRemoteListener(this);
    346     d->appleRemote = AppleRemote(AppleRemote::instance());
    347360
    348361    d->appleRemote.setListener(d->appleRemoteListener);
    349362    d->appleRemote.startListening();
     
    436449#endif
    437450
    438451#ifdef USING_APPLEREMOTE
    439     if (d->AppleRemote.isRunning())
     452    if (d->appleRemote.isRunning())
    440453    {
    441         d->AppleRemote.stopListening();
     454        d->appleRemote.stopListening();
    442455        //d->AppleRemote.terminate();
    443456        //d->AppleRemote.wait();
    444457    }
     
    13331346        {
    13341347            QKeyEvent *ke = dynamic_cast<QKeyEvent*>(e);
    13351348
     1349            // Work around weird GCC run-time bug. Only manifest on Mac OS X
     1350            if (!ke)
     1351                ke = (QKeyEvent *)e;
     1352
    13361353            if (currentWidget())
    13371354            {
    13381355                ke->accept();