-rw-r--r-- | library/qpedecoration_qws.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp index 7842ebd..8b02de6 100644 --- a/library/qpedecoration_qws.cpp +++ b/library/qpedecoration_qws.cpp | |||
@@ -491,97 +491,97 @@ static QString libname; | |||
491 | bool QPEDecoration::helpExists() const | 491 | bool QPEDecoration::helpExists() const |
492 | { | 492 | { |
493 | if ( helpFile.isNull() ) { | 493 | if ( helpFile.isNull() ) { |
494 | QStringList helpPath = Global::helpPath(); | 494 | QStringList helpPath = Global::helpPath(); |
495 | QString hf = QString(qApp->argv()[0]) + ".html"; | 495 | QString hf = QString(qApp->argv()[0]) + ".html"; |
496 | bool he = FALSE; | 496 | bool he = FALSE; |
497 | for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !he; ++it) | 497 | for (QStringList::ConstIterator it=helpPath.begin(); it!=helpPath.end() && !he; ++it) |
498 | he = QFile::exists( *it + "/" + hf ); | 498 | he = QFile::exists( *it + "/" + hf ); |
499 | ((QPEDecoration*)this)->helpFile = hf; | 499 | ((QPEDecoration*)this)->helpFile = hf; |
500 | ((QPEDecoration*)this)->helpexists = he; | 500 | ((QPEDecoration*)this)->helpexists = he; |
501 | return he; | 501 | return he; |
502 | } | 502 | } |
503 | return helpexists; | 503 | return helpexists; |
504 | } | 504 | } |
505 | 505 | ||
506 | QPEDecoration::QPEDecoration() | 506 | QPEDecoration::QPEDecoration() |
507 | : QWSDefaultDecoration() | 507 | : QWSDefaultDecoration() |
508 | { | 508 | { |
509 | if ( wdlib ) { | 509 | if ( wdlib ) { |
510 | delete wdlib; | 510 | delete wdlib; |
511 | wdlib = 0; | 511 | wdlib = 0; |
512 | } else { | 512 | } else { |
513 | delete wdiface; | 513 | delete wdiface; |
514 | } | 514 | } |
515 | wdiface = new DefaultWindowDecoration; | 515 | wdiface = new DefaultWindowDecoration; |
516 | 516 | ||
517 | helpexists = FALSE; // We don't know (flagged by helpFile being null) | 517 | helpexists = FALSE; // We don't know (flagged by helpFile being null) |
518 | qpeManager = new QPEManager( this ); | 518 | qpeManager = new QPEManager( this ); |
519 | imageOk = Resource::loadImage( "OKButton" ); | 519 | imageOk = Resource::loadImage( "OKButton" ); |
520 | imageClose = Resource::loadImage( "CloseButton" ); | 520 | imageClose = Resource::loadImage( "CloseButton" ); |
521 | imageHelp = Resource::loadImage( "HelpButton" ); | 521 | imageHelp = Resource::loadImage( "HelpButton" ); |
522 | } | 522 | } |
523 | 523 | ||
524 | QPEDecoration::QPEDecoration( const QString &plugin ) | 524 | QPEDecoration::QPEDecoration( const QString &plugin ) |
525 | : QWSDefaultDecoration() | 525 | : QWSDefaultDecoration() |
526 | { | 526 | { |
527 | libname = plugin; | 527 | libname = plugin; |
528 | 528 | ||
529 | if ( wdlib ) { | 529 | if ( wdlib ) { |
530 | wdiface->release(); | 530 | wdiface->release(); |
531 | wdlib->unload(); | 531 | wdlib->unload(); |
532 | delete wdlib; | 532 | delete wdlib; |
533 | wdlib = 0; | 533 | wdlib = 0; |
534 | } else { | 534 | } else { |
535 | delete wdiface; | 535 | delete wdiface; |
536 | } | 536 | } |
537 | 537 | ||
538 | WindowDecorationInterface *iface = 0; | 538 | WindowDecorationInterface *iface = 0; |
539 | QString path = QPEApplication::qpeDir() + "/plugins/decorations/"; | 539 | QString path = QPEApplication::qpeDir() + "plugins/decorations/"; |
540 | 540 | ||
541 | #ifdef Q_OS_MACX | 541 | #ifdef Q_OS_MACX |
542 | if ( plugin.find( ".dylib" ) > 0 ) { | 542 | if ( plugin.find( ".dylib" ) > 0 ) { |
543 | #else | 543 | #else |
544 | if ( plugin.find( ".so" ) > 0 ) { | 544 | if ( plugin.find( ".so" ) > 0 ) { |
545 | #endif | 545 | #endif |
546 | // full library name supplied | 546 | // full library name supplied |
547 | path += plugin; | 547 | path += plugin; |
548 | } else { | 548 | } else { |
549 | #ifdef Q_OS_MACX | 549 | #ifdef Q_OS_MACX |
550 | path += "lib" + plugin.lower() + ".dylib"; // compatibility | 550 | path += "lib" + plugin.lower() + ".dylib"; // compatibility |
551 | #else | 551 | #else |
552 | path += "lib" + plugin.lower() + ".so"; // compatibility | 552 | path += "lib" + plugin.lower() + ".so"; // compatibility |
553 | #endif | 553 | #endif |
554 | } | 554 | } |
555 | 555 | ||
556 | QLibrary *lib = new QLibrary( path ); | 556 | QLibrary *lib = new QLibrary( path ); |
557 | if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { | 557 | if ( lib->queryInterface( IID_WindowDecoration, (QUnknownInterface**)&iface ) == QS_OK && iface ) { |
558 | wdiface = iface; | 558 | wdiface = iface; |
559 | wdlib = lib; | 559 | wdlib = lib; |
560 | } else { | 560 | } else { |
561 | delete lib; | 561 | delete lib; |
562 | wdiface = new DefaultWindowDecoration; | 562 | wdiface = new DefaultWindowDecoration; |
563 | } | 563 | } |
564 | 564 | ||
565 | 565 | ||
566 | 566 | ||
567 | helpexists = FALSE; // We don't know (flagged by helpFile being null) | 567 | helpexists = FALSE; // We don't know (flagged by helpFile being null) |
568 | qpeManager = new QPEManager( this ); | 568 | qpeManager = new QPEManager( this ); |
569 | } | 569 | } |
570 | 570 | ||
571 | QPEDecoration::~QPEDecoration() | 571 | QPEDecoration::~QPEDecoration() |
572 | { | 572 | { |
573 | delete qpeManager; | 573 | delete qpeManager; |
574 | } | 574 | } |
575 | 575 | ||
576 | const char **QPEDecoration::menuPixmap() | 576 | const char **QPEDecoration::menuPixmap() |
577 | { | 577 | { |
578 | return (const char **)0; | 578 | return (const char **)0; |
579 | } | 579 | } |
580 | 580 | ||
581 | const char **QPEDecoration::closePixmap() | 581 | const char **QPEDecoration::closePixmap() |
582 | { | 582 | { |
583 | return (const char **)qpe_close_xpm; | 583 | return (const char **)qpe_close_xpm; |
584 | } | 584 | } |
585 | 585 | ||
586 | const char **QPEDecoration::minimizePixmap() | 586 | const char **QPEDecoration::minimizePixmap() |
587 | { | 587 | { |