Skip to content

Commit

Permalink
Fix an incomplete error message and context changes.
Browse files Browse the repository at this point in the history
This fix an incomplete error message and changes the translation
context of some strings while we are there...
  • Loading branch information
Nicolas Riendeau committed Jul 4, 2012
1 parent c46be30 commit 1a56a47
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mythtv/libs/libmythtv/channelscan/channelscanner.cpp
Expand Up @@ -175,7 +175,7 @@ void ChannelScanner::Scan(
}
else
{
InformUser(QObject::tr("Error tuning to transport"));
InformUser(tr("Error tuning to transport"));
Teardown();
}
}
Expand Down Expand Up @@ -208,7 +208,7 @@ void ChannelScanner::Scan(
}
else
{
InformUser(QObject::tr("Error tuning to transport"));
InformUser(tr("Error tuning to transport"));
Teardown();
}
}
Expand All @@ -230,8 +230,8 @@ void ChannelScanner::Scan(
if (!ok)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to handle tune complete.");
InformUser(QObject::tr("Programmer Error: "
"Failed to handle tune complete."));
InformUser(tr("Programmer Error: "
"Failed to handle tune complete."));
}
}

Expand Down Expand Up @@ -263,10 +263,10 @@ DTVConfParser::return_t ChannelScanner::ImportDVBUtils(
if (DTVConfParser::OK != ret)
{
QString msg = (DTVConfParser::ERROR_PARSE == ret) ?
QObject::tr("Failed to parse '%1'") :
QString(tr("Failed to parse '%1'")).arg(file) :
((DTVConfParser::ERROR_CARDTYPE == ret) ?
QString("Programmer Error : incorrect card type") :
QObject::tr("Failed to open '%1'"));
tr("Programmer Error : incorrect card type") :
QString(tr("Failed to open '%1'")).arg(file));

InformUser(msg);
}
Expand All @@ -293,7 +293,7 @@ bool ChannelScanner::ImportM3U(
#endif // USING_IPTV

if (!ok)
InformUser(QObject::tr("Error starting scan"));
InformUser(tr("Error starting scan"));

return ok;
}
Expand All @@ -314,7 +314,7 @@ void ChannelScanner::PreScanCommon(
if (device.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR, LOC + "No Device");
InformUser(QObject::tr("Programmer Error: No Device"));
InformUser(tr("Programmer Error: No Device"));
return;
}

Expand Down Expand Up @@ -374,7 +374,7 @@ void ChannelScanner::PreScanCommon(
if (!channel)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Channel not created");
InformUser(QObject::tr("Programmer Error: Channel not created"));
InformUser(tr("Programmer Error: Channel not created"));
return;
}

Expand All @@ -385,7 +385,7 @@ void ChannelScanner::PreScanCommon(
if (!channel->Open())
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Channel could not be opened");
InformUser(QObject::tr("Channel could not be opened."));
InformUser(tr("Channel could not be opened."));
return;
}

Expand Down
5 changes: 5 additions & 0 deletions mythtv/libs/libmythtv/channelscan/channelscanner.h
Expand Up @@ -30,6 +30,9 @@
#ifndef _CHANNEL_SCANNER_H_
#define _CHANNEL_SCANNER_H_

// Qt headers
#include <QCoreApplication>

// MythTV headers
#include "mythtvexp.h"
#include "dtvconfparser.h"
Expand All @@ -47,6 +50,8 @@ class ChannelBase;

class MTV_PUBLIC ChannelScanner
{
Q_DECLARE_TR_FUNCTIONS(ChannelScanner)

friend class ScanMonitor;

public:
Expand Down

0 comments on commit 1a56a47

Please sign in to comment.