summaryrefslogtreecommitdiff
path: root/widgets/displaytext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/displaytext.cpp')
-rw-r--r--widgets/displaytext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp
index 2494928a..5c8e4233 100644
--- a/widgets/displaytext.cpp
+++ b/widgets/displaytext.cpp
@@ -208,7 +208,7 @@ void DisplayText::insertText(QString const& text, QColor bg, QColor fg
{
temp_format = format;
cursor.insertText(text.mid (text_index, call_index - text_index), format);
- if (pos.value ().second.isValid ())
+ if (pos.value ().first.isValid ())
{
temp_format.setBackground (pos.value ().first);
}
@@ -872,7 +872,7 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg,
}
else
{
- auto pos = highlighted_calls_.find (callsign);
+ auto pos = highlighted_calls_.find (callsign.toUpper ());
if (bg.isValid () || fg.isValid ())
{
auto colours = qMakePair (bg, fg);
@@ -918,7 +918,7 @@ void DisplayText::AudioAlerts()
#ifdef WIN32
if(m_config->alert_Enabled()) {
QAudioOutput info(QAudioDeviceInfo::defaultOutputDevice());
- QString audioPath = QCoreApplication::applicationDirPath() + "/sounds" + m_config->voicesPath() + "/";
+ QString audioPath = app_sounds_directory (m_config->voicesPath());
QAudioFormat format;
format.setCodec("audio/pcm");
format.setSampleRate (48000);
@@ -930,7 +930,7 @@ void DisplayText::AudioAlerts()
connect(audio, SIGNAL(stateChanged(QAudio::State)), this, SLOT(handleStateChanged(QAudio::State)));
#else
if(m_config->alert_Enabled()) {
- QString audioPath = QCoreApplication::applicationDirPath() + "/sounds" + m_config->voicesPath() + "/";
+ QString audioPath = app_sounds_directory (m_config->voicesPath());
#endif
QFile *effect2 = new QFile(this);
QFile *effect3 = new QFile(this);