Merge lp:~dandrader/qtubuntu/betterSessionName into lp:qtubuntu
| Status: | Merged |
|---|---|
| Approved by: | Gerry Boland on 2016-06-01 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 322 |
| Proposed branch: | lp:~dandrader/qtubuntu/betterSessionName |
| Merge into: | lp:qtubuntu |
| Diff against target: |
104 lines (+44/-8) 2 files modified
src/ubuntumirclient/integration.cpp (+40/-6) src/ubuntumirclient/integration.h (+4/-2) |
| To merge this branch: | bzr merge lp:~dandrader/qtubuntu/betterSessionName |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Unity8 CI Bot | continuous-integration | Approve on 2016-06-04 | |
| Gerry Boland | 2016-06-01 | Approve on 2016-06-01 | |
|
Review via email:
|
|||
Commit Message
Generate better mir session names
Try to come up with some meaningful session name to uniquely identify this session,
helping with shell debugging
Description of the Change
Immensely helpful to help make sense of unity8.log when debugging multiple/nested prompt sessions use cases such as in bug 1586219.
| Daniel d'Andrada (dandrader) wrote : | # |
On 01/06/2016 09:48, Nick Dedekind wrote:
>> +QByteArray UbuntuClientInt
>> >+{
> Perhaps use QApplication:
>
QApplication:
QPlatformIntegr
or even changed at any time by calling
QCoreApplicaito
updating your session id to follow those changes. So the only thing sure
to exist at QPlatformIntegr
| Gerry Boland (gerboland) wrote : | # |
+for (int i = 0; i < args.count(); ++i) {
+ QString arg = args[i];
We have Q_FOREACH
Do you really need to read the FileInfo object? Why not just drop the ".qml" from the file name?
+ u_application_
Does the api expect sessionName to always exist, or will it make a copy itself?
| Daniel d'Andrada (dandrader) wrote : | # |
On 01/06/2016 12:01, Gerry Boland wrote:
> Review: Needs Fixing
>
> +for (int i = 0; i < args.count(); ++i) {
> + QString arg = args[i];
> We have Q_FOREACH
I personally find this macro ugly, but if you fancy it...
But it is less code and thus less error prone. Done.
> Do you really need to read the FileInfo object? Why not just drop the ".qml" from the file name?
Yes. The argument could be a full file path like this:
/foo/bar/
Which would make for a cumbersome session name. QFileInfo neatly and
safely parses that filepath for me.
I like the ".qml" suffix as it tells us it's a plain qml app run via
qmlscene.
> + u_application_
> Does the api expect sessionName to always exist, or will it make a copy itself?
It makes a copy. What a horrible API it would be otherwise.
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:318
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
| Gerry Boland (gerboland) wrote : | # |
> > Do you really need to read the FileInfo object? Why not just drop the ".qml"
> from the file name?
> Yes. The argument could be a full file path like this:
>
> /foo/bar/
>
> Which would make for a cumbersome session name. QFileInfo neatly and
> safely parses that filepath for me.
>
> I like the ".qml" suffix as it tells us it's a plain qml app run via
> qmlscene.
Yeah, that's ok. I just want to keep app startup light, using QFileInfo to parse a file name just strikes me as heavy for something that only those reading file logs will appreciate. But I won't block on that.
> > + u_application_
> sessionName.
> > Does the api expect sessionName to always exist, or will it make a copy
> itself?
>
> It makes a copy. What a horrible API it would be otherwise.
You never know :)
| Daniel d'Andrada (dandrader) wrote : | # |
On 01/06/2016 12:58, Gerry Boland wrote:
> Yeah, that's ok. I just want to keep app startup light, using QFileInfo to parse a file name just strikes me as heavy for something that only those reading file logs will appreciate. But I won't block on that.
QFileInfo creation looks pretty tame and lightweight. It pretty much
just stores the given filepath in a internal string.
The only real code we execute happens when we call QFileInfo:
where it essentially finds the last separator char in the string and
then "return m_filePath.
| Gerry Boland (gerboland) wrote : | # |
Ok, thanks for checking that. Change looks good to me!
- 322. By Daniel d'Andrada on 2016-06-03
-
Generate better mir session names
Try to come up with some meaningful session name to uniquely identify this session,
helping with shell debugging
| Unity8 CI Bot (unity8-ci-bot) wrote : | # |
PASSED: Continuous integration, rev:318
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/

PASSED: Continuous integration, rev:317 /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/63/ /unity8- jenkins. ubuntu. com/job/ build/1759 /unity8- jenkins. ubuntu. com/job/ build-0- fetch/1785 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1732 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial+ overlay/ 1732 /unity8- jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= yakkety/ 1732 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=amd64, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=armhf, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= vivid+overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1725/artifact/ output/ *zip*/output. zip /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1725 /unity8- jenkins. ubuntu. com/job/ build-2- binpkg/ arch=i386, release= yakkety/ 1725/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /unity8- jenkins. ubuntu. com/job/ lp-qtubuntu- ci/63/rebuild
https:/