~saviq/camera-app/new-icon

« back to all changes in this revision

Viewing changes to cameraapplication.cpp

  • Committer: CI bot
  • Author(s): Bill Filler
  • Date: 2014-03-31 16:39:04 UTC
  • mfrom: (255.1.1 camera-app)
  • Revision ID: ps-jenkins@lists.canonical.com-20140331163904-0l5cyprgfxpdj9r4
change check for desktopMode to use platform name rather than env var 

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <QQmlContext>
29
29
#include <QQmlEngine>
30
30
#include <QScreen>
 
31
#include <QtGui/QGuiApplication>
31
32
 
32
33
#include "config.h"
33
34
 
67
68
 
68
69
bool CameraApplication::isDesktopMode() const
69
70
{
70
 
  return (qEnvironmentVariableIsSet("DESKTOP_MODE") && (qgetenv("DESKTOP_MODE") == "1"));
 
71
  // Assume that platformName (QtUbuntu) with ubuntu
 
72
  // in name means it's running on device
 
73
  // TODO: replace this check with SDK call for formfactor
 
74
  QString platform = QGuiApplication::platformName();
 
75
  return !((platform == "ubuntu") || (platform == "ubuntumirclient"));
71
76
}
72
77
 
73
78