[amarok] tests: Fix compilation with unit tests enabled.

Mark Kretschmann kretschmann at kde.org
Sat Dec 14 09:30:45 UTC 2013


Git commit 5b3c84b29c16931e46bf7e1ddba16095245ce070 by Mark Kretschmann.
Committed on 14/12/2013 at 09:25.
Pushed by markey into branch 'master'.

Fix compilation with unit tests enabled.

The problem was clashing symbols between KDE's kWarning macro and gmock.
Thanks go to Edward for help with fixing.

CCMAIL: amarok-devel at kde.org

M  +1    -0    tests/core/collections/MockCollectionLocationDelegate.h
M  +1    -0    tests/mocks/MockTrack.h

http://commits.kde.org/amarok/5b3c84b29c16931e46bf7e1ddba16095245ce070

diff --git a/tests/core/collections/MockCollectionLocationDelegate.h b/tests/core/collections/MockCollectionLocationDelegate.h
index 019b096..a2f4504 100644
--- a/tests/core/collections/MockCollectionLocationDelegate.h
+++ b/tests/core/collections/MockCollectionLocationDelegate.h
@@ -23,6 +23,7 @@
 
 #include "core/collections/CollectionLocationDelegate.h"
 
+#undef kWarning  // WORKAROUND: Prevent symbols clash with KDE's kWarning macro
 #include <gmock/gmock.h>
 
 namespace Collections {
diff --git a/tests/mocks/MockTrack.h b/tests/mocks/MockTrack.h
index 9f47956..fec6ef2 100644
--- a/tests/mocks/MockTrack.h
+++ b/tests/mocks/MockTrack.h
@@ -17,6 +17,7 @@
 #ifndef META_MOCKTRACK_H
 #define META_MOCKTRACK_H
 
+#undef kWarning  // WORKAROUND: Prevent symbols clash with KDE's kWarning macro
 #include <gmock/gmock.h>
 
 #include "core/meta/Meta.h"


More information about the Amarok-devel mailing list