mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-20 04:41:36 +02:00
qt5 support for snore
This commit is contained in:
@@ -298,8 +298,12 @@ if( WIN32 )
|
|||||||
endif( WIN32 )
|
endif( WIN32 )
|
||||||
|
|
||||||
if( WIN32 OR APPLE )
|
if( WIN32 OR APPLE )
|
||||||
macro_optional_find_package(Libsnore)
|
if( TOMAHAWK_QT5 )
|
||||||
macro_log_feature(LIBSNORE_FOUND "SnoreNotify" "Library for notifications" "https://github.com/TheOneRing/Snorenotify" FALSE "" "")
|
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()
|
endif()
|
||||||
|
|
||||||
#TODO: support external qxt
|
#TODO: support external qxt
|
||||||
|
@@ -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)
|
|
@@ -33,8 +33,20 @@
|
|||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
#include <QImage>
|
#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()
|
// QTextDocument provides Qt::escape()
|
||||||
#include <QTextDocument>
|
#include <QTextDocument>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Tomahawk
|
namespace Tomahawk
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user