author | zecke <zecke> | 2004-07-17 17:48:36 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 17:48:36 (UTC) |
commit | 0f64024dc631d9043d2f6f4f6bcafaac7eddd545 (patch) (unidiff) | |
tree | 1919517cd70c2b74caeee24cccb0ac239b867b74 | |
parent | 8cc200a72b547bb7e313cfa197c72f91dfe0c759 (diff) | |
download | opie-0f64024dc631d9043d2f6f4f6bcafaac7eddd545.zip opie-0f64024dc631d9043d2f6f4f6bcafaac7eddd545.tar.gz opie-0f64024dc631d9043d2f6f4f6bcafaac7eddd545.tar.bz2 |
Fix compiler warning about unused variable
-rw-r--r-- | core/launcher/launcher.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index aa357ca..010a2e9 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -514,193 +514,193 @@ Launcher::~Launcher() | |||
514 | return cfg.readBoolEntry( "Enable", true ); | 514 | return cfg.readBoolEntry( "Enable", true ); |
515 | } | 515 | } |
516 | 516 | ||
517 | void Launcher::makeVisible() | 517 | void Launcher::makeVisible() |
518 | { | 518 | { |
519 | showMaximized(); | 519 | showMaximized(); |
520 | } | 520 | } |
521 | 521 | ||
522 | void Launcher::destroyGUI() | 522 | void Launcher::destroyGUI() |
523 | { | 523 | { |
524 | delete tb; | 524 | delete tb; |
525 | tb = 0; | 525 | tb = 0; |
526 | delete tabs; | 526 | delete tabs; |
527 | tabs =0; | 527 | tabs =0; |
528 | } | 528 | } |
529 | 529 | ||
530 | bool Launcher::eventFilter( QObject*, QEvent *ev ) | 530 | bool Launcher::eventFilter( QObject*, QEvent *ev ) |
531 | { | 531 | { |
532 | #ifdef QT_QWS_CUSTOM | 532 | #ifdef QT_QWS_CUSTOM |
533 | if ( ev->type() == QEvent::KeyPress ) { | 533 | if ( ev->type() == QEvent::KeyPress ) { |
534 | QKeyEvent *ke = (QKeyEvent *)ev; | 534 | QKeyEvent *ke = (QKeyEvent *)ev; |
535 | if ( ke->key() == Qt::Key_F11 ) { // menu key | 535 | if ( ke->key() == Qt::Key_F11 ) { // menu key |
536 | QWidget *active = qApp->activeWindow(); | 536 | QWidget *active = qApp->activeWindow(); |
537 | if ( active && active->isPopup() ) | 537 | if ( active && active->isPopup() ) |
538 | active->close(); | 538 | active->close(); |
539 | else { | 539 | else { |
540 | Global::terminateBuiltin("calibrate"); // No tr | 540 | Global::terminateBuiltin("calibrate"); // No tr |
541 | tb->launchStartMenu(); | 541 | tb->launchStartMenu(); |
542 | } | 542 | } |
543 | return TRUE; | 543 | return TRUE; |
544 | } | 544 | } |
545 | } | 545 | } |
546 | #else | 546 | #else |
547 | Q_UNUSED(ev); | 547 | Q_UNUSED(ev); |
548 | #endif | 548 | #endif |
549 | return FALSE; | 549 | return FALSE; |
550 | } | 550 | } |
551 | 551 | ||
552 | static bool isVisibleWindow(int wid) | 552 | static bool isVisibleWindow(int wid) |
553 | { | 553 | { |
554 | #ifdef Q_WS_QWS | 554 | #ifdef Q_WS_QWS |
555 | const QList<QWSWindow> &list = qwsServer->clientWindows(); | 555 | const QList<QWSWindow> &list = qwsServer->clientWindows(); |
556 | QWSWindow* w; | 556 | QWSWindow* w; |
557 | for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { | 557 | for (QListIterator<QWSWindow> it(list); (w=it.current()); ++it) { |
558 | if ( w->winId() == wid ) | 558 | if ( w->winId() == wid ) |
559 | return !w->isFullyObscured(); | 559 | return !w->isFullyObscured(); |
560 | } | 560 | } |
561 | #endif | 561 | #endif |
562 | return FALSE; | 562 | return FALSE; |
563 | } | 563 | } |
564 | 564 | ||
565 | void Launcher::viewSelected(const QString& s) | 565 | void Launcher::viewSelected(const QString& s) |
566 | { | 566 | { |
567 | setCaption( s + tr(" - Launcher") ); | 567 | setCaption( s + tr(" - Launcher") ); |
568 | } | 568 | } |
569 | 569 | ||
570 | void Launcher::showTab(const QString& id) | 570 | void Launcher::showTab(const QString& id) |
571 | { | 571 | { |
572 | tabs->categoryBar->showTab(id); | 572 | tabs->categoryBar->showTab(id); |
573 | raise(); | 573 | raise(); |
574 | } | 574 | } |
575 | 575 | ||
576 | void Launcher::select( const AppLnk *appLnk ) | 576 | void Launcher::select( const AppLnk *appLnk ) |
577 | { | 577 | { |
578 | if ( appLnk->type() == "Folder" ) { // No tr | 578 | if ( appLnk->type() == "Folder" ) { // No tr |
579 | // Not supported: flat is simpler for the user | 579 | // Not supported: flat is simpler for the user |
580 | } else { | 580 | } else { |
581 | if ( appLnk->exec().isNull() ) { | 581 | if ( appLnk->exec().isNull() ) { |
582 | int i = QMessageBox::information(this,tr("No application"), | 582 | int i = QMessageBox::information(this,tr("No application"), |
583 | tr("<p>No application is defined for this document." | 583 | tr("<p>No application is defined for this document." |
584 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); | 584 | "<p>Type is %1.").arg(appLnk->type()), tr("OK"), tr("View as text"), 0, 0, 1); |
585 | 585 | ||
586 | /* ### Fixme */ | 586 | /* ### Fixme */ |
587 | if ( i == 1 ) | 587 | if ( i == 1 ) |
588 | Global::execute("textedit",appLnk->file()); | 588 | Global::execute("textedit",appLnk->file()); |
589 | 589 | ||
590 | return; | 590 | return; |
591 | } | 591 | } |
592 | tabs->setBusy(TRUE); | 592 | tabs->setBusy(TRUE); |
593 | emit executing( appLnk ); | 593 | emit executing( appLnk ); |
594 | appLnk->execute(); | 594 | appLnk->execute(); |
595 | } | 595 | } |
596 | } | 596 | } |
597 | 597 | ||
598 | void Launcher::properties( AppLnk *appLnk ) | 598 | void Launcher::properties( AppLnk *appLnk ) |
599 | { | 599 | { |
600 | if ( appLnk->type() == "Folder" ) { // No tr | 600 | if ( appLnk->type() == "Folder" ) { // No tr |
601 | // Not supported: flat is simpler for the user | 601 | // Not supported: flat is simpler for the user |
602 | } else { | 602 | } else { |
603 | /* ### libqtopia FIXME also moving docLnks... */ | 603 | /* ### libqtopia FIXME also moving docLnks... */ |
604 | LnkProperties prop(appLnk,0 ); | 604 | LnkProperties prop(appLnk,0 ); |
605 | 605 | ||
606 | QPEApplication::execDialog( &prop ); | 606 | QPEApplication::execDialog( &prop ); |
607 | } | 607 | } |
608 | } | 608 | } |
609 | 609 | ||
610 | void Launcher::storageChanged( const QList<FileSystem> &fs ) | 610 | void Launcher::storageChanged( const QList<FileSystem> & ) |
611 | { | 611 | { |
612 | // ### update combo boxes if we had a combo box for the storage type | 612 | // ### update combo boxes if we had a combo box for the storage type |
613 | } | 613 | } |
614 | 614 | ||
615 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) | 615 | void Launcher::systemMessage( const QCString &msg, const QByteArray &data) |
616 | { | 616 | { |
617 | QDataStream stream( data, IO_ReadOnly ); | 617 | QDataStream stream( data, IO_ReadOnly ); |
618 | if ( msg == "busy()" ) { | 618 | if ( msg == "busy()" ) { |
619 | tb->startWait(); | 619 | tb->startWait(); |
620 | } else if ( msg == "notBusy(QString)" ) { | 620 | } else if ( msg == "notBusy(QString)" ) { |
621 | QString app; | 621 | QString app; |
622 | stream >> app; | 622 | stream >> app; |
623 | tabs->setBusy(FALSE); | 623 | tabs->setBusy(FALSE); |
624 | tb->stopWait(app); | 624 | tb->stopWait(app); |
625 | } else if (msg == "applyStyle()") { | 625 | } else if (msg == "applyStyle()") { |
626 | tabs->currentView()->relayout(); | 626 | tabs->currentView()->relayout(); |
627 | } | 627 | } |
628 | } | 628 | } |
629 | 629 | ||
630 | // These are the update functions from the server | 630 | // These are the update functions from the server |
631 | void Launcher::typeAdded( const QString& type, const QString& name, | 631 | void Launcher::typeAdded( const QString& type, const QString& name, |
632 | const QPixmap& pixmap, const QPixmap& ) | 632 | const QPixmap& pixmap, const QPixmap& ) |
633 | { | 633 | { |
634 | tabs->newView( type, pixmap, name ); | 634 | tabs->newView( type, pixmap, name ); |
635 | ids.append( type ); | 635 | ids.append( type ); |
636 | /* this will be called in applicationScanningProgress with value 100! */ | 636 | /* this will be called in applicationScanningProgress with value 100! */ |
637 | // tb->refreshStartMenu(); | 637 | // tb->refreshStartMenu(); |
638 | 638 | ||
639 | static bool first = TRUE; | 639 | static bool first = TRUE; |
640 | if ( first ) { | 640 | if ( first ) { |
641 | first = FALSE; | 641 | first = FALSE; |
642 | tabs->categoryBar->showTab(type); | 642 | tabs->categoryBar->showTab(type); |
643 | } | 643 | } |
644 | 644 | ||
645 | tabs->view( type )->setUpdatesEnabled( FALSE ); | 645 | tabs->view( type )->setUpdatesEnabled( FALSE ); |
646 | tabs->view( type )->setSortEnabled( FALSE ); | 646 | tabs->view( type )->setSortEnabled( FALSE ); |
647 | } | 647 | } |
648 | 648 | ||
649 | void Launcher::typeRemoved( const QString& type ) | 649 | void Launcher::typeRemoved( const QString& type ) |
650 | { | 650 | { |
651 | tabs->view( type )->removeAllItems(); | 651 | tabs->view( type )->removeAllItems(); |
652 | tabs->deleteView( type ); | 652 | tabs->deleteView( type ); |
653 | ids.remove( type ); | 653 | ids.remove( type ); |
654 | /* this will be called in applicationScanningProgress with value 100! */ | 654 | /* this will be called in applicationScanningProgress with value 100! */ |
655 | // tb->refreshStartMenu(); | 655 | // tb->refreshStartMenu(); |
656 | } | 656 | } |
657 | 657 | ||
658 | void Launcher::applicationAdded( const QString& type, const AppLnk& app ) | 658 | void Launcher::applicationAdded( const QString& type, const AppLnk& app ) |
659 | { | 659 | { |
660 | if ( app.type() == "Separator" ) // No tr | 660 | if ( app.type() == "Separator" ) // No tr |
661 | return; | 661 | return; |
662 | 662 | ||
663 | LauncherView *view = tabs->view( type ); | 663 | LauncherView *view = tabs->view( type ); |
664 | if ( view ) | 664 | if ( view ) |
665 | view->addItem( new AppLnk( app ), FALSE ); | 665 | view->addItem( new AppLnk( app ), FALSE ); |
666 | else | 666 | else |
667 | owarn << "addAppLnk: No view for type " << type.latin1() << ". Can't add app " | 667 | owarn << "addAppLnk: No view for type " << type.latin1() << ". Can't add app " |
668 | << app.name().latin1() << "!", | 668 | << app.name().latin1() << "!", |
669 | 669 | ||
670 | MimeType::registerApp( app ); | 670 | MimeType::registerApp( app ); |
671 | } | 671 | } |
672 | 672 | ||
673 | void Launcher::applicationRemoved( const QString& type, const AppLnk& app ) | 673 | void Launcher::applicationRemoved( const QString& type, const AppLnk& app ) |
674 | { | 674 | { |
675 | LauncherView *view = tabs->view( type ); | 675 | LauncherView *view = tabs->view( type ); |
676 | if ( view ) | 676 | if ( view ) |
677 | view->removeLink( app.linkFile() ); | 677 | view->removeLink( app.linkFile() ); |
678 | else | 678 | else |
679 | owarn << "removeAppLnk: No view for " << type << "!" << oendl; | 679 | owarn << "removeAppLnk: No view for " << type << "!" << oendl; |
680 | } | 680 | } |
681 | 681 | ||
682 | void Launcher::allApplicationsRemoved() | 682 | void Launcher::allApplicationsRemoved() |
683 | { | 683 | { |
684 | MimeType::clear(); | 684 | MimeType::clear(); |
685 | for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) | 685 | for ( QStringList::ConstIterator it=ids.begin(); it!= ids.end(); ++it) |
686 | tabs->view( (*it) )->removeAllItems(); | 686 | tabs->view( (*it) )->removeAllItems(); |
687 | } | 687 | } |
688 | 688 | ||
689 | void Launcher::documentAdded( const DocLnk& doc ) | 689 | void Launcher::documentAdded( const DocLnk& doc ) |
690 | { | 690 | { |
691 | tabs->docView()->addItem( new DocLnk( doc ), FALSE ); | 691 | tabs->docView()->addItem( new DocLnk( doc ), FALSE ); |
692 | } | 692 | } |
693 | 693 | ||
694 | void Launcher::aboutToAddBegin() | 694 | void Launcher::aboutToAddBegin() |
695 | { | 695 | { |
696 | tabs->docView()->setUpdatesEnabled( false ); | 696 | tabs->docView()->setUpdatesEnabled( false ); |
697 | } | 697 | } |
698 | 698 | ||
699 | void Launcher::aboutToAddEnd() | 699 | void Launcher::aboutToAddEnd() |
700 | { | 700 | { |
701 | tabs->docView()->setUpdatesEnabled( true ); | 701 | tabs->docView()->setUpdatesEnabled( true ); |
702 | } | 702 | } |
703 | 703 | ||
704 | void Launcher::showLoadingDocs() | 704 | void Launcher::showLoadingDocs() |
705 | { | 705 | { |
706 | tabs->docView()->hide(); | 706 | tabs->docView()->hide(); |