1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 12:21:52 +02:00

qt5 support for snore

This commit is contained in:
Patrick von Reth
2014-04-04 10:55:08 +02:00
parent 7c8cd78169
commit 1b85b9c0d6
3 changed files with 18 additions and 36 deletions

View File

@@ -298,8 +298,12 @@ if( WIN32 )
endif( WIN32 )
if( WIN32 OR APPLE )
macro_optional_find_package(Libsnore)
macro_log_feature(LIBSNORE_FOUND "SnoreNotify" "Library for notifications" "https://github.com/TheOneRing/Snorenotify" FALSE "" "")
if( TOMAHAWK_QT5 )
macro_optional_find_package(LibsnoreQt5 QUIET)
else()
macro_optional_find_package(Libsnore QUIET)
endif()
macro_log_feature(LIBSNORE_FOUND "Libsnore" "Library for notifications" "https://github.com/TheOneRing/Snorenotify" FALSE "" "")
endif()
#TODO: support external qxt

View File

@@ -1,34 +0,0 @@
# - Try to find the libsnore library
# Once done this will define
#
# LIBSNORE_FOUND - system has the LIBSNORE library
# LIBSNORE_LIBRARIES - The libraries needed to use LIBSNORE
# LIBSNORE_INCLUDE_DIRS - The includes needed to use LIBSNORE
# LIBSNORE_PLUGIN_PATH - Path of the plugins
# Copyright 2013 Patrick von Reth <vonreth@kde.org>
find_path(LIBSNORE_INCLUDE_DIR
NAMES snore/core/snore.h
PATHS ${KDE4_INCLUDE_DIR}
)
find_library(LIBSNORE_LIBRARY
NAMES
libsnore
snore
PATHS ${KDE4_LIB_DIR}
)
find_path(LIBSNORE_PLUGIN_PATH snoreplugins)
if(LIBSNORE_LIBRARY AND LIBSNORE_PLUGIN_PATH)
set(LIBSNORE_PLUGIN_PATH ${LIBSNORE_PLUGIN_PATH}/snoreplugins)
endif()
set(LIBSNORE_LIBRARIES ${LIBSNORE_LIBRARY})
set(LIBSNORE_INCLUDE_DIRS ${LIBSNORE_INCLUDE_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBSNORE DEFAULT_MSG LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)
mark_as_advanced(LIBSNORE_LIBRARIES LIBSNORE_INCLUDE_DIRS)

View File

@@ -33,8 +33,20 @@
#include <QApplication>
#include <QImage>
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
namespace Qt
{
inline QString escape( const QString &x )
{
x.toHtmlEscaped();
}
}
#else
// QTextDocument provides Qt::escape()
#include <QTextDocument>
#endif
namespace Tomahawk
{