author | erik <erik> | 2007-02-05 20:18:36 (UTC) |
---|---|---|
committer | erik <erik> | 2007-02-05 20:18:36 (UTC) |
commit | b017b14c0ec6d327e061a1f96209e19fdc59885a (patch) (unidiff) | |
tree | 5b4727ced07dd1ef44a736dd4b0d75589f3ba06d | |
parent | 73edac572d9ac9cfd18cc1254fc2019563d55f16 (diff) | |
download | opie-b017b14c0ec6d327e061a1f96209e19fdc59885a.zip opie-b017b14c0ec6d327e061a1f96209e19fdc59885a.tar.gz opie-b017b14c0ec6d327e061a1f96209e19fdc59885a.tar.bz2 |
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.
-rw-r--r-- | noncore/apps/opie-gutenbrowser/openetext.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
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 | |||
@@ -355,43 +355,41 @@ bool OpenEtext::checkConf() | |||
355 | config.setGroup( "Files"); | 355 | config.setGroup( "Files"); |
356 | QString ramble = config.readEntry(temp, "" ); | 356 | QString ramble = config.readEntry(temp, "" ); |
357 | 357 | ||
358 | if(ramble == file ) { | 358 | if(ramble == file ) { |
359 | return true; | 359 | return true; |
360 | } | 360 | } |
361 | } | 361 | } |
362 | return false; | 362 | return false; |
363 | } | 363 | } |
364 | 364 | ||
365 | void OpenEtext::remove() | 365 | void OpenEtext::remove() |
366 | { | 366 | { |
367 | title_text = QListBox_1->text( QListBox_1->currentItem() ); | 367 | title_text = QListBox_1->text( QListBox_1->currentItem() ); |
368 | title_text=title_text.stripWhiteSpace(); | 368 | title_text=title_text.stripWhiteSpace(); |
369 | QString msg ="<p>Do you really want to REMOVE\n" + title_text + | 369 | QString msg ="<p>Do you really want to REMOVE\n" + title_text + |
370 | "?\nThis will not delete the file.</P>"; | 370 | "?\nThis will not delete the file.</P>"; |
371 | switch( QMessageBox::information( this, tr("Remove Etext"), | 371 | unsigned short clickVal = |
372 | tr(msg), | 372 | QMessageBox::information( this, tr("Remove Etext"), |
373 | tr("&Yes"), tr("&Cancel"), 0 ) ) | 373 | tr(msg), |
374 | { | 374 | tr("&Yes"), tr("&Cancel"), 0 ); |
375 | case 0: // Yes clicked, | 375 | if ( clickVal == 0 ) { |
376 | removeSelection(); | 376 | // The yes button was clicked |
377 | QListBox_1->clear(); | 377 | removeSelection(); |
378 | getTitles(); | 378 | QListBox_1->clear(); |
379 | break; | 379 | getTitles(); |
380 | case 1: | ||
381 | default: | ||
382 | } | 380 | } |
383 | } | 381 | } |
384 | 382 | ||
385 | /*! | 383 | /*! |
386 | * This removes selected title entry | 384 | * This removes selected title entry |
387 | */ | 385 | */ |
388 | void OpenEtext::removeSelection() | 386 | void OpenEtext::removeSelection() |
389 | { | 387 | { |
390 | Config config("Gutenbrowser"); | 388 | Config config("Gutenbrowser"); |
391 | config.setGroup( "Files" ); | 389 | config.setGroup( "Files" ); |
392 | s_numofFiles = config.readEntry("NumberOfFiles", "0"); | 390 | s_numofFiles = config.readEntry("NumberOfFiles", "0"); |
393 | int rem=0; | 391 | int rem=0; |
394 | int i_numofFiles = s_numofFiles.toInt(); | 392 | int i_numofFiles = s_numofFiles.toInt(); |
395 | QString fileNum2; | 393 | QString fileNum2; |
396 | QString fileNum; | 394 | QString fileNum; |
397 | 395 | ||