Drop Qt4, libgcrypt, qtmobility dependencies

This commit is contained in:
Fabio Bas 2016-05-11 12:03:20 +02:00
parent e3fb308ea1
commit bb5292aa8d
54 changed files with 96 additions and 818 deletions

View file

@ -7,11 +7,7 @@
#include <QDebug>
#include <QFileInfo>
#include <QLibraryInfo>
#if QT_VERSION < 0x050000
#include <QDesktopServices>
#else
#include <QStandardPaths>
#endif
#include <QStandardPaths>
#define DEFAULT_THEME_NAME "Default"
#define TEST_SOUND_FILENAME "player_join"
@ -47,13 +43,8 @@ void SoundEngine::soundEnabledChanged()
if(!player)
{
QAudioFormat format;
#if QT_VERSION < 0x050000
format.setFrequency(44100);
format.setChannels(1);
#else
format.setSampleRate(44100);
format.setChannelCount(1);
#endif
format.setSampleSize(16);
format.setCodec("audio/pcm");
format.setByteOrder(QAudioFormat::LittleEndian);
@ -88,9 +79,8 @@ void SoundEngine::playSound(QString fileName)
inputBuffer->close();
inputBuffer->setData(audioData[fileName]);
inputBuffer->open(QIODevice::ReadOnly);
#if QT_VERSION >= 0x050000
player->setVolume(settingsCache->getMasterVolume() / 100.0);
#endif
player->stop();
player->start(inputBuffer);
}
@ -119,8 +109,6 @@ QStringMap & SoundEngine::getAvailableThemes()
dir =
#ifdef PORTABLE_BUILD
qApp->applicationDirPath() +
#elif QT_VERSION < 0x050000
QDesktopServices::storageLocation(QDesktopServices::DataLocation) +
#else
QStandardPaths::standardLocations(QStandardPaths::DataLocation).first() +
#endif