Skip to content

Commit

Permalink
Version 0.1.2
Browse files Browse the repository at this point in the history
 - Found one other source of crashing at startup. If the task feed file does not have a dash in its title, the omit function fails. Fixed it by making the dash conditional.
  • Loading branch information
tina-nova committed Feb 20, 2021
1 parent f786625 commit be71b2b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions TFV_Classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ class tab
void SetTabName(QString newFile)
{
string newTabName = newFile.toUtf8().constData();
string omitString = "Task Feed - ";
string omitString = "Task Feed ";
string omitEnd = ".txt";
string dash = "- ";
tabName = newTabName.erase(newTabName.find(omitString),omitString.length());
tabName = tabName.erase(newTabName.find(omitEnd),omitEnd.length());
if (tabName.find(dash) != string::npos) tabName = tabName.erase(tabName.find(dash),dash.length());
tabName = tabName.erase(tabName.find(omitEnd),omitEnd.length());
}

// vector containing all items
Expand Down
2 changes: 2 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ int main(int argc, char *argv[])
QStringList taskFeedFiles;



if (argc == 2)
{
workingDirectory = argv[1];
cout << "Custom directory provided. New working directory is " << argv[1] << endl;
}


// Step1. scan all the subdirectories to populate the tabs and the items within each tab
taskFeedFileToProcess = PopulateTables(workingDirectory);

Expand Down
1 change: 0 additions & 1 deletion tfv.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ HEADERS +=\
TFV_PopulatingFunctions.h \
alphanum.hpp \
MainClass.h \
#miscFunctions.h


FORMS += \
Expand Down
2 changes: 1 addition & 1 deletion tfv.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.14.0, 2021-02-16T14:51:13. -->
<!-- Written by QtCreator 4.14.0, 2021-02-18T11:53:17. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down

0 comments on commit be71b2b

Please sign in to comment.