From b017b14c0ec6d327e061a1f96209e19fdc59885a Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 05 Feb 2007 20:18:36 +0000 Subject: BUG: My change to a switch statement made opie-gutenbrowser uncompilable. FIX: The code there is just strange. I tore out the switch statement and replaced it with a simple if block instead. --- (limited to 'noncore') diff --git a/noncore/apps/opie-gutenbrowser/openetext.cpp b/noncore/apps/opie-gutenbrowser/openetext.cpp index a5d855d..75edacd 100644 --- a/noncore/apps/opie-gutenbrowser/openetext.cpp +++ b/noncore/apps/opie-gutenbrowser/openetext.cpp @@ -368,17 +368,15 @@ void OpenEtext::remove() title_text=title_text.stripWhiteSpace(); QString msg ="

Do you really want to REMOVE\n" + title_text + "?\nThis will not delete the file.

"; - switch( QMessageBox::information( this, tr("Remove Etext"), - tr(msg), - tr("&Yes"), tr("&Cancel"), 0 ) ) - { - case 0: // Yes clicked, - removeSelection(); - QListBox_1->clear(); - getTitles(); - break; - case 1: - default: + unsigned short clickVal = + QMessageBox::information( this, tr("Remove Etext"), + tr(msg), + tr("&Yes"), tr("&Cancel"), 0 ); + if ( clickVal == 0 ) { + // The yes button was clicked + removeSelection(); + QListBox_1->clear(); + getTitles(); } } -- cgit v0.9.0.2