~unity-team/unity/trunk

« back to all changes in this revision

Viewing changes to UnityCore/Categories.cpp

  • Committer: Tarmac
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2013-07-11 03:21:07 UTC
  • mfrom: (3387.5.86 test-unit-to-gtests)
  • Revision ID: tarmac-20130711032107-85b5o6mr9wlkbgm9
CMake: run X-dependent tests using a dummy Xorg server on make check-headless

This is possible using dummy-xorg-test-runner.sh to run these tests.
Calling ./dummy-xorg-test-runner.sh binary --any-parameter -f --bar will
load binary (with requested parameters) in a fake X server (using dummy
xorg video driver, that now also uses llvmpipe to get 3d acceleration). Fixes: https://bugs.launchpad.net/bugs/1197561, https://bugs.launchpad.net/bugs/1199857, https://bugs.launchpad.net/bugs/1199890.

Approved by PS Jenkins bot, Christopher Townsend.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
2
/*
3
 
 * Copyright (C) 2011 Canonical Ltd
 
3
 * Copyright (C) 2011-2013 Canonical Ltd
4
4
 *
5
5
 * This program is free software: you can redistribute it and/or modify
6
6
 * it under the terms of the GNU General Public License version 3 as
15
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
16
 *
17
17
 * Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
 
18
 *              Marco Trevisan <marco.trevisan@canonical.com>
18
19
 */
19
20
 
20
21
#include "Categories.h"
26
27
 
27
28
Categories::Categories()
28
29
 : Categories(REMOTE)
29
 
{
30
 
  row_added.connect(sigc::mem_fun(this, &Categories::OnRowAdded));
31
 
  row_changed.connect(sigc::mem_fun(this, &Categories::OnRowChanged));
32
 
  row_removed.connect(sigc::mem_fun(this, &Categories::OnRowRemoved));
33
 
}
 
30
{}
34
31
 
35
32
Categories::Categories(ModelType model_type)
36
33
 : Model<Category>::Model(model_type)
37
34
{
38
 
  row_added.connect(sigc::mem_fun(this, &Categories::OnRowAdded));
39
 
  row_changed.connect(sigc::mem_fun(this, &Categories::OnRowChanged));
40
 
  row_removed.connect(sigc::mem_fun(this, &Categories::OnRowRemoved));
41
 
}
42
 
 
43
 
void Categories::OnRowAdded(Category& category)
44
 
{
45
 
  category_added.emit(category);
46
 
}
47
 
 
48
 
void Categories::OnRowChanged(Category& category)
49
 
{
50
 
  category_changed.emit(category);
51
 
}
52
 
 
53
 
void Categories::OnRowRemoved(Category& category)
54
 
{
55
 
  category_removed.emit(category);
 
35
  row_added.connect(sigc::mem_fun(&category_added, &decltype(category_added)::emit));
 
36
  row_changed.connect(sigc::mem_fun(&category_changed, &decltype(category_changed)::emit));
 
37
  row_removed.connect(sigc::mem_fun(&category_removed, &decltype(category_removed)::emit));
56
38
}
57
39
 
58
40
}