fix(app): avoid some unused functions/variable on MacOS

This commit is contained in:
Ronan Abhamon 2018-08-03 14:06:45 +02:00
parent d802577cda
commit e888eb27ec
3 changed files with 13 additions and 6 deletions

View file

@ -60,7 +60,9 @@ namespace {
constexpr char QmlViewCallsWindow[] = "qrc:/ui/views/App/Calls/CallsWindow.qml";
constexpr char QmlViewSettingsWindow[] = "qrc:/ui/views/App/Settings/SettingsWindow.qml";
constexpr int VersionUpdateCheckInterval = 86400000; // 24 hours in milliseconds.
#ifdef ENABLE_UPDATE_CHECK
constexpr int VersionUpdateCheckInterval = 86400000; // 24 hours in milliseconds.
#endif // ifdef ENABLE_UPDATE_CHECK
constexpr char MainQmlUri[] = "Linphone";
@ -600,6 +602,7 @@ void App::openAppAfterInit (bool mustBeIconified) {
if (!mustBeIconified)
smartShowWindow(mainWindow);
#else
Q_UNUSED(mustBeIconified);
smartShowWindow(mainWindow);
#endif // ifndef __APPLE__

View file

@ -142,10 +142,6 @@ static inline QString getAppFactoryConfigFilePath () {
return getAppPackageDataDirPath() + PathFactoryConfig;
}
static inline QString getAppPluginsDirPath () {
return getAppPackageDataDirPath() + PathPlugins;
}
static inline QString getAppRootCaFilePath () {
return getAppPackageDataDirPath() + PathRootCa;
}

View file

@ -37,7 +37,9 @@
using namespace std;
namespace {
constexpr char H264Description[] = "Provided by CISCO SYSTEM,INC";
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
constexpr char H264Description[] = "Provided by CISCO SYSTEM,INC";
#endif // if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
#ifdef Q_OS_LINUX
constexpr char LibraryExtension[] = "so";
@ -62,6 +64,8 @@ VideoCodecsModel::VideoCodecsModel (QObject *parent) : AbstractCodecsModel(paren
load();
}
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
static bool downloadUpdatableCodec (
QObject *parent,
const QString &codecsFolder,
@ -125,6 +129,8 @@ static bool downloadUpdatableCodec (
return true;
}
#endif // if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
void VideoCodecsModel::updateCodecs () {
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
static const QString codecSuffix = QStringLiteral(".%1").arg(LibraryExtension);
@ -148,6 +154,8 @@ void VideoCodecsModel::downloadUpdatableCodecs (QObject *parent) {
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
QString codecsFolder = Utils::coreStringToAppString(Paths::getCodecsDirPath());
downloadUpdatableCodec(parent, codecsFolder, "H264", PluginUrlH264, H264InstallName);
#else
Q_UNUSED(parent);
#endif // if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
}