libhsared: migrating from local to libshared

This commit is contained in:
Paul Beckingham 2016-12-06 07:20:45 -05:00
parent 0e56abd0f9
commit 8a43f4902d
88 changed files with 185 additions and 510 deletions

View file

@ -27,9 +27,9 @@
#include <cmake.h>
#include <CmdAdd.h>
#include <Context.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <i18n.h>
#include <util.h>
#include <main.h>
extern Context context;

View file

@ -30,8 +30,8 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <util.h>
#include <shared.h>
#include <format.h>
#include <i18n.h>
extern Context context;

View file

@ -29,8 +29,8 @@
#include <iostream>
#include <Context.h>
#include <Filter.h>
#include <util.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <i18n.h>
#include <main.h>

View file

@ -33,8 +33,9 @@
#include <ViewText.h>
#include <Lexer.h>
#include <i18n.h>
#include <shared.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <utf8.h>
#include <main.h>

View file

@ -31,7 +31,8 @@
#include <Context.h>
#include <main.h>
#include <Color.h>
#include <text.h>
#include <format.h>
#include <shared.h>
#include <i18n.h>
extern Context context;

View file

@ -30,6 +30,7 @@
#include <Context.h>
#include <ViewText.h>
#include <Color.h>
#include <shared.h>
#include <text.h>
#include <i18n.h>
#include <main.h>

View file

@ -31,8 +31,8 @@
#include <Context.h>
#include <JSON.h>
#include <i18n.h>
#include <text.h>
#include <util.h>
#include <shared.h>
#include <format.h>
extern Context context;

View file

@ -33,7 +33,8 @@
#include <sstream>
#include <algorithm>
#include <i18n.h>
#include <util.h>
#include <format.h>
#include <shared.h>
#include <text.h>
extern Context context;

View file

@ -28,7 +28,7 @@
#include <CmdCount.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
////////////////////////////////////////////////////////////////////////////////

View file

@ -36,6 +36,7 @@
#include <Lexer.h>
#include <ViewTask.h>
#include <i18n.h>
#include <format.h>
#include <text.h>
#include <main.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <util.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
#include <main.h>

View file

@ -29,7 +29,8 @@
#include <iostream>
#include <Context.h>
#include <Filter.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <util.h>
#include <i18n.h>
#include <main.h>

View file

@ -34,7 +34,7 @@
#include <RX.h>
#include <Context.h>
#include <i18n.h>
#include <text.h>
#include <format.h>
#include <util.h>
#ifdef HAVE_COMMIT
#include <commit.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <util.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
#include <main.h>

View file

@ -29,7 +29,7 @@
#include <iostream>
#include <Context.h>
#include <Filter.h>
#include <text.h>
#include <format.h>
#include <util.h>
#include <i18n.h>
#include <main.h>

View file

@ -39,7 +39,8 @@
#include <Filter.h>
#include <Pig.h>
#include <i18n.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <util.h>
#include <i18n.h>
#include <main.h>
@ -230,8 +231,7 @@ std::string CmdEdit::formatTask (Task task, const std::string& dateformat)
std::vector <std::string> tags;
task.getTags (tags);
std::string allTags;
join (allTags, " ", tags);
auto allTags = join (" ", tags);
if (verbose)
before << "# " << STRING_EDIT_TAG_SEP << '\n';
@ -360,8 +360,7 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
// tags
value = findValue (after, "\n Tags:");
std::vector <std::string> tags;
split (tags, value, ' ');
auto tags = split (value, ' ');
task.remove ("tags");
task.addTags (tags);
@ -676,8 +675,7 @@ void CmdEdit::parseTask (Task& task, const std::string& after, const std::string
// Dependencies
value = findValue (after, "\n Dependencies:");
std::vector <std::string> dependencies;
split (dependencies, value, ",");
auto dependencies = split (value, ',');
task.remove ("depends");
for (auto& dep : dependencies)

View file

@ -30,7 +30,8 @@
#include <Context.h>
#include <DOM.h>
#include <main.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <i18n.h>
extern Context context;
@ -90,7 +91,7 @@ int CmdGet::execute (std::string& output)
if (results.size () == 0)
throw std::string (STRING_CMD_GET_NO_DOM);
join (output, " ", results);
output = join (" ", results);
output += '\n';
return 0;
}

View file

@ -30,7 +30,8 @@
#include <ViewText.h>
#include <Context.h>
#include <i18n.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <util.h>
extern Context context;

View file

@ -31,6 +31,7 @@
#include <Filter.h>
#include <ViewText.h>
#include <main.h>
#include <format.h>
#include <text.h>
#include <i18n.h>
#include <ISO8601.h>

