~unity-2d-team/unity-2d/trunk

« back to all changes in this revision

Viewing changes to config.h.in

  • Committer: Tarmac
  • Author(s): Tiago Salem Herrmann
  • Date: 2011-12-08 12:28:25 UTC
  • mfrom: (807.1.1 unity-2d)
  • Revision ID: tarmac-20111208122825-gxd52f8mkkl5o8ru
In a particular scenario unity-2d-places may abort due to a SIGABRT raised by QConf().
If for some reason (probably during a distro upgrade) the schema file isn't properly installed and
unity-2d-places is wrapped, then it simply aborts with the following message:

unity-2d-places: [FATAL] Settings schema 'com.canonical.Unity2d' is not installed

This patch adds a simple check if the schema file is present, and if not, assume the default
value. Other components like launcher and panel won't probably have this same issue since
they keep running in memory, and not launched on-the-fly.. Fixes: https://bugs.launchpad.net/bugs/857575. Appoved by .

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#define INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
4
4
#define UNITY_2D_DIR "@UNITY_2D_DIR@"
5
5
#define UNITY_DIR "@UNITY_DIR@"
 
6
#define UNITY_2D_SCHEMA_FILE "@UNITY_2D_SCHEMA_FILE@"
6
7
 
7
8
#include <QCoreApplication>
8
9
#include "qconf.h"