~indicator-applet-developers/hud/trunk.14.04

« back to all changes in this revision

Viewing changes to libqtgmenu/internal/QtGActionGroup.h

  • Committer: CI bot
  • Author(s): Pete Woods, Marcus Tomlinson
  • Date: 2014-06-04 14:04:03 UTC
  • mfrom: (390.1.44 trunk)
  • Revision ID: ps-jenkins@lists.canonical.com-20140604140403-a70c33snru5b6k4x
Harden HUD against misbehaving applications

Report the offending applications using Apport's recoverable problem tool.
Switch to using shared pointers where possible for managing memory. Fixes: 1298656, 1316473, 1322050, 1325538

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define QTGACTIONGROUP_H
21
21
 
22
22
#include <QObject>
 
23
#include <QSharedPointer>
23
24
#include <QVariant>
24
25
 
25
26
#undef signals
33
34
Q_OBJECT
34
35
 
35
36
public:
36
 
  QtGActionGroup( const QString& action_prefix, GActionGroup* action_group );
 
37
  QtGActionGroup(QSharedPointer<GDBusConnection> connection,
 
38
            const QString& action_prefix,
 
39
            const QString& service,
 
40
            const QString& path);
37
41
  virtual ~QtGActionGroup();
38
42
 
39
 
  GActionGroup* ActionGroup() const;
 
43
  QSharedPointer<GActionGroup> ActionGroup() const;
40
44
 
41
45
Q_SIGNALS:
42
46
  void ActionAdded( QString action_name );
66
70
private:
67
71
 
68
72
  QString m_action_prefix;
69
 
  GActionGroup* m_action_group = nullptr;
 
73
  QSharedPointer<GActionGroup> m_action_group;
70
74
 
71
75
  gulong m_action_added_handler = 0;
72
76
  gulong m_action_removed_handler = 0;