~ubuntu-branches/ubuntu/vivid/quassel/vivid-updates

« back to all changes in this revision

Viewing changes to src/qtui/statusnotifieritem.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Michael Marley
  • Date: 2015-02-19 07:42:04 UTC
  • mfrom: (1.1.59)
  • Revision ID: package-import@ubuntu.com-20150219074204-vu1qv4i0devi2j2t
Tags: 0.12~beta1-0ubuntu1
[ Michael Marley ]
* New upstream kf5 based beta release
  - Drop patches debian/patches/CVE-2014-8483.patch,
    upstream_qca-qt5-cmake.patch and upstream_qca-qt5-code.patch
  - Add kf5 build-deps
  - Adjust install paths
* Fix upstart job to avoid race conditions on restart

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2005-2014 by the Quassel Project                        *
 
2
 *   Copyright (C) 2005-2015 by the Quassel Project                        *
3
3
 *   devel@quassel-irc.org                                                 *
4
4
 *                                                                         *
5
5
 *   This contains code from KStatusNotifierItem, part of the KDE libs     *
51
51
protected:
52
52
    virtual QString iconNameForAction(QAction *action) // TODO Qt 4.7: fixme when we have converted our iconloader
53
53
    {
54
 
        Icon icon(action->icon());
55
 
#if QT_VERSION >= 0x040701
56
 
        // QIcon::name() is in the 4.7 git branch, but it is not in 4.7 TP.
57
 
        // If you get a build error here, you need to update your pre-release
58
 
        // of Qt 4.7.
 
54
        QIcon icon(action->icon());
59
55
        return icon.isNull() ? QString() : icon.name();
60
 
#else
61
 
        return QString();
62
 
#endif
63
56
    }
64
57
};
65
58
 
293
286
{
294
287
    if (mode() == StatusNotifier) {
295
288
        //FIXME: ugly ugly workaround to weird QMenu's focus problems
296
 
#ifdef HAVE_KDE
 
289
#ifdef HAVE_KDE4
297
290
        if (watched == trayMenu() &&
298
291
            (event->type() == QEvent::WindowDeactivate || (event->type() == QEvent::MouseButtonRelease && static_cast<QMouseEvent *>(event)->button() == Qt::LeftButton))) {
299
292
            // put at the back of event queue to let the action activate anyways