Switch from printf to cout

This commit is contained in:
Jaidyn Ann 2021-02-18 23:31:52 -06:00
parent 6682517fc0
commit e9ba66729e
5 changed files with 16 additions and 12 deletions

View File

@ -7,6 +7,8 @@
#include <tinyxml2.h>
#include <iostream>
#include "App.h"
#include "Entry.h"
#include "Util.h"
@ -65,8 +67,8 @@ AtomFeed::RootParse(tinyxml2::XMLElement* xfeed)
if (!set && xentry)
set = SetDate(xentry->FirstChildElement("published"));
printf("Channel '%s' at '%s':\n", title.String(),
xmlUrl.UrlString().String());
std::cout << "Channel '" << title << "' at '" << xmlUrl.UrlString()
<< "':\n";
}
@ -117,7 +119,7 @@ AtomFeed::ParseEntries(tinyxml2::XMLElement* xfeed)
int entryCount = xmlCountSiblings(xentry, "entry");
entries = BList(entryCount);
printf("\t-%i entries-\n", entryCount);
std::cout << "\t-" << entryCount << "-\n";
while (xentry) {
EntryParse(xentry);

View File

@ -9,7 +9,7 @@
#include <Message.h>
#include <Notification.h>
#include <cstdio>
#include <iostream>
#include "App.h"
#include "AtomFeed.h"
@ -121,8 +121,8 @@ FeedController::_DownloadLoop(void* ignored)
Feed* feedBuffer = new Feed();
while (receive_data(&sender, (void*)feedBuffer, sizeof(Feed)) != 0) {
printf( "Downloading feed from %s...\n",
feedBuffer->GetXmlUrl().UrlString().String());
std::cout << "Downloading feed from "
<< feedBuffer->GetXmlUrl().UrlString() << "\n";
BMessage* downloadInit = new BMessage(kDownloadStart);
downloadInit->AddString("feed", feedBuffer->GetTitle());

View File

@ -93,7 +93,7 @@ FeedsView::_InitInterface()
_PopulateFeedList();
fProgressLabel = new BStringView("progressLabel", "Progress…");
fProgressLabel = new BStringView("progressLabel", "");
// Add, Remove, Edit
fAddButton = new BButton("addFeed", "+", new BMessage(kFeedsAddButton));

View File

@ -13,7 +13,7 @@
#include <String.h>
#include <TabView.h>
#include <cstdio>
#include <iostream>
#include "App.h"
#include "EntriesView.h"
@ -123,7 +123,7 @@ MainWindow::_UpdateProgress(int32 max, int32 current)
fStatusBar->SetMaxValue(max);
fStatusBar->SetTo(prog);
printf("%i / %i\n", prog, max);
// std::cout << prog << "/" << max << std::endl;
}

View File

@ -5,6 +5,8 @@
#include "RssFeed.h"
#include <iostream>
#include "App.h"
#include "Entry.h"
#include "Util.h"
@ -49,8 +51,8 @@ RssFeed::RootParse(tinyxml2::XMLElement* xchan)
SetTitle(xchan->FirstChildElement("title"));
SetDate(xchan->FirstChildElement("lastBuildDate"));
printf("Channel '%s' at '%s':\n", title.String(),
xmlUrl.UrlString().String());
std::cout << "Channel '" << title.String() << "' at '" << xmlUrl.UrlString()
<< ":\n";
}
@ -84,7 +86,7 @@ RssFeed::ParseEntries(tinyxml2::XMLElement* xchan)
int entryCount = xmlCountSiblings(xitem, "item");
entries = BList(entryCount);
printf("\t-%i entries-\n", entryCount);
std::cout << "\t-" << entryCount << " entries-\n";
while (xitem) {
EntryParse(xitem);