2
* Copyright (C) 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#include <QtCore/QCoreApplication>
21
#include <QtCore/QDir>
22
#include <QtCore/QString>
24
inline bool isClick() {
25
static bool click = (QCoreApplication::applicationDirPath().contains("click.ubuntu.com"));
29
inline bool isRunningInstalled()
31
static bool installed = (QCoreApplication::applicationDirPath().startsWith("/usr"));
35
inline QString docviewerDirectory()
39
} else if (isRunningInstalled()) {
40
return QString("@CMAKE_INSTALL_PREFIX@/@DATA_DIR@");
42
return QString("@CMAKE_CURRENT_SOURCE_DIR@");
45
#endif // __CONFIG_H__