Fix warning when ibus is not available.

This is perfectly ok on a linux desktop, so no reason to abort when
setting QT_FATAL_WARNINGS.

Change-Id: I64ba987679195741631fb204af57ae3d283bb516
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
David Faure 2012-06-23 22:50:14 +02:00 committed by Qt by Nokia
parent 8e280d1e18
commit 27d7d7c69e
2 changed files with 3 additions and 11 deletions

View File

@ -272,10 +272,8 @@ QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate()
context(0),
valid(false)
{
if (!connection || !connection->isConnected()) {
qDebug("QIBusPlatformInputContext: not connected.");
if (!connection || !connection->isConnected())
return;
}
bus = new QIBusProxy(QLatin1String("org.freedesktop.IBus"),
QLatin1String("/org/freedesktop/IBus"),
@ -333,12 +331,8 @@ QDBusConnection *QIBusPlatformInputContextPrivate::createConnection()
QLatin1String(QDBusConnection::localMachineId()) +
QLatin1Char('-') + QString::fromLocal8Bit(host) + QLatin1Char('-') + QString::fromLocal8Bit(displayNumber));
if (!file.exists()) {
qWarning("QIBusPlatformInputContext: ibus config file '%s' does not exist.", qPrintable(file.fileName()));
if (!file.open(QFile::ReadOnly))
return 0;
}
file.open(QFile::ReadOnly);
QByteArray address;
int pid = -1;

View File

@ -551,10 +551,8 @@ QMaliitPlatformInputContextPrivate::QMaliitPlatformInputContextPrivate(QMaliitPl
, correctionEnabled(false)
, q(qq)
{
if (!connection.isConnected()) {
qDebug("QMaliitPlatformInputContext: not connected.");
if (!connection.isConnected())
return;
}
server = new ComMeegoInputmethodUiserver1Interface(QStringLiteral(""), QStringLiteral("/com/meego/inputmethod/uiserver1"), connection);
adaptor = new Inputcontext1Adaptor(qq);