on xenial help sign in
Fix path in launcher mock after moving our mock icons, to avoid a lot of "icon not found" warnings during qmluitests.
commitea623d873e537a27ff4563661f1f1113478d1499 authorMichael Terry <michael.terry@canonical.com> dateFri 27 Jun 2014, 08:46 (12 years ago) parent4c71a8a0d25a9d
4 files changed+6−6
tests/mocks/AccountsService/AccountsService.cpp+3−1 tests/mocks/AccountsService/CMakeLists.txt−2 tests/mocks/Unity/Launcher/CMakeLists.txt−2 tests/mocks/Unity/Launcher/MockLauncherItem.cpp+3−1
tests/mocks/AccountsService/AccountsService.cpp+3−1
@@ -18,9 +18,11 @@
1818
1919#include "AccountsService.h"
2020
21+#include <paths.h>
22+
2123AccountsService::AccountsService(QObject* parent)
2224 : QObject(parent),
23− m_backgroundFile(TOP_SRCDIR "/qml/graphics/phone_background.jpg"),
25+ m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
2426 m_statsWelcomeScreen(true)
2527{
2628}
tests/mocks/AccountsService/CMakeLists.txt−2
@@ -1,5 +1,3 @@
1−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
2−
31add_library(MockAccountsService-qml MODULE
42 AccountsService.cpp
53 plugin.cpp
tests/mocks/Unity/Launcher/CMakeLists.txt−2
@@ -1,7 +1,5 @@
11pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=3)
22
3−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
4−
53include_directories(
64 ${CMAKE_CURRENT_SOURCE_DIR}
75)
tests/mocks/Unity/Launcher/MockLauncherItem.cpp+3−1
@@ -20,6 +20,8 @@
2020#include "MockLauncherItem.h"
2121#include "MockQuickListModel.h"
2222
23+#include <paths.h>
24+
2325using namespace unity::shell::launcher;
2426
2527MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent):
@@ -27,7 +29,7 @@ MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopF
2729 m_appId(appId),
2830 m_desktopFile(desktopFile),
2931 m_name(name),
30− m_icon(TOP_SRCDIR "/graphics/applicationIcons/" + icon + ".png"),
32+ m_icon(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
3133 m_pinned(false),
3234 m_running(false),
3335 m_recent(false),