Project

General

Profile

Actions

Bug #3448

closed

typo in Blogs example handlePathChange

Added by Anonymous almost 10 years ago. Updated about 9 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.

Actions #1

Updated by Koen Deforche about 9 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

Actions #2

Updated by Koen Deforche about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF