From 6e1e709564b7e9a158212170322f1c9396dfbea7 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 13 Apr 2011 23:18:01 -0400 Subject: [PATCH] Code Cleanup - Removed obsolete Keymap object. --- src/CMakeLists.txt | 26 +++++++++--------- src/Context.cpp | 2 -- src/Context.h | 2 -- src/Keymap.cpp | 66 ---------------------------------------------- src/Keymap.h | 51 ----------------------------------- 5 files changed, 13 insertions(+), 134 deletions(-) delete mode 100644 src/Keymap.cpp delete mode 100644 src/Keymap.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf745560b..e496d09c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,19 +5,19 @@ set (task_SRCS API.cpp API.h Att.cpp Att.h Cmd.cpp Cmd.h Color.cpp Color.h Config.cpp Config.h Context.cpp Context.h Date.cpp Date.h Directory.cpp Directory.h DOM.cpp DOM.h Duration.cpp Duration.h File.cpp File.h Filter.cpp Filter.h feedback.cpp Grid.cpp Grid.h - Hooks.cpp Hooks.h JSON.cpp JSON.h Keymap.cpp Keymap.h - Location.cpp Location.h Nibbler.cpp Nibbler.h Path.cpp Path.h - Permission.cpp Permission.h Record.cpp Record.h Rectangle.cpp - Rectangle.h Sequence.cpp Sequence.h Subst.cpp Subst.h TDB.cpp - TDB.h Table.cpp TDB2.cpp TDB2.h Table.h Task.cpp Task.h - Taskmod.cpp Taskmod.h Thread.cpp Thread.h Timer.cpp Timer.h - Transport.cpp Transport.h TransportSSH.cpp TransportSSH.h - TransportRSYNC.cpp TransportRSYNC.h TransportCurl.cpp - TransportCurl.h Tree.cpp Tree.h burndown.cpp command.cpp - custom.cpp dependency.cpp diag.cpp edit.cpp export.cpp - history.cpp i18n.h import.cpp interactive.cpp recur.cpp - report.cpp rules.cpp rx.cpp rx.h text.cpp text.h utf8.cpp utf8.h - util.cpp util.h Uri.cpp Uri.h Variant.cpp Variant.h) + Hooks.cpp Hooks.h JSON.cpp JSON.h Location.cpp Location.h + Nibbler.cpp Nibbler.h Path.cpp Path.h Permission.cpp Permission.h + Record.cpp Record.h Rectangle.cpp Rectangle.h Sequence.cpp + Sequence.h Subst.cpp Subst.h TDB.cpp TDB.h Table.cpp TDB2.cpp + TDB2.h Table.h Task.cpp Task.h Taskmod.cpp Taskmod.h Thread.cpp + Thread.h Timer.cpp Timer.h Transport.cpp Transport.h + TransportSSH.cpp TransportSSH.h TransportRSYNC.cpp + TransportRSYNC.h TransportCurl.cpp TransportCurl.h Tree.cpp + Tree.h burndown.cpp command.cpp custom.cpp dependency.cpp + diag.cpp edit.cpp export.cpp history.cpp i18n.h import.cpp + interactive.cpp recur.cpp report.cpp rules.cpp rx.cpp rx.h + text.cpp text.h utf8.cpp utf8.h util.cpp util.h Uri.cpp Uri.h + Variant.cpp Variant.h) add_library (task STATIC ${task_SRCS}) add_executable (task_executable main.cpp) diff --git a/src/Context.cpp b/src/Context.cpp index 5a7292ebb..df313d553 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -46,7 +46,6 @@ Context::Context () : config () , filter () -, keymap () , sequence () , subst () , task () @@ -825,7 +824,6 @@ void Context::clear () { // Config config; filter.clear (); -// Keymap keymap; sequence.clear (); subst.clear (); // task.clear (); diff --git a/src/Context.h b/src/Context.h index ab49b729b..04d73ed8c 100644 --- a/src/Context.h +++ b/src/Context.h @@ -28,7 +28,6 @@ #define INCLUDED_CONTEXT #include "Filter.h" -#include "Keymap.h" #include "Config.h" #include "Sequence.h" #include "Subst.h" @@ -80,7 +79,6 @@ private: public: Config config; Filter filter; - Keymap keymap; Sequence sequence; Subst subst; Task task; diff --git a/src/Keymap.cpp b/src/Keymap.cpp deleted file mode 100644 index f2acdd8f5..000000000 --- a/src/Keymap.cpp +++ /dev/null @@ -1,66 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// taskwarrior - a command line task list manager. -// -// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free Software -// Foundation; either version 2 of the License, or (at your option) any later -// version. -// -// This program is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -// details. -// -// You should have received a copy of the GNU General Public License along with -// this program; if not, write to the -// -// Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, -// Boston, MA -// 02110-1301 -// USA -// -//////////////////////////////////////////////////////////////////////////////// - -#include -#include "Keymap.h" - -//////////////////////////////////////////////////////////////////////////////// -Keymap::Keymap () -{ -} - -//////////////////////////////////////////////////////////////////////////////// -Keymap::Keymap (const Keymap& other) -{ - throw std::string ("unimplemented Keymap::Keymap"); -// mOne = other.mOne; -} - -//////////////////////////////////////////////////////////////////////////////// -Keymap& Keymap::operator= (const Keymap& other) -{ - throw std::string ("unimplemented Keymap::operator="); - if (this != &other) - { -// mOne = other.mOne; - } - - return *this; -} - -//////////////////////////////////////////////////////////////////////////////// -Keymap::~Keymap () -{ -} - -//////////////////////////////////////////////////////////////////////////////// -void Keymap::load (const std::string& file) -{ - throw std::string ("unimplemented Keymap::load"); -} - -//////////////////////////////////////////////////////////////////////////////// diff --git a/src/Keymap.h b/src/Keymap.h deleted file mode 100644 index b97eaa6a8..000000000 --- a/src/Keymap.h +++ /dev/null @@ -1,51 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// taskwarrior - a command line task list manager. -// -// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez. -// All rights reserved. -// -// This program is free software; you can redistribute it and/or modify it under -// the terms of the GNU General Public License as published by the Free Software -// Foundation; either version 2 of the License, or (at your option) any later -// version. -// -// This program is distributed in the hope that it will be useful, but WITHOUT -// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -// details. -// -// You should have received a copy of the GNU General Public License along with -// this program; if not, write to the -// -// Free Software Foundation, Inc., -// 51 Franklin Street, Fifth Floor, -// Boston, MA -// 02110-1301 -// USA -// -//////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDED_KEYMAP -#define INCLUDED_KEYMAP - -#include - -class Keymap -{ -public: - Keymap (); // Default constructor - Keymap (const Keymap&); // Copy constructor - Keymap& operator= (const Keymap&); // Assignment operator - ~Keymap (); // Destructor - - void load (const std::string&); // Load the map file -/* - real (); // Convert soft to real - soft (); // Convert real to soft -*/ - -private: - // TODO Structure for mapping strings to keys. -}; - -#endif -////////////////////////////////////////////////////////////////////////////////