Project

General

Profile

Bug #3448

typo in Blogs example handlePathChange

Added by Anonymous about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/09/2014
Due date:
% Done:

0%

Estimated time:

Description

@void refresh() {

handlePathChange(wApp->internalPath());

}

void handlePathChange(const std::string& path) {

WApplication *app = wApp;

if (app->internalPathMatches(basePath_)) {

dbo::Transaction t(session_);

std::string path = app->internalPathNextPart(basePath_);

@

in https://github.com/kdeforche/wt/blob/master/examples/blog/view/BlogView.C

path is passed as an argument to the function but then redeclared.

#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to Resolved
  • Assignee set to Koen Deforche
  • Target version set to 3.3.4

Hey,

The code is actually correct but misleading: the actual path passed isn't used. Instead, the current internal path is queried piece-wise using calls to internalPathNextPart().

I've updated the code to make it more clear.

Rgards,

koen

#2

Updated by Koen Deforche over 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF