Merge lp://staging/~ted/ubuntu-app-launch/app-object into lp://staging/ubuntu-app-launch/16.04

Proposed by Ted Gould
Status: Superseded
Proposed branch: lp://staging/~ted/ubuntu-app-launch/app-object
Merge into: lp://staging/ubuntu-app-launch/16.04
Diff against target: 8585 lines (+7712/-235)
62 files modified
.bzrignore (+6/-0)
CMakeLists.txt (+4/-0)
_clang-format (+48/-0)
debian/changelog (+8/-0)
debian/control (+1/-0)
debian/libubuntu-app-launch2.shlibs (+1/-0)
debian/libubuntu-app-launch2.symbols (+0/-41)
debian/rules (+0/-3)
docs/Doxyfile (+2427/-0)
docs/Makefile (+216/-0)
docs/conf.py (+299/-0)
docs/index.rst (+20/-0)
docs/requirements.txt (+1/-0)
helpers-shared.c (+11/-2)
libubuntu-app-launch/CMakeLists.txt (+34/-0)
libubuntu-app-launch/appid.h (+83/-0)
libubuntu-app-launch/application-impl-base.cpp (+162/-0)
libubuntu-app-launch/application-impl-base.h (+52/-0)
libubuntu-app-launch/application-impl-click.cpp (+157/-0)
libubuntu-app-launch/application-impl-click.h (+56/-0)
libubuntu-app-launch/application-impl-legacy.cpp (+128/-0)
libubuntu-app-launch/application-impl-legacy.h (+57/-0)
libubuntu-app-launch/application-impl-libertine.cpp (+127/-0)
libubuntu-app-launch/application-impl-libertine.h (+56/-0)
libubuntu-app-launch/application-info-desktop.cpp (+202/-0)
libubuntu-app-launch/application-info-desktop.h (+87/-0)
libubuntu-app-launch/application.cpp (+225/-0)
libubuntu-app-launch/application.h (+150/-0)
libubuntu-app-launch/desktop-exec.c (+1/-1)
libubuntu-app-launch/glib-thread.cpp (+156/-0)
libubuntu-app-launch/glib-thread.h (+90/-0)
libubuntu-app-launch/helper-impl-click.cpp (+175/-0)
libubuntu-app-launch/helper-impl-click.h (+62/-0)
libubuntu-app-launch/helper.cpp (+36/-0)
libubuntu-app-launch/helper.h (+71/-0)
libubuntu-app-launch/libubuntu-app-launch.map (+17/-0)
libubuntu-app-launch/registry-impl.cpp (+185/-0)
libubuntu-app-launch/registry-impl.h (+69/-0)
libubuntu-app-launch/registry.cpp (+99/-0)
libubuntu-app-launch/registry.h (+91/-0)
libubuntu-app-launch/type-tagger.h (+37/-0)
libubuntu-app-launch/ubuntu-app-launch.c (+7/-7)
libubuntu-app-launch/ubuntu-app-launch.h (+12/-0)
tests/CMakeLists.txt (+20/-0)
tests/application-info-desktop.cpp (+148/-0)
tests/click-app-dir/application.desktop (+3/-1)
tests/exec-util-test.cc (+1/-1)
tests/helper-handshake-test.cc (+3/-0)
tests/helper-test.cc (+0/-2)
tests/libertine-data/libertine-container/container-name/rootfs/usr/share/applications/test.desktop (+1/-0)
tests/libual-cpp-test.cc (+1599/-0)
tests/libual-test.cc (+1/-2)
tests/mir-mock.cpp (+1/-1)
tools/CMakeLists.txt (+16/-7)
tools/ubuntu-app-list-pids.cpp (+44/-0)
tools/ubuntu-app-list.cpp (+11/-17)
tools/ubuntu-app-pid.cpp (+25/-19)
tools/ubuntu-app-stop.cpp (+21/-15)
tools/ubuntu-app-triplet.cpp (+26/-32)
tools/ubuntu-helper-list.cpp (+20/-31)
tools/ubuntu-helper-start.cpp (+21/-27)
tools/ubuntu-helper-stop.cpp (+25/-26)
To merge this branch: bzr merge lp://staging/~ted/ubuntu-app-launch/app-object
Reviewer Review Type Date Requested Status
Thomas Voß (community) Needs Fixing
Review via email: mp+281809@code.staging.launchpad.net

This proposal has been superseded by a proposal from 2016-04-18.

To post a comment you must log in.
193. By Ted Gould

Don't flush if we never got the bus

194. By Ted Gould

Getting our first test to be C++

195. By Ted Gould

Add URL handling into the helper code

196. By Ted Gould

Getting the log path test to work by supporting legacy appids and implementing log path support

197. By Ted Gould

Migrate the application PID tests

198. By Ted Gould

We's got ourselves some symbols

199. By Ted Gould

Cleaning up a few

200. By Ted Gould

AppID testing functions

201. By Ted Gould

AppID parsing tests

202. By Ted Gould

Test application listsf

203. By Ted Gould

Start and URL tests

204. By Ted Gould

A bunch of fun helper stuff

205. By Ted Gould

Check Mir session helpers

206. By Ted Gould

App info port

207. By Ted Gould

Adding license headers

208. By Ted Gould

Forgot one.

209. By Ted Gould

Formatting, nothing useful

210. By Ted Gould

Fix test that was broken

211. By Ted Gould

Adding keys needed by Unity about applications

212. By Ted Gould

Switching to a keyfile and getting all the properties out.

213. By Ted Gould

Adding a few more keys

214. By Ted Gould

Shifting where the CPP headers are installed

215. By Ted Gould

Making out test handling match our errors

216. By Michael Terry

Fixing applications search

217. By Ted Gould

Make it so that parse only works with well formed AppIDs and then there is a find that takes on more of the various format variations.

218. By Ted Gould

Check to see if the path is absolute already

219. By Ted Gould

Fix a bug where we're not returning an error properly

220. By Ted Gould

Add new C++ API that has a retained object for maintaining
connections through multiple calls. Also provides for getting
consistent application metadata.

221. By Ted Gould

Started on an application info test

222. By Ted Gould

Defaults and error condition tests

223. By Ted Gould

Adding symbols for find and valid

224. By Ted Gould

Testing all the various styles of orientations

225. By Ted Gould

Add support for primary and strip whitespace

226. By Ted Gould

Adjust the default value of rotates window contents

227. By Ted Gould

Fix handling of libertine apps

228. By Ted Gould

Use default values instead of overloading for cleaner code

229. By Ted Gould

Removing signals from the API for this MR

230. By Ted Gould

Revert back to 'C' versions of these tools

231. By Ted Gould

Fix symbols

232. By Ted Gould

Switch to a different arbitrary style

233. By Ted Gould

Switch from symbols to shlibs

Revision history for this message
Thomas Voß (thomas-voss) wrote :

A first round of remarks and comments.

review: Needs Fixing
Revision history for this message
Ted Gould (ted) wrote :
Download full text (11.7 KiB)

On Tue, 2016-02-09 at 12:34 +0000, Thomas Voß wrote:
> + g_main_context_iteration(creationcontext, TRUE /*
> > may block */);
>
> A static constexpr const variable may_block is self-documenting.

That's in the old C code, so there is no constexpr there.

> > +#pragma once
> > +#pragma GCC visibility push(default)
>
> Would you mind adding a macros PROJECT_NAME_DLL_PUBLIC/PRIVATE that
> renders symbols/types public and private, respectively?

Frankly, that's a rather ugly solution. Here everything in a public
header is public and a private header is private. It seems like a very
clean solution without putting linker clutter into the source code.

> > +namespace Ubuntu
>
> namespace names should be lower case. A namespace is not a type and
> should not be capitalized.

Uhg, okay. I think that:

Ubuntu::AppLaunch::Application

Looks very consistent. And type names are almost the only place that
you see the namespace elements in code.

Changed r234

> > +{
> > +namespace AppLaunch
> > +{
> > +
> > +struct AppID
> > +{
> > +    struct PackageTag;
> > +    struct AppNameTag;
> > +    struct VersionTag;
> > +
> > +    typedef TypeTagger<PackageTag, std::string> Package;
> > +    typedef TypeTagger<AppNameTag, std::string> AppName;
> > +    typedef TypeTagger<VersionTag, std::string> Version;
> > +
> > +    Package package;
> > +    AppName appname;
> > +    Version version;
> > +
> > +    operator std::string() const;
>
> Please define a non-member std::ostream& operator<<(std::ostream&,
> const AppID& app_id) instead.

Why instead? We need to be able to use AppID's as strings for usage
with older API's in many places. This seemed like the best way to do
it. I'm not sure why overloading shift left logical makes sense for
that.

> > +    int operator==(const AppID& other) const;
>
> Wrong return type, should be bool. Please make the function a non-
> member function, too.
>
> > +    int operator!=(const AppID& other) const;
>
> Wrong return type, should be bool. Please make the function a non-
> member function, too.

Interestingly, I stole that prototype from a C++ book I have here that
seems to be incorrect. Unsure why it matters whether they're member
functions or not. Having them outside just seems like more typing.

r235

> > +
> > +    AppID();
> > +    AppID(Package pkg, AppName app, Version ver);
> > +    bool empty() const;
>
> I don't think we should model empty as an explicit function here (it
> evaluates if the strings are set). Alternatively, I would propose
> that instances of AppID are passed as an Optional<AppID>. With that,
> you can get rid of the specialized c'tors and make the type a true
> value type. An additional benefit is getting rid of implicit
> semantics on the strings.

I love getting rid of the implicit semantics, but I don't think we
should use experimental features like optional. And without an implicit
constructor you can't have code like:

AppID foo;

if (bar) {
   foo = foo1;
} else {
   foo = foo2;
}

Which is a pain, because the compiler wants on its first pass to make
sure that it can build foo. Even though it optimizes out the building
of foo as soon as it evaluates its lifecycle.

> > +
> > +    static...

234. By Ted Gould

Namespace bike shedding

235. By Ted Gould

Remove as member functions

236. By Ted Gould

Adding the class keyword to enums

237. By Ted Gould

Optimize constructors

238. By Ted Gould

Explicit constructor

239. By Ted Gould

Check to ensure cpath isn't null

240. By Ted Gould

Make URL vectors const references

241. By Ted Gould

Make the constructor fail if there is no keyfile instead of waiting when we get info()

242. By Ted Gould

Passing the manifests by const reference

243. By Ted Gould

Adding a format target

244. By Ted Gould

Exception on manifest failures and ensure that we have it early

245. By Ted Gould

Stop incrementing ref counts to make the code faster

246. By Ted Gould

Check for keyfile in constructor

247. By Ted Gould

Check for keyfile in constructor

248. By Ted Gould

Move prototype

249. By Ted Gould

Making voids implicit instead of explicit

250. By Ted Gould

Move from one implementation only location to another implementation only location

251. By Ted Gould

Constexpr

252. By Ted Gould

Adding extra commas

253. By Ted Gould

Less splash, more namespacing

254. By Ted Gould

Change to supportsUbuntuLifecycle

255. By Ted Gould

Fix tests for exceptions on bad desktop files

256. By Ted Gould

Change the order of checking to ensure we don't get caught up by the local cache.

257. By Ted Gould

New version of clang formats slightly differently with the same settings

258. By Ted Gould

Adding in the sphinx branch so we can start to clean up the docs for the app object stuff.

259. By Ted Gould

Refactor the index to talk more about the C++ interface

260. By Ted Gould

TypeTagger documentation

261. By Ted Gould

AppID docs

262. By Ted Gould

Run through the autoformatter

263. By Ted Gould

Remove the implementation from the public docs

264. By Ted Gould

Application docs

265. By Ted Gould

Registry documentation

266. By Ted Gould

Helper documentation

267. By Ted Gould

Add the other implementation objects to the docs

268. By Ted Gould

Add libproperties-cpp-dev for the signal.h support

269. By Ted Gould

Put merge requirements in docs

270. By Ted Gould

gnu99 for ARM

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches