[Merge] lp:~abreu-alexandre/webbrowser-app/fix-application-name-setup into lp:webbrowser-app

Olivier Tilloy olivier.tilloy at canonical.com
Fri May 6 16:47:48 UTC 2016


Review: Needs Fixing

Can you add a Q_ASSERT(!appId.isEmpty()) to the beginning of BrowserApplication::initialize()?
Passing an empty app id would lead to undefined behaviour I think.
That would also render the check for appIdParts.isEmpty() in SingleInstanceManager::getProfilePathFromAppId() useless.

In single-instance-manager.cpp, the additional include of <QDebug> is useless, it’s already included earlier on.
The additional include of <QtCore/QCoreApplication> also appears unused. Can you please remove it?

> https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1555542
Can you shorten that link to https://launchpad.net/bugs/1555542 ?

> appIdParts.mid(1, 1)[0]
Isn’t that equivalent to appIdParts[1] ?

> return profilePath
> + QDir::separator()
> + appDesktopName;
That could go on one single line.

It doesn’t look like getProfilePathFromAppId() needs to be a static member of SingleInstanceManager, it could simply be a function inside an unnamed namespace.

There’s a meaningless additional blank line in webbrowser-app.cpp, can it be reverted?

In tst_SingleInstanceManagerTests.cpp, the second parameter to run() should not be an empty string, this is unexpected. Can you use an non-empty string token?

Have you considered my suggestion of completely bailing out if no app id is explicitly set for the webapp container? I don’t think it makes sense to have apps that run in a "generic" container anyway, does it?
-- 
https://code.launchpad.net/~abreu-alexandre/webbrowser-app/fix-application-name-setup/+merge/293658
Your team Ubuntu Phablet Team is subscribed to branch lp:webbrowser-app.



More information about the Ubuntu-reviews mailing list