summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2012-11-29 14:27:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-29 14:39:23 +0100
commitf26ae01ec4b17e2111ecbb4c517dc847a0bb4240 (patch)
treeaaf4003fa990764c2cc9bbe2bbf95322bab48c81
parent25fd41373abdfe967b892173783687262a70139d (diff)
downloadqtmultimedia-f26ae01ec4b17e2111ecbb4c517dc847a0bb4240.tar.gz
tr()-Fixes.
Make WMF-player error message consistent (sentences, no exclamation marks). Improve wording. Change-Id: I876b26067fb374833037aa93dd9675ab556bf972 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
-rw-r--r--src/multimedia/playback/playlistfileparser.cpp6
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp32
2 files changed, 19 insertions, 19 deletions
diff --git a/src/multimedia/playback/playlistfileparser.cpp b/src/multimedia/playback/playlistfileparser.cpp
index 64bff81ef..fb2899f69 100644
--- a/src/multimedia/playback/playlistfileparser.cpp
+++ b/src/multimedia/playback/playlistfileparser.cpp
@@ -275,7 +275,7 @@ Version=2
int entries = getValue(lineIndex, line).toInt();
int count = m_readFlags == 0 ? (m_count - 1) : m_count;
if (entries != count) {
- emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing pls: %1, expected count = %2")).
+ emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing playlist: %1, expected count = %2")).
arg(line, QString::number(count)));
}
break;
@@ -289,7 +289,7 @@ Version=2
if (line.startsWith(QLatin1String("Version"))) {
int version = getValue(lineIndex, line).toInt();
if (version != 2)
- emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing pls at line[%1], expected version = 2")).arg(line));
+ emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing playlist at line[%1], expected version = 2")).arg(line));
}
break;
}
@@ -298,7 +298,7 @@ Version=2
QString getValue(int lineIndex, const QString& line) {
int start = line.indexOf('=');
if (start < 0) {
- emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing pls at line[%1]:%2")).arg(QString::number(lineIndex), line));
+ emit error(QPlaylistFileParser::FormatError, QString(tr("Error parsing playlist at line[%1]:%2")).arg(QString::number(lineIndex), line));
return QString();
}
return line.mid(start + 1).trimmed();
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index c68962dce..e48f133b8 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -520,7 +520,7 @@ void MFPlayerSession::load(const QMediaContent &media, QIODevice *stream)
changeStatus(QMediaPlayer::NoMedia);
} else if (stream && (!stream->isReadable())) {
changeStatus(QMediaPlayer::InvalidMedia);
- emit error(QMediaPlayer::ResourceError, tr("Invalid stream source!"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Invalid stream source."), true);
} else {
changeStatus(QMediaPlayer::LoadingMedia);
m_sourceResolver->load(resources, stream);
@@ -535,7 +535,7 @@ void MFPlayerSession::handleSourceError(long hr)
switch (hr) {
case QMediaPlayer::FormatError:
errorCode = QMediaPlayer::FormatError;
- errorString = tr("Attempting to play invalid Qt resource");
+ errorString = tr("Attempting to play invalid Qt resource.");
break;
case NS_E_FILE_NOT_FOUND:
errorString = tr("The system cannot find the file specified.");
@@ -571,7 +571,7 @@ void MFPlayerSession::handleMediaSourceReady()
setupPlaybackTopology(mediaSource, sourcePD);
} else {
changeStatus(QMediaPlayer::InvalidMedia);
- emit error(QMediaPlayer::ResourceError, tr("Can't create presentation descriptor!"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Cannot create presentation descriptor."), true);
}
}
@@ -583,7 +583,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat
hr = sourcePD->GetStreamDescriptorCount(&cSourceStreams);
if (FAILED(hr)) {
changeStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Failed to get stream count"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to get stream count."), true);
return;
}
@@ -591,7 +591,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat
hr = MFCreateTopology(&topology);
if (FAILED(hr)) {
changeStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Failed to create topology!"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to create topology."), true);
return;
}
@@ -624,7 +624,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat
if (!connected)
hr = sourceNode->ConnectOutput(0, outputNode, 0);
if (FAILED(hr)) {
- emit error(QMediaPlayer::FormatError, tr("Unable to play some stream"), false);
+ emit error(QMediaPlayer::FormatError, tr("Unable to play any stream."), false);
}
else {
succeededCount++;
@@ -647,7 +647,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat
if (succeededCount == 0) {
changeStatus(QMediaPlayer::InvalidMedia);
- emit error(QMediaPlayer::ResourceError, tr("Unable to play"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Unable to play."), true);
} else {
if (outputNodeId != -1) {
topology = insertMFT(topology, outputNodeId);
@@ -656,7 +656,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat
hr = m_session->SetTopology(MFSESSION_SETTOPOLOGY_IMMEDIATE, topology);
if (FAILED(hr)) {
changeStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Failed to set topology!"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to set topology."), true);
}
}
topology->Release();
@@ -717,7 +717,7 @@ IMFTopologyNode* MFPlayerSession::addOutputNode(IMFStreamDescriptor *streamDesc,
}
} else {
// Unknown stream type.
- emit error(QMediaPlayer::FormatError, tr("Unknown stream type"), false);
+ emit error(QMediaPlayer::FormatError, tr("Unknown stream type."), false);
}
if (activate) {
@@ -1083,7 +1083,7 @@ void MFPlayerSession::stop(bool immediate)
m_varStart.hVal.QuadPart = 0;
}
} else {
- emit error(QMediaPlayer::ResourceError, tr("failed to stop"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to stop."), true);
}
}
}
@@ -1136,7 +1136,7 @@ void MFPlayerSession::pause()
m_state.setCommand(CmdPause);
m_pendingState = CmdPending;
} else {
- emit error(QMediaPlayer::ResourceError, tr("failed to pause"), false);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to pause."), false);
}
}
}
@@ -1163,14 +1163,14 @@ void MFPlayerSession::createSession()
HRESULT hr = MFCreateMediaSession(NULL, &m_session);
if (FAILED(hr)) {
changeStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Unable to create mediasession"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Unable to create mediasession."), true);
}
hr = m_session->BeginGetEvent(this, m_session);
if (FAILED(hr)) {
changeStatus(QMediaPlayer::UnknownMediaStatus);
- emit error(QMediaPlayer::ResourceError, tr("Unable to pulling session events"), false);
+ emit error(QMediaPlayer::ResourceError, tr("Unable to pull session events."), false);
}
}
@@ -1235,7 +1235,7 @@ void MFPlayerSession::setPositionInternal(qint64 position, Command requestCmd)
m_state.start = position;
m_pendingState = SeekPending;
} else {
- emit error(QMediaPlayer::ResourceError, tr("failed to seek"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Failed to seek."), true);
}
}
@@ -1537,14 +1537,14 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
sessionEvent->GetValue(&var);
qWarning() << "handleSessionEvent: non fatal error = " << var.ulVal;
PropVariantClear(&var);
- emit error(QMediaPlayer::ResourceError, tr("media session non-fatal error!"), false);
+ emit error(QMediaPlayer::ResourceError, tr("Media session non-fatal error."), false);
}
break;
case MESourceUnknown:
changeStatus(QMediaPlayer::InvalidMedia);
case MEError:
qWarning() << "handleSessionEvent: serious error = " << hrStatus;
- emit error(QMediaPlayer::ResourceError, tr("media session serious error!"), true);
+ emit error(QMediaPlayer::ResourceError, tr("Media session serious error."), true);
break;
case MESessionRateChanged:
// If the rate change succeeded, we've already got the rate