[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:57 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=bae0c58
The following commit has been merged in the master branch:
commit bae0c58d4b2a9622deedc110a34059f4b6b45963
Author: Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
Date: Fri Nov 9 12:03:37 2012 +0100
Make TelepathyLoggerQt4 a hard dependency
BUG: 307212
FIXED-IN: 0.6.0
---
CMakeLists.txt | 17 +++--------------
app/chat-window.cpp | 6 ------
lib/CMakeLists.txt | 8 +-------
lib/logmanager.cpp | 17 +----------------
lib/logmanager.h | 7 -------
lib/message.cpp | 2 --
lib/message.h | 5 -----
logviewer/CMakeLists.txt | 11 +----------
8 files changed, 6 insertions(+), 67 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cdef649..2e21773 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,7 @@ set(KDE_MIN_VERSION "4.4.75")
find_package (KDE4 ${KDE_MIN_VERSION} REQUIRED)
find_package (TelepathyQt4 0.9.1 REQUIRED)
find_package (KTp REQUIRED)
+find_package (TelepathyLoggerQt4 REQUIRED)
include (CheckIncludeFiles)
include (KDE4Defaults)
@@ -23,23 +24,15 @@ include_directories (${KDE4_INCLUDES}
${TELEPATHY_QT4_INCLUDE_DIR}
${QT_QTWEBKIT_INCLUDES}
${KTP_INCLUDE_DIR}
+ ${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS}
"${CMAKE_CURRENT_SOURCE_DIR}/lib"
)
add_definitions (${KDE4_DEFINITIONS}
+ ${TELEPATHY_LOGGER_QT4_DEFINITIONS}
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_KEYWORDS)
-macro_optional_find_package(TelepathyLoggerQt4)
-macro_log_feature(TELEPATHY_LOGGER_QT4_FOUND "TelepathyLoggerQt4" "Qt4 wrapper around telepathy-logger" FALSE "" "Needed for optional backlog support in the chat-window")
-if(TELEPATHY_LOGGER_QT4_FOUND)
- add_definitions( -DTELEPATHY_LOGGER_QT4_FOUND )
- include_directories(
- ${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS}
- )
- set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TELEPATHY_LOGGER_QT4_DEFINITIONS}" )
-endif()
-
configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
@@ -52,7 +45,3 @@ add_subdirectory(logviewer)
add_subdirectory(plasmoid)
add_subdirectory(filters)
add_subdirectory(tests)
-
-macro_display_feature_log()
-
-
diff --git a/app/chat-window.cpp b/app/chat-window.cpp
index 92c2741..00ee85b 100644
--- a/app/chat-window.cpp
+++ b/app/chat-window.cpp
@@ -333,9 +333,7 @@ void ChatWindow::onCurrentIndexChanged(int index)
}
// only show enable the action if there are actually previous converstations
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
setPreviousConversationsEnabled(currentChatTab->previousConversationAvailable());
-#endif
updateAccountIcon();
}
@@ -617,10 +615,8 @@ void ChatWindow::setupCustomActions()
spellDictComboAction->setIcon(KIcon(QLatin1String("tools-check-spelling")));
spellDictComboAction->setIconText(i18n("Choose Spelling Language"));
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
KAction *openLogAction = new KAction(KIcon(QLatin1String("view-pim-journal")), i18nc("Action to open the log viewer with a specified contact","&Previous Conversations"), this);
connect(openLogAction, SIGNAL(triggered()), SLOT(onOpenLogTriggered()));
-#endif
KAction *accountIconAction = new KAction(KIcon(QLatin1String("telepathy-kde")), i18n("Account Icon"), this);
m_accountIconLabel = new QLabel(this);
@@ -637,9 +633,7 @@ void ChatWindow::setupCustomActions()
actionCollection()->addAction(QLatin1String("language"), spellDictComboAction);
actionCollection()->addAction(QLatin1String("account-icon"), accountIconAction);
actionCollection()->addAction(QLatin1String("block-contact"), blockContactAction);
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
actionCollection()->addAction(QLatin1String("open-log"), openLogAction);
-#endif
}
void ChatWindow::setAudioCallEnabled(bool enable)
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 6098dd8..c0d70ee 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,13 +55,6 @@ kde4_add_ui_files(ktpchat_SRCS ${ktpchat_UI})
kde4_add_library(ktpchat SHARED ${ktpchat_SRCS})
-# telepathy-logger-qt4 related stuff
-if(TELEPATHY_LOGGER_QT4_FOUND)
- target_link_libraries(ktpchat
- ${TELEPATHY_LOGGER_QT4_LIBRARIES}
- )
-endif()
-
target_link_libraries(ktpchat
${KDE4_KDECORE_LIBS}
${KDE4_KIO_LIBS}
@@ -70,6 +63,7 @@ target_link_libraries(ktpchat
${QT_QTWEBKIT_LIBRARY}
${KDE4_KEMOTICONS_LIBS}
${KTP_LIBRARIES}
+ ${TELEPATHY_LOGGER_QT4_LIBRARIES}
)
install(TARGETS ktpchat ${INSTALL_TARGETS_DEFAULT_ARGS})
diff --git a/lib/logmanager.cpp b/lib/logmanager.cpp
index 35700c0..50d1622 100644
--- a/lib/logmanager.cpp
+++ b/lib/logmanager.cpp
@@ -24,8 +24,6 @@
#include <KDebug>
-
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
#include <TelepathyLoggerQt4/Init>
#include <TelepathyLoggerQt4/Entity>
#include <TelepathyLoggerQt4/PendingDates>
@@ -34,7 +32,6 @@
#include <TelepathyLoggerQt4/TextEvent>
#include <TelepathyLoggerQt4/CallEvent>
#include <TelepathyLoggerQt4/LogManager>
-#endif
#include <TelepathyQt/Types>
#include <TelepathyQt/AvatarData>
@@ -45,7 +42,6 @@ LogManager::LogManager(QObject *parent)
: QObject(parent),
m_fetchAmount(10)
{
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
Tpl::init();
m_logManager = Tpl::LogManager::instance();
@@ -53,10 +49,6 @@ LogManager::LogManager(QObject *parent)
qWarning() << "LogManager not found";
Q_ASSERT(false);
}
-
-#else
- kWarning() << "text-ui was built without log support";
-#endif
}
LogManager::~LogManager()
@@ -66,7 +58,6 @@ LogManager::~LogManager()
bool LogManager::exists() const
{
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
if (!m_account.isNull() && !m_textChannel.isNull() && m_textChannel->targetHandleType() == Tp::HandleTypeContact) {
Tpl::EntityPtr contactEntity = Tpl::Entity::create(m_textChannel->targetContact()->id().toLatin1().data(),
Tpl::EntityTypeContact,
@@ -77,9 +68,6 @@ bool LogManager::exists() const
} else {
return false;
}
-#else
- return false;
-#endif
}
void LogManager::setTextChannel(const Tp::AccountPtr &account, const Tp::TextChannelPtr &textChannel)
@@ -96,7 +84,6 @@ void LogManager::setFetchAmount(int n)
void LogManager::fetchLast()
{
kDebug();
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
if (!m_account.isNull() && !m_textChannel.isNull() && m_textChannel->targetHandleType() == Tp::HandleTypeContact) {
Tpl::EntityPtr contactEntity = Tpl::Entity::create(m_textChannel->targetContact()->id().toLatin1().data(),
Tpl::EntityTypeContact,
@@ -107,13 +94,12 @@ void LogManager::fetchLast()
connect(dates, SIGNAL(finished(Tpl::PendingOperation*)), SLOT(onDatesFinished(Tpl::PendingOperation*)));
return;
}
-#endif
+
//in all other cases finish immediately.
QList<AdiumThemeContentInfo> messages;
Q_EMIT fetched(messages);
}
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
void LogManager::onDatesFinished(Tpl::PendingOperation *po)
{
Tpl::PendingDates *pd = (Tpl::PendingDates*) po;
@@ -206,4 +192,3 @@ void LogManager::onEventsFinished(Tpl::PendingOperation *po)
kDebug() << "emit all messages" << messages.count();
Q_EMIT fetched(messages);
}
-#endif
diff --git a/lib/logmanager.h b/lib/logmanager.h
index 83bd5e3..9b1d010 100644
--- a/lib/logmanager.h
+++ b/lib/logmanager.h
@@ -22,10 +22,8 @@
#include "adium-theme-content-info.h"
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
#include <TelepathyLoggerQt4/LogManager>
#include <TelepathyLoggerQt4/Entity>
-#endif
#include <TelepathyQt/Types>
#include <TelepathyQt/Account>
@@ -54,20 +52,15 @@ public:
Q_SIGNALS:
void fetched(const QList<AdiumThemeContentInfo> &messages);
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
private Q_SLOTS:
void onDatesFinished(Tpl::PendingOperation *po);
void onEventsFinished(Tpl::PendingOperation *po);
-#endif
private:
Tp::AccountPtr m_account;
Tp::TextChannelPtr m_textChannel;
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
Tpl::EntityPtr m_contactEntity;
Tpl::LogManagerPtr m_logManager;
-#endif
-
int m_fetchAmount;
};
diff --git a/lib/message.cpp b/lib/message.cpp
index 451143c..aa7de9d 100644
--- a/lib/message.cpp
+++ b/lib/message.cpp
@@ -28,7 +28,6 @@ Message::Message(const Tp::Message &original) :
setMainMessagePart(original.text());
}
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
Message::Message(const Tpl::TextEventPtr &original) :
m_sentTime(original->timestamp()),
m_token(original->messageToken()),
@@ -36,7 +35,6 @@ Message::Message(const Tpl::TextEventPtr &original) :
{
setMainMessagePart(original->message());
}
-#endif
QString Message::mainMessagePart() const
{
diff --git a/lib/message.h b/lib/message.h
index c420f5d..1928fcd 100644
--- a/lib/message.h
+++ b/lib/message.h
@@ -22,10 +22,8 @@
#include <TelepathyQt/Message>
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
#include <TelepathyLoggerQt4/Types>
#include <TelepathyLoggerQt4/TextEvent>
-#endif
#include <ktpchat_export.h>
@@ -48,10 +46,7 @@ class KDE_TELEPATHY_CHAT_EXPORT Message {
public:
Message(const Tp::Message& original);
-
-#ifdef TELEPATHY_LOGGER_QT4_FOUND
Message(const Tpl::TextEventPtr &original);
-#endif
/*! rief The body of the message
*
eturn the contents of the body of the message, as HTML
diff --git a/logviewer/CMakeLists.txt b/logviewer/CMakeLists.txt
index 30d08ab..a975fa0 100644
--- a/logviewer/CMakeLists.txt
+++ b/logviewer/CMakeLists.txt
@@ -1,10 +1,4 @@
-#Only do anything with this app if the logger is available.
-if(TELEPATHY_LOGGER_QT4_FOUND)
- add_definitions( -DTELEPATHY_LOGGER_QT4_FOUND )
-
-include_directories(${CMAKE_SOURCE_DIR}/lib
- ${TELEPATHY_LOGGER_QT4_INCLUDE_DIRS}
- )
+include_directories(${CMAKE_SOURCE_DIR}/lib)
set(ktp-log-viewer_SRCS
main.cpp
@@ -34,6 +28,3 @@ target_link_libraries(ktp-log-viewer
install(TARGETS ktp-log-viewer DESTINATION ${BIN_INSTALL_DIR})
install(FILES ktp-log-viewer.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
-
-
-endif()
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list