View file

@ -31,7 +31,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <shared.h>
#include <i18n.h>
extern Context context;
@ -163,8 +163,7 @@ int CmdCompletionIds::execute (std::string& output)
ids.push_back (task.id);
std::sort (ids.begin (), ids.end ());
join (output, "\n", ids);
output += '\n';
output = join ("\n", ids) + '\n';
context.headers.clear ();
return 0;
@ -240,8 +239,7 @@ int CmdUUIDs::execute (std::string& output)
uuids.push_back (task.get ("uuid"));
std::sort (uuids.begin (), uuids.end ());
join (output, " ", uuids);
output += '\n';
output = join (" ", uuids) + '\n';
context.headers.clear ();
return 0;
@ -277,8 +275,7 @@ int CmdCompletionUuids::execute (std::string& output)
uuids.push_back (task.get ("uuid"));
std::sort (uuids.begin (), uuids.end ());
join (output, "\n", uuids);
output += '\n';
output = join ("\n", uuids) + '\n';
context.headers.clear ();
return 0;

View file

@ -31,6 +31,7 @@
#include <sstream>
#include <Context.h>
#include <Filter.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <i18n.h>

View file

@ -33,6 +33,8 @@
#include <Filter.h>
#include <ISO8601.h>
#include <main.h>
#include <shared.h>
#include <format.h>
#include <text.h>
#include <i18n.h>

View file

@ -27,7 +27,7 @@
#include <cmake.h>
#include <CmdLog.h>
#include <Context.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
#include <util.h>
#include <main.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <util.h>
#include <i18n.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <util.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
#include <main.h>

View file

@ -31,6 +31,7 @@
#include <Context.h>
#include <Filter.h>
#include <ViewText.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <i18n.h>

View file

@ -30,7 +30,7 @@
#include <Filter.h>
#include <i18n.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <util.h>
extern Context context;

View file

@ -30,6 +30,7 @@
#include <algorithm>
#include <Context.h>
#include <ViewText.h>
#include <format.h>
#include <text.h>
#include <i18n.h>

View file

@ -29,7 +29,7 @@
#include <vector>
#include <sstream>
#include <algorithm>
#include <text.h>
#include <format.h>
#include <i18n.h>
#include <main.h>
#include <Context.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <util.h>
#include <i18n.h>

View file

@ -34,6 +34,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <i18n.h>

View file

@ -30,7 +30,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
extern Context context;

View file

@ -33,6 +33,7 @@
#include <Filter.h>
#include <ViewText.h>
#include <ISO8601.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <i18n.h>

View file

@ -32,7 +32,8 @@
#include <Context.h>
#include <Filter.h>
#include <Color.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <util.h>
#include <i18n.h>
@ -91,8 +92,7 @@ int CmdSync::execute (std::string& output)
if (credentials_string == "")
throw std::string (STRING_CMD_SYNC_BAD_CRED);
std::vector <std::string> credentials;
split (credentials, credentials_string, "/");
auto credentials = split (credentials_string, '/');
if (credentials.size () != 3)
throw std::string (STRING_CMD_SYNC_BAD_CRED);
@ -198,8 +198,7 @@ int CmdSync::execute (std::string& output)
int download_count = 0;
payload = response.getPayload ();
std::vector <std::string> lines;
split (lines, payload, '\n');
auto lines = split (payload, '\n');
// Load all tasks, but only if necessary. There is always a sync key in
// the payload, so if there are two or more lines, then we have merging

View file

@ -32,6 +32,7 @@
#include <Context.h>
#include <Filter.h>
#include <ViewText.h>
#include <format.h>
#include <text.h>
#include <i18n.h>

View file

@ -34,7 +34,7 @@
#include <ISO8601.h>
#include <main.h>
#include <i18n.h>
#include <text.h>
#include <format.h>
extern Context context;

View file

@ -32,6 +32,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <format.h>
#include <text.h>
#include <util.h>
#include <i18n.h>

View file

@ -32,7 +32,7 @@
#include <Context.h>
#include <Filter.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
extern Context context;

View file

@ -32,7 +32,7 @@
#include <Filter.h>
#include <Lexer.h>
#include <main.h>
#include <text.h>
#include <format.h>
#include <i18n.h>
extern Context context;

View file

@ -33,7 +33,7 @@
#ifdef HAVE_COMMIT
#include <commit.h>
#endif
#include <text.h>
#include <format.h>
#include <i18n.h>
extern Context context;

View file

@ -28,7 +28,8 @@
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <text.h>
#include <shared.h>
#include <format.h>
#include <util.h>
#include <i18n.h>
#include <Command.h>