ports/multimedia/kplayer-kde4/files/patch-kplayer_kplayernode.cpp
John Marino 6f02dc66e0 multimedia/kplayer-kde4: Stage, fix on F10+, use explicit linking
Apparently the clang parser was having trouble with the nested ternary
operator on C++ which was the cause of the FreeBSD 10+ failures. Expanding
it to a condition ladder pleased clang.

A couple of libraries were used but not explicitly specified to the
linker before: libsolid and libX11, so let's correct that too.
2014-07-08 06:21:34 +00:00

15 lines
840 B
C++

--- kplayer/kplayernode.cpp.orig 2008-01-11 13:27:11.000000000 +0000
+++ kplayer/kplayernode.cpp
@@ -2397,8 +2397,10 @@ KPlayerContainerNode* KPlayerDevicesNode
{
QMap<QString, QString>::ConstIterator iterator = m_type_map.find (id);
QString type (iterator == m_type_map.end() ? media() -> type (id) : iterator.value());
- KPlayerDeviceNode* node = type == "TV" ? (KPlayerDeviceNode*) new KPlayerTVNode
- : type == "DVB" ? (KPlayerDeviceNode*) new KPlayerDVBNode : (KPlayerDeviceNode*) new KPlayerDiskNode;
+ KPlayerDeviceNode* node;
+ if (type == "TV") { node = (KPlayerDeviceNode*) new KPlayerTVNode; }
+ else if (type == "DVB") { node = (KPlayerDeviceNode*) new KPlayerDVBNode; }
+ else { node = (KPlayerDeviceNode*) new KPlayerDiskNode; }
node -> setup (this, id, origin);
return node;
}