Switch to unified view

a/src/qtgui/rclhelp.cpp b/src/qtgui/rclhelp.cpp
...
...
20
#include "autoconfig.h"
20
#include "autoconfig.h"
21
#include <time.h>
21
#include <time.h>
22
22
23
#include <qevent.h>
23
#include <qevent.h>
24
#include <qwidget.h>
24
#include <qwidget.h>
25
#if (QT_VERSION < 0x040000)
26
#define Q34EVOVERRIDE QEvent::AccelOverride
27
#else
28
#define Q34EVOVERRIDE QEvent::ShortcutOverride
29
#endif
30
25
31
#include "recoll.h"
26
#include "recoll.h"
32
#include "rclhelp.h"
27
#include "rclhelp.h"
33
#include "debuglog.h"
28
#include "debuglog.h"
34
29
...
...
46
}
41
}
47
    
42
    
48
bool HelpClient::eventFilter(QObject *obj, QEvent *event)
43
bool HelpClient::eventFilter(QObject *obj, QEvent *event)
49
{
44
{
50
    static time_t last_start;
45
    static time_t last_start;
51
    if (event->type() == QEvent::KeyPress || event->type() == Q34EVOVERRIDE) {
46
    if (event->type() == QEvent::KeyPress || 
47
  event->type() == QEvent::ShortcutOverride) {
52
    //  LOGDEB(("HelpClient::eventFilter: %d\n", (int)event->type()));
48
    //  LOGDEB(("HelpClient::eventFilter: %d\n", (int)event->type()));
53
    QKeyEvent *ke = static_cast<QKeyEvent *>(event);
49
    QKeyEvent *ke = static_cast<QKeyEvent *>(event);
54
    if (ke->key() == Qt::Key_F1 || ke->key() == Qt::Key_Help) {
50
    if (ke->key() == Qt::Key_F1 || ke->key() == Qt::Key_Help) {
55
        if (obj->isWidgetType()) {
51
        if (obj->isWidgetType()) {
56
        QWidget *widget = static_cast<QWidget *>(obj)->focusWidget();
52
        QWidget *widget = static_cast<QWidget *>(obj)->focusWidget();
...
...
76
        return true;
72
        return true;
77
    }
73
    }
78
    }
74
    }
79
    return false;
75
    return false;
80
}
76
}
81