Fix some compiler warnings.
Mostly about deprecated ASCII casts. Change-Id: I70428913799c15f20a1a5f80be57848e1072e058 Reviewed-on: http://codereview.qt.nokia.com/4158 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
123ffbd783
commit
7507c80524
@@ -83,6 +83,7 @@ public:
|
||||
void initializeEngine(QDeclarativeEngine *engine, const char *uri)
|
||||
{
|
||||
Q_UNUSED(uri);
|
||||
Q_UNUSED(engine);
|
||||
#if 0
|
||||
engine->addImageProvider("camera", new QDeclarativeCameraPreviewProvider);
|
||||
#endif
|
||||
|
||||
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
|
||||
QAudioPluginLoader::QAudioPluginLoader(const char *iid, const QString &location, Qt::CaseSensitivity):
|
||||
m_iid(iid)
|
||||
{
|
||||
m_location = location + "/";
|
||||
m_location = location + QLatin1Char('/');
|
||||
load();
|
||||
}
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ void QSample::addRef()
|
||||
// Called in loading thread
|
||||
void QSample::readSample()
|
||||
{
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
|
||||
QMutexLocker m(&m_mutex);
|
||||
#ifdef QT_SAMPLECACHE_DEBUG
|
||||
qDebug() << "QSample: readSample";
|
||||
@@ -316,7 +316,7 @@ void QSample::readSample()
|
||||
// Called in loading thread
|
||||
void QSample::decoderReady()
|
||||
{
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
|
||||
QMutexLocker m(&m_mutex);
|
||||
#ifdef QT_SAMPLECACHE_DEBUG
|
||||
qDebug() << "QSample: decoder ready";
|
||||
@@ -343,7 +343,7 @@ QSample::State QSample::state() const
|
||||
// Essentially a second ctor, doesn't need locks (?)
|
||||
void QSample::load()
|
||||
{
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
|
||||
#ifdef QT_SAMPLECACHE_DEBUG
|
||||
qDebug() << "QSample: load [" << m_url << "]";
|
||||
#endif
|
||||
@@ -358,7 +358,7 @@ void QSample::load()
|
||||
// Called in loading thread
|
||||
void QSample::decoderError()
|
||||
{
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
|
||||
QMutexLocker m(&m_mutex);
|
||||
#ifdef QT_SAMPLECACHE_DEBUG
|
||||
qDebug() << "QSample: decoder error";
|
||||
@@ -371,7 +371,7 @@ void QSample::decoderError()
|
||||
// Called in loading thread from decoder when sample is done. Locked already.
|
||||
void QSample::onReady()
|
||||
{
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
|
||||
Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
|
||||
#ifdef QT_SAMPLECACHE_DEBUG
|
||||
qDebug() << "QSample: load ready";
|
||||
#endif
|
||||
|
||||
@@ -359,6 +359,8 @@ void QSoundEffectPrivate::setSource(const QUrl &url)
|
||||
case QSample::Error:
|
||||
decoderError();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -363,7 +363,7 @@ QCamera::QCamera(const QByteArray& device, QObject *parent):
|
||||
if (d->service != 0) {
|
||||
//pass device name to service
|
||||
if (d->deviceControl) {
|
||||
QString deviceName(device);
|
||||
QString deviceName = QString::fromLatin1(device);
|
||||
|
||||
for (int i=0; i<d->deviceControl->deviceCount(); i++) {
|
||||
if (d->deviceControl->deviceName(i) == deviceName) {
|
||||
|
||||
@@ -292,7 +292,7 @@ class QPluginServiceProvider : public QMediaServiceProvider
|
||||
public:
|
||||
QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
|
||||
{
|
||||
QString key(type);
|
||||
QString key(QLatin1String(type.constData()));
|
||||
|
||||
QList<QMediaServiceProviderPlugin *>plugins;
|
||||
foreach (QObject *obj, loader()->instances(key)) {
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
const QStringList& codecs,
|
||||
int flags) const
|
||||
{
|
||||
QList<QObject*> instances = loader()->instances(serviceType);
|
||||
QList<QObject*> instances = loader()->instances(QLatin1String(serviceType));
|
||||
|
||||
if (instances.isEmpty())
|
||||
return QtMultimediaKit::NotSupported;
|
||||
@@ -459,7 +459,7 @@ public:
|
||||
|
||||
QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
|
||||
{
|
||||
QList<QObject*> instances = loader()->instances(serviceType);
|
||||
QList<QObject*> instances = loader()->instances(QLatin1String(serviceType));
|
||||
|
||||
QStringList supportedTypes;
|
||||
|
||||
@@ -508,7 +508,7 @@ public:
|
||||
{
|
||||
QList<QByteArray> res;
|
||||
|
||||
foreach(QObject *obj, loader()->instances(serviceType)) {
|
||||
foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) {
|
||||
QMediaServiceSupportedDevicesInterface *iface =
|
||||
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
|
||||
|
||||
@@ -522,7 +522,7 @@ public:
|
||||
|
||||
QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
|
||||
{
|
||||
foreach(QObject *obj, loader()->instances(serviceType)) {
|
||||
foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) {
|
||||
QMediaServiceSupportedDevicesInterface *iface =
|
||||
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
|
||||
|
||||
|
||||
@@ -71,11 +71,14 @@ void FakeRadioServicePlugin::release(QMediaService *service)
|
||||
|
||||
QList<QByteArray> FakeRadioServicePlugin::devices(const QByteArray &service) const
|
||||
{
|
||||
Q_UNUSED(service);
|
||||
return QList<QByteArray>();
|
||||
}
|
||||
|
||||
QString FakeRadioServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
|
||||
{
|
||||
Q_UNUSED(service);
|
||||
Q_UNUSED(device);
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ static void
|
||||
gst_video_connector_init (GstVideoConnector *element,
|
||||
GstVideoConnectorClass *g_class)
|
||||
{
|
||||
(void) g_class;
|
||||
element->sinkpad =
|
||||
gst_pad_new_from_static_template (&gst_video_connector_sink_factory,
|
||||
"sink");
|
||||
@@ -269,6 +270,9 @@ gst_video_connector_resend_new_segment(GstElement * element, gboolean emitFailed
|
||||
|
||||
static gboolean gst_video_connector_new_buffer_probe(GstObject *pad, GstBuffer *buffer, guint * object)
|
||||
{
|
||||
(void) pad;
|
||||
(void) buffer;
|
||||
|
||||
GstVideoConnector *element = GST_VIDEO_CONNECTOR (object);
|
||||
|
||||
/*
|
||||
|
||||
@@ -182,6 +182,7 @@ bool QGstAppSrc::doSeek(qint64 value)
|
||||
|
||||
gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer userdata)
|
||||
{
|
||||
Q_UNUSED(element);
|
||||
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
|
||||
if (self && self->isStreamValid()) {
|
||||
if (!self->stream()->isSequential())
|
||||
@@ -195,6 +196,7 @@ gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer use
|
||||
|
||||
void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata)
|
||||
{
|
||||
Q_UNUSED(element);
|
||||
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
|
||||
if (self)
|
||||
self->enoughData() = true;
|
||||
@@ -202,6 +204,7 @@ void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata)
|
||||
|
||||
void QGstAppSrc::on_need_data(GstAppSrc *element, guint arg0, gpointer userdata)
|
||||
{
|
||||
Q_UNUSED(element);
|
||||
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
|
||||
if (self) {
|
||||
self->dataRequested() = true;
|
||||
|
||||
@@ -103,8 +103,8 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
|
||||
m_lastPosition(0),
|
||||
m_duration(-1),
|
||||
m_durationQueries(0),
|
||||
m_everPlayed(false) ,
|
||||
m_sourceType(UnknownSrc),
|
||||
m_everPlayed(false),
|
||||
m_isLiveSource(false)
|
||||
{
|
||||
#ifdef USE_PLAYBIN2
|
||||
@@ -195,6 +195,9 @@ GstElement *QGstreamerPlayerSession::playbin() const
|
||||
#if defined(HAVE_GST_APPSRC)
|
||||
void QGstreamerPlayerSession::configureAppSrcElement(GObject* object, GObject *orig, GParamSpec *pspec, QGstreamerPlayerSession* self)
|
||||
{
|
||||
Q_UNUSED(object);
|
||||
Q_UNUSED(pspec);
|
||||
|
||||
if (self->appsrc()->isReady())
|
||||
return;
|
||||
|
||||
|
||||
@@ -93,7 +93,8 @@ QGstCodecsInfo::QGstCodecsInfo(QGstCodecsInfo::ElementType elementType)
|
||||
|
||||
gst_caps_remove_structure(caps, 0);
|
||||
}
|
||||
|
||||
#else
|
||||
Q_UNUSED(elementType);
|
||||
#endif // GST_CHECK_VERSION(0,10,31)
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ qint64 QPulseAudioInput::read(char *data, qint64 len)
|
||||
emit stateChanged(m_deviceState);
|
||||
}
|
||||
|
||||
size_t readBytes = 0;
|
||||
int readBytes = 0;
|
||||
|
||||
if (!m_pullMode && !m_tempBuffer.isEmpty()) {
|
||||
readBytes = qMin(static_cast<int>(len), m_tempBuffer.size());
|
||||
|
||||
Reference in New Issue
Block a user