Merge lp:~bfiller/mediaplayer-app/fix-desktop-mode-check into lp:mediaplayer-app

Proposed by Bill Filler
Status: Merged
Approved by: Arthur Mello
Approved revision: 211
Merged at revision: 211
Proposed branch: lp:~bfiller/mediaplayer-app/fix-desktop-mode-check
Merge into: lp:mediaplayer-app
Diff against target: 37 lines (+7/-2)
2 files modified
po/mediaplayer-app.pot (+1/-1)
src/mediaplayer.cpp (+6/-1)
To merge this branch: bzr merge lp:~bfiller/mediaplayer-app/fix-desktop-mode-check
Reviewer Review Type Date Requested Status
Arthur Mello (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+213188@code.launchpad.net

Commit message

change check for desktopMode to use platform name rather than env var

Description of the change

change check for desktopMode to use platform name rather than env var

To post a comment you must log in.
Revision history for this message
Bill Filler (bfiller) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.
NO

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)
YES

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?
YES

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/<package-name>) on device or emulator?
YES

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?
YES

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/mediaplayer-app) on device or emulator?
YES

Did CI run pass? If not, please explain why.
YES

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?
YES

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'po/mediaplayer-app.pot'
2--- po/mediaplayer-app.pot 2014-02-13 18:26:52 +0000
3+++ po/mediaplayer-app.pot 2014-03-28 02:34:16 +0000
4@@ -8,7 +8,7 @@
5 msgstr ""
6 "Project-Id-Version: PACKAGE VERSION\n"
7 "Report-Msgid-Bugs-To: \n"
8-"POT-Creation-Date: 2014-02-13 13:21-0500\n"
9+"POT-Creation-Date: 2014-03-27 18:44-0400\n"
10 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13
14=== modified file 'src/mediaplayer.cpp'
15--- src/mediaplayer.cpp 2014-02-13 18:26:52 +0000
16+++ src/mediaplayer.cpp 2014-03-28 02:34:16 +0000
17@@ -32,6 +32,7 @@
18 #include <QtDBus/QDBusInterface>
19 #include <QtDBus/QDBusReply>
20 #include <QtDBus/QDBusConnectionInterface>
21+#include <QtGui/QGuiApplication>
22 #include <QScreen>
23 #include "config.h"
24
25@@ -179,7 +180,11 @@
26
27 bool MediaPlayer::isDesktopMode() const
28 {
29- return (qEnvironmentVariableIsSet("DESKTOP_MODE") && (qgetenv("DESKTOP_MODE") == "1"));
30+ // Assume that platformName (QtUbuntu) with ubuntu
31+ // in name means it's running on device
32+ // TODO: replace this check with SDK call for formfactor
33+ QString platform = QGuiApplication::platformName();
34+ return !((platform == "ubuntu") || (platform == "ubuntumirclient"));
35 }
36
37 QUrl MediaPlayer::chooseFile()

Subscribers

People subscribed via source and target branches