fix markup stuff

This commit is contained in:
Patrick von Reth 2015-06-29 16:12:38 +02:00
parent 0433f38f37
commit 64a680f729
2 changed files with 11 additions and 4 deletions

View File

@ -45,6 +45,7 @@ NotificationData::NotificationData(const Snore::Application &application, const
{
notificationCount++;
snoreDebug(SNORE_INFO) << "Creating Notification: ActiveNotifications" << notificationCount << "id" << m_id;
snoreDebug(SNORE_INFO) << title << text;
initHints();
}
@ -61,8 +62,9 @@ Snore::NotificationData::NotificationData(const Notification &old, const QString
m_toReplace(old)
{
notificationCount++;
initHints();
snoreDebug(SNORE_INFO) << "Creating Notification: ActiveNotifications" << notificationCount << "id" << m_id;
snoreDebug(SNORE_INFO) << title << text;
initHints();
}
NotificationData::~NotificationData()
@ -92,8 +94,12 @@ void NotificationData::setTimeoutTimer(QTimer *timer)
QString NotificationData::resolveMarkup(const QString &string, Utils::MARKUP_FLAGS flags)
{
if(flags != Utils::NO_MARKUP && !m_application.constHints().value("use-markup").toBool()) {
return string.toHtmlEscaped();
if(!m_application.constHints().value("use-markup").toBool()) {
if(flags == Utils::NO_MARKUP){
return string;
} else {
return string.toHtmlEscaped();
}
} else {
return Utils::normalizeMarkup(string, flags);
}

View File

@ -7,10 +7,11 @@ set_package_properties(Qt5WebSockets PROPERTIES
if(Qt5WebSockets_FOUND)
set( PUSHOVER_FRONTEND_SRC
pushover_frontend.cpp
pushoversettings.cpp
pushoversettings.cpp
)
add_library(libsnore_frontend_pushover MODULE ${PUSHOVER_FRONTEND_SRC} )
target_link_libraries(libsnore_frontend_pushover Snore::Libsnore Qt5::WebSockets )
install(TARGETS libsnore_frontend_pushover ${SNORE_PLUGIN_INSTALL_PATH})
endif()