Commit 970e985d authored by Stefano Pettini's avatar Stefano Pettini Committed by Matěj Laitl
Browse files

Fix for C++ warnings about unused variables and deprecated functions

Thank you, Stefano!

REVIEW: 127458
parent 0e760e5f
......@@ -82,7 +82,6 @@ DatabaseConfig::testDatabaseConnection() //SLOT
factories = Plugins::PluginManager::instance()->factories( Plugins::PluginManager::Storage );
// try if they have a testSettings slot that we can call
bool tested = false;
foreach( Plugins::PluginFactory* factory, factories )
{
bool callSucceeded = false;
......@@ -100,7 +99,6 @@ DatabaseConfig::testDatabaseConnection() //SLOT
if( callSucceeded )
{
tested = true;
if( connectionErrors.isEmpty() )
KMessageBox::messageBox( this, KMessageBox::Information,
i18n( "Amarok was able to establish a successful connection to the database." ),
......
......@@ -301,7 +301,7 @@ SqlScanResultProcessor::commitTrack( CollectionScanner::Track *track,
metaTrack->setType( track->filetype() );
if( m_type == GenericScanManager::FullScan ||
!track->bpm() >= 0 )
track->bpm() >= 0 )
metaTrack->setBpm( track->bpm() );
if( m_type == GenericScanManager::FullScan ||
......
......@@ -69,6 +69,7 @@ MySqlServerStorageFactory::testSettings( const QString &host, const QString &use
MySqlServerStorage* storage = new MySqlServerStorage();
bool initResult = storage->init( host, user, password, port, databaseName );
Q_UNUSED( initResult );
// we are just interested in the errors.
errors = storage->getLastErrors();
......
......@@ -155,8 +155,11 @@ Mp3tunesHarmonyDaemon::init()
{
qDebug() << "Begin initing";
/* g_type_init required for using the GObjects for Harmony. */
g_type_init();
#if !GLIB_CHECK_VERSION(2,36,0)
/* g_type_init required for using the GObjects in versions of glib older than 2.36. */
g_type_init ();
#endif
m_harmony = mp3tunes_harmony_new();
......
......@@ -643,7 +643,7 @@ gboolean mp3tunes_harmony_disconnect(MP3tunesHarmony *harmony, GError** err) {
gboolean success = close_connection(harmony);
harmony->connected = FALSE;
if (success == FALSE) {
err = &harmony->error;
*err = harmony->error;
return success;
}
return success;
......@@ -658,7 +658,7 @@ gboolean mp3tunes_harmony_connect(MP3tunesHarmony* harmony, GError** err) {
success = open_connection(harmony);
if (success == FALSE) {
err = &harmony->error;
*err = harmony->error;
mp3tunes_harmony_disconnect(harmony, err);
return success;
}
......
......@@ -32,6 +32,7 @@ DefaultApplicationController::DefaultApplicationController( QObject *parent )
//there can be only one applicationcontroller
ApplicationController *oldController = Components::setApplicationController( this );
Q_ASSERT( !oldController );
Q_UNUSED( oldController );
}
DefaultApplicationController::~DefaultApplicationController()
......@@ -88,6 +89,7 @@ DefaultApplicationController::initEngineController()
Components::setEngineController( controller );
bool invoked = QMetaObject::invokeMethod( controller, "initializePhonon", Qt::DirectConnection );
Q_ASSERT( invoked );
Q_UNUSED( invoked );
}
void
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment