qxtwebslotservice: Allow hyphenated paths

Hyphens are now substituted with underscore characters so that
they can be dispatched.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
This commit is contained in:
Frank Hunleth 2013-05-02 13:38:56 -04:00
parent 7c83e1694e
commit b2dd5c536f

View File

@ -107,7 +107,9 @@ void QxtWebSlotService::pageRequestedEvent(QxtWebRequestEvent* event)
QByteArray action = "index";
if (args.count())
{
action = args.at(0).toUtf8();
// Substitute hyphens for underscores to be able
// to dispatch hyphenated paths.
action = args.at(0).toUtf8().replace('-', '_');
if (action.trimmed().isEmpty())
action = "index";
args.removeFirst();