on xenial help sign in
qDebug--, comments++
dca7299Michael Zanetti
plugins/Unity/Launcher/launchermodel.cpp−5
@@ -23,8 +23,6 @@
23
23
24#include <unity/shell/application/ApplicationInfoInterface.h>
24#include <unity/shell/application/ApplicationInfoInterface.h>
25
25
26−#include <QDebug>
27−
28using namespace unity::shell::application;
26using namespace unity::shell::application;
29
27
30LauncherModel::LauncherModel(QObject *parent):
28LauncherModel::LauncherModel(QObject *parent):
@@ -203,8 +201,6 @@ ApplicationManagerInterface *LauncherModel::applicationManager() const
203
201
204void LauncherModel::setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager)
202void LauncherModel::setApplicationManager(unity::shell::application::ApplicationManagerInterface *appManager)
205{
203{
206− qDebug() << "setting appmanager" << appManager;
207−
208 // Is there already another appmanager set?
204 // Is there already another appmanager set?
209 if (m_appManager) {
205 if (m_appManager) {
210 // Disconnect any signals
206 // Disconnect any signals
@@ -301,7 +297,6 @@ void LauncherModel::applicationAdded(const QModelIndex &parent, int row)
301 if (found) {
297 if (found) {
302 // Shall we paint some running/recent app highlight? If yes, do it here.
298 // Shall we paint some running/recent app highlight? If yes, do it here.
303 } else {
299 } else {
304− qDebug() << "Adding app icon" << app->icon();
305 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString());
300 LauncherItem *item = new LauncherItem(app->appId(), app->name(), app->icon().toString());
306 item->setRecent(true);
301 item->setRecent(true);
307 item->setFocused(app->focused());
302 item->setFocused(app->focused());
tests/plugins/Unity/Launcher/launchermodeltest.cpp+2
@@ -26,6 +26,7 @@
26
26
27#include <QtTest>
27#include <QtTest>
28
28
29+// This is a mock, specifically to test the LauncherModel
29class MockApp: public unity::shell::application::ApplicationInfoInterface
30class MockApp: public unity::shell::application::ApplicationInfoInterface
30{
31{
31 Q_OBJECT
32 Q_OBJECT
@@ -46,6 +47,7 @@ private:
46 bool m_focused;
47 bool m_focused;
47};
48};
48
49
50+// This is a mock, specifically to test the LauncherModel
49class MockAppManager: public unity::shell::application::ApplicationManagerInterface
51class MockAppManager: public unity::shell::application::ApplicationManagerInterface
50{
52{
51 Q_OBJECT
53 Q_OBJECT