Преглед изворни кода

Removed unused Log4Qt related code.

Sascha Zelzer пре 10 година
родитељ
комит
1ddf620de9

+ 0 - 4
CMake/CTestCustom.cmake.in

@@ -42,10 +42,6 @@ SET(CTEST_CUSTOM_WARNING_EXCEPTION
   "[Kk][Ww][Ss]tyle.*kws.*h"
   "[Kk][Ww][Ss]tyle.*metaCommand.*cxx"
 
-  # Log4Qt suppressions
-  "[Ll]og4[Qq]t.*src.*log4qt"
-  "logobjectptr.*obj : warning"
-
   # vtk suppressions
   "vtkfreetype"
   "Utilities.vtktiff"

+ 0 - 4
CMake/ctkBlockCheckDependencies.cmake

@@ -63,10 +63,6 @@ set(${ITK_enabling_variable}_LIBRARY_DIRS ITK_LIBRARY_DIRS)
 set(${ITK_enabling_variable}_INCLUDE_DIRS ITK_INCLUDE_DIRS)
 set(${ITK_enabling_variable}_FIND_PACKAGE_CMD ITK)
 
-set(Log4Qt_enabling_variable Log4Qt_LIBRARIES)
-set(${Log4Qt_enabling_variable}_INCLUDE_DIRS Log4Qt_INCLUDE_DIRS)
-set(${Log4Qt_enabling_variable}_FIND_PACKAGE_CMD Log4Qt)
-
 set(OpenIGTLink_enabling_variable OpenIGTLink_LIBRARIES)
 set(${OpenIGTLink_enabling_variable}_LIBRARY_DIRS OpenIGTLink_LIBRARY_DIRS)
 set(${OpenIGTLink_enabling_variable}_INCLUDE_DIRS OpenIGTLink_INCLUDE_DIRS)

+ 0 - 65
CMakeExternals/Log4Qt.cmake

@@ -1,65 +0,0 @@
-#
-# Log4Qt
-#
-
-set(proj Log4Qt)
-
-set(${proj}_DEPENDENCIES "")
-
-ExternalProject_Include_Dependencies(${proj}
-  PROJECT_VAR proj
-  DEPENDS_VAR ${proj}_DEPENDENCIES
-  EP_ARGS_VAR ${proj}_EXTERNAL_PROJECT_ARGS
-  USE_SYSTEM_VAR ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj}
-  )
-
-if(${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  message(FATAL_ERROR "Enabling ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj} is not supported !")
-endif()
-
-# Sanity checks
-if(DEFINED Log4Qt_DIR AND NOT EXISTS ${Log4Qt_DIR})
-  message(FATAL_ERROR "Log4Qt_DIR variable is defined but corresponds to non-existing directory")
-endif()
-
-if(NOT DEFINED Log4Qt_DIR)
-
-  set(revision_tag 8d3558b0f636cbf8ff83)
-  if(${proj}_REVISION_TAG)
-    set(revision_tag ${${proj}_REVISION_TAG})
-  endif()
-
-  set(location_args )
-  if(${proj}_URL)
-    set(location_args URL ${${proj}_URL})
-  elseif(${proj}_GIT_REPOSITORY)
-    set(location_args GIT_REPOSITORY ${${proj}_GIT_REPOSITORY}
-                      GIT_TAG ${revision_tag})
-  else()
-    set(location_args GIT_REPOSITORY "${git_protocol}://github.com/commontk/Log4Qt.git"
-                      GIT_TAG ${revision_tag})
-  endif()
-
-  ExternalProject_Add(${proj}
-    ${${proj}_EXTERNAL_PROJECT_ARGS}
-    SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
-    BINARY_DIR ${proj}-build
-    PREFIX ${proj}${ep_suffix}
-    ${location_args}
-    INSTALL_COMMAND ""
-    CMAKE_CACHE_ARGS
-      ${ep_common_cache_args}
-      -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
-    DEPENDS
-      ${${proj}_DEPENDENCIES}
-    )
-  set(Log4Qt_DIR ${CMAKE_BINARY_DIR}/${proj}-build)
-
-else()
-  ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
-endif()
-
-mark_as_superbuild(
-  VARS Log4Qt_DIR:PATH
-  LABELS "FIND_PACKAGE"
-  )

+ 0 - 1
CMakeLists.txt

@@ -925,7 +925,6 @@ endif()
 # CTK dependencies - Projects should be TOPOLOGICALLY ordered
 #-----------------------------------------------------------------------------
 set(CTK_DEPENDENCIES
-  Log4Qt
   VTK
   PythonQt
   DCMTK

+ 0 - 123
Libs/Core/ctkLogger.cpp

@@ -24,16 +24,10 @@
 // CTK includes
 #include <ctkLogger.h>
 
-// Log4Qt includes
-//#include <log4qt/log4qt.h>
-//#include <log4qt/logger.h>
-//#include <log4qt/basicconfigurator.h>
-
 //-----------------------------------------------------------------------------
 class ctkLoggerPrivate
 {
 public:
-  //Log4Qt::Logger *Logger;
 };
 
 //-----------------------------------------------------------------------------
@@ -42,8 +36,6 @@ ctkLogger::ctkLogger(QString name, QObject* _parent)
   , d_ptr(new ctkLoggerPrivate)
 {
   Q_UNUSED(name);
-  //Q_D(ctkLogger);
-  //d->Logger = Log4Qt::Logger::logger( name.toStdString().c_str());
 }
 
 //-----------------------------------------------------------------------------
@@ -51,154 +43,39 @@ ctkLogger::~ctkLogger()
 {
 }
 
-////-----------------------------------------------------------------------------
-//void ctkLogger::configure()
-//{
-//  //Log4Qt::BasicConfigurator::configure();
-//}
-
 //-----------------------------------------------------------------------------
 void ctkLogger::debug(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->debug(s);
   qDebug().nospace() << qPrintable(s);
 }
 
 //-----------------------------------------------------------------------------
 void ctkLogger::info(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->info(s);
   qDebug().nospace() << qPrintable(s);
 }
 
 //-----------------------------------------------------------------------------
 void ctkLogger::trace(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->trace(s);
   qDebug().nospace() << qPrintable(s);
 }
 
 //-----------------------------------------------------------------------------
 void ctkLogger::warn(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->warn(s);
   qWarning().nospace() << qPrintable(s);
 }
 
 //-----------------------------------------------------------------------------
 void ctkLogger::error(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->error(s);
   qCritical().nospace() << qPrintable(s);
 }
 
 //-----------------------------------------------------------------------------
 void ctkLogger::fatal(const QString& s)
 {
-  //Q_D(ctkLogger);
-  //d->Logger->fatal(s);
   qCritical().nospace() << qPrintable(s);
 }
 
-////-----------------------------------------------------------------------------
-//void ctkLogger::setOff()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::OFF_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setDebug()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::DEBUG_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setInfo()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::INFO_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setTrace()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::TRACE_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setWarn()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::WARN_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setError()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::ERROR_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//void ctkLogger::setFatal()
-//{
-//  //Q_D(ctkLogger);
-//  //d->Logger->setLevel(Log4Qt::Level(Log4Qt::Level::FATAL_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isOffEnabled()
-//{
-//  //Q_D(ctkLogger); //Not sure
-//  //return d->Logger->isEnabledFor(Log4Qt::Level(Log4Qt::Level::OFF_INT));
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isDebugEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isDebugEnabled();
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isInfoEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isInfoEnabled();
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isTraceEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isTraceEnabled();
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isWarnEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isWarnEnabled();
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isErrorEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isErrorEnabled();
-//}
-
-////-----------------------------------------------------------------------------
-//bool ctkLogger::isFatalEnabled()
-//{
-//  //Q_D(ctkLogger);
-//  //return d->Logger->isFatalEnabled();
-//}

+ 0 - 33
Plugins/org.commontk.log4qt/CMakeLists.txt

@@ -1,33 +0,0 @@
-project(org_commontk_log4qt)
-
-set(PLUGIN_export_directive "org_commontk_log4qt_EXPORT")
-
-set(PLUGIN_SRCS
-  ctkLog4QtPlugin.cpp
-)
-
-# Files which should be processed by Qts moc
-set(PLUGIN_MOC_SRCS
-  ctkLog4QtPlugin_p.h
-)
-
-# Qt Designer files which should be processed by Qts uic
-set(PLUGIN_UI_FORMS
-)
-
-# QRC Files which should be compiled into the plugin
-set(PLUGIN_resources
-)
-
-#Compute the plugin dependencies
-ctkFunctionGetTargetLibraries(PLUGIN_target_libraries)
-
-ctkMacroBuildPlugin(
-  NAME ${PROJECT_NAME}
-  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
-  SRCS ${PLUGIN_SRCS}
-  MOC_SRCS ${PLUGIN_MOC_SRCS}
-  UI_FORMS ${PLUGIN_UI_FORMS}
-  RESOURCES ${PLUGIN_resources}
-  TARGET_LIBRARIES ${PLUGIN_target_libraries}
-)

+ 0 - 61
Plugins/org.commontk.log4qt/ctkLog4QtPlugin.cpp

@@ -1,61 +0,0 @@
-/*=============================================================================
-
-  Library: CTK
-
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-=============================================================================*/
-
-
-#include "ctkLog4QtPlugin_p.h"
-#include <QtPlugin>
-
-ctkLog4QtPlugin* ctkLog4QtPlugin::instance = 0;
-
-ctkLog4QtPlugin::ctkLog4QtPlugin()
-  : context(0)
-{
-}
-
-ctkLog4QtPlugin::~ctkLog4QtPlugin()
-{
-  
-}
-
-void ctkLog4QtPlugin::start(ctkPluginContext* context)
-{
-  instance = this;
-  this->context = context;
-}
-
-void ctkLog4QtPlugin::stop(ctkPluginContext* context)
-{
-  Q_UNUSED(context)
-}
-
-ctkLog4QtPlugin* ctkLog4QtPlugin::getInstance()
-{
-  return instance;
-}
-
-ctkPluginContext* ctkLog4QtPlugin::getPluginContext() const
-{
-  return context;
-}
-
-Q_EXPORT_PLUGIN2(org_commontk_log4qt, ctkLog4QtPlugin)
-
-

+ 0 - 55
Plugins/org.commontk.log4qt/ctkLog4QtPlugin_p.h

@@ -1,55 +0,0 @@
-/*=============================================================================
-
-  Library: CTK
-
-  Copyright (c) German Cancer Research Center,
-    Division of Medical and Biological Informatics
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-=============================================================================*/
-
-
-#ifndef CTKLOG4QTPLUGIN_P_H
-#define CTKLOG4QTPLUGIN_P_H
-
-#include <ctkPluginActivator.h>
-
-class ctkLog4QtPlugin :
-  public QObject, public ctkPluginActivator
-{
-  Q_OBJECT
-  Q_INTERFACES(ctkPluginActivator)
-
-public:
-
-  ctkLog4QtPlugin();
-  ~ctkLog4QtPlugin();
-
-  void start(ctkPluginContext* context);
-  void stop(ctkPluginContext* context);
-
-  static ctkLog4QtPlugin* getInstance();
-
-  ctkPluginContext* getPluginContext() const;
-
-
-private:
-
-  static ctkLog4QtPlugin* instance;
-  ctkPluginContext* context;
-
-
-}; // ctkLog4QtPlugin
-
-#endif // CTKLOG4QTPLUGIN_P_H

+ 0 - 1
Plugins/org.commontk.log4qt/manifest_headers.cmake

@@ -1 +0,0 @@
-set(Plugin-Name "Log4Qt Service")

+ 0 - 10
Plugins/org.commontk.log4qt/target_libraries.cmake

@@ -1,10 +0,0 @@
-# See CMake/ctkFunctionGetTargetLibraries.cmake
-#
-# This file should list the libraries required to build the current CTK plugin.
-# For specifying required plugins, see the manifest_headers.cmake file.
-#
-
-set(target_libraries
-  CTKPluginFramework
-  Log4Qt_LIBRARIES
-)