on xenial help sign in
Use paths.h instead of building with TOP_SRCDIR
0d25a9dMichael Terry
tests/mocks/AccountsService/AccountsService.cpp+3−1
@@ -18,9 +18,11 @@
18
18
19#include "AccountsService.h"
19#include "AccountsService.h"
20
20
21+#include <paths.h>
22+
21AccountsService::AccountsService(QObject* parent)
23AccountsService::AccountsService(QObject* parent)
22 : QObject(parent),
24 : QObject(parent),
23− m_backgroundFile(TOP_SRCDIR "/qml/graphics/phone_background.jpg"),
25+ m_backgroundFile(qmlDirectory() + "graphics/phone_background.jpg"),
24 m_statsWelcomeScreen(true)
26 m_statsWelcomeScreen(true)
25{
27{
26}
28}
tests/mocks/AccountsService/CMakeLists.txt−2
@@ -1,5 +1,3 @@
1−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
2−
3add_library(MockAccountsService-qml MODULE
1add_library(MockAccountsService-qml MODULE
4 AccountsService.cpp
2 AccountsService.cpp
5 plugin.cpp
3 plugin.cpp
tests/mocks/Unity/Launcher/CMakeLists.txt−2
@@ -1,7 +1,5 @@
1pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=3)
1pkg_check_modules(LAUNCHER_API REQUIRED unity-shell-launcher=3)
2
2
3−add_definitions(-DTOP_SRCDIR="${CMAKE_SOURCE_DIR}")
4−
5include_directories(
3include_directories(
6 ${CMAKE_CURRENT_SOURCE_DIR}
4 ${CMAKE_CURRENT_SOURCE_DIR}
7)
5)
tests/mocks/Unity/Launcher/MockLauncherItem.cpp+3−1
@@ -20,6 +20,8 @@
20#include "MockLauncherItem.h"
20#include "MockLauncherItem.h"
21#include "MockQuickListModel.h"
21#include "MockQuickListModel.h"
22
22
23+#include <paths.h>
24+
23using namespace unity::shell::launcher;
25using namespace unity::shell::launcher;
24
26
25MockLauncherItem::MockLauncherItem(const QString &appId, const QString& desktopFile, const QString& name, const QString& icon, QObject* parent):
27MockLauncherItem::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
27 m_appId(appId),
29 m_appId(appId),
28 m_desktopFile(desktopFile),
30 m_desktopFile(desktopFile),
29 m_name(name),
31 m_name(name),
30− m_icon(TOP_SRCDIR "/graphics/applicationIcons/" + icon + ".png"),
32+ m_icon(qmlDirectory() + "graphics/applicationIcons/" + icon + ".png"),
31 m_pinned(false),
33 m_pinned(false),
32 m_running(false),
34 m_running(false),
33 m_recent(false),
35 m_recent(false),