From 32343107b30904806d02672955c57ed53d39fe79 Mon Sep 17 00:00:00 2001 From: erik Date: Fri, 19 Jan 2007 01:18:01 +0000 Subject: Every file in this commit has a change to check the return value of a call. --- (limited to 'core/settings') diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index 29ce841..d63b203 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp @@ -33,6 +33,7 @@ _;:, .> :=|. This file is free software; you can #include #include #include +#include #include #include @@ -94,7 +95,9 @@ void MenuSettings::init ( ) MenuAppletInterface *iface = 0; QLibrary *lib = new QLibrary ( path + "/" + *it ); - lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); + QRESULT retVal = QS_OK; + if ((retVal = lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**)(&iface) )) != QS_OK ) + owarn << "queryInterface failed with " << retVal << oendl; if ( iface ) { QString lang = getenv( "LANG" ); QTranslator *trans = new QTranslator ( qApp ); diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index 861ff3a..c2b82b9 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp @@ -91,7 +91,9 @@ void TaskbarSettings::init ( ) owarn << "Load applet: " << (*it) << "" << oendl; QLibrary *lib = new QLibrary ( path + "/" + *it ); - lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); + QRESULT retVal = QS_OK; + if ((retVal = lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**)(&iface) )) != QS_OK) + owarn << "<0>" << oendl; owarn << "<1>" << oendl; if ( iface ) { owarn << "<2>" << oendl; @@ -110,10 +112,11 @@ void TaskbarSettings::init ( ) owarn << "<3>" << oendl; if ( !iface ) { owarn << "<4>" << oendl; - lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); + if ((retVal = lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**)(&iface))) != QS_OK) + owarn << "<5>" << oendl; if ( iface ) { - owarn << "<5>" << oendl; + owarn << "<6>" << oendl; name = (*it). mid ( 3 ); owarn << "Found applet: " << name << "" << oendl; #ifdef Q_OS_MACX @@ -130,10 +133,10 @@ void TaskbarSettings::init ( ) iface-> release ( ); } } - owarn << "<6>" << oendl; + owarn << "<7>" << oendl; if ( iface ) { - owarn << "<7>" << oendl; + owarn << "<8>" << oendl; QCheckListItem *item; item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); if ( !icon. isNull ( )) -- cgit v0.9.0.2