summaryrefslogtreecommitdiff
path: root/library/applnk.cpp
Unidiff
Diffstat (limited to 'library/applnk.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index c82d3b9..874a1b6 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -664,51 +664,53 @@ AppLnk::~AppLnk()
664 664
665/*! 665/*!
666 \overload 666 \overload
667 Executes the application associated with this AppLnk. 667 Executes the application associated with this AppLnk.
668 668
669 \sa exec() 669 \sa exec()
670*/ 670*/
671void AppLnk::execute() const 671void AppLnk::execute() const
672{ 672{
673 execute( QStringList::split( ' ', property( "Arguments" ) ) ); 673 execute( QStringList::split( ' ', property( "Arguments" ) ) );
674} 674}
675 675
676/*! 676/*!
677 Executes the application associated with this AppLnk, with 677 Executes the application associated with this AppLnk, with
678 \a args as arguments. 678 \a args as arguments.
679 679
680 \sa exec() 680 \sa exec()
681*/ 681*/
682void AppLnk::execute(const QStringList& args) const 682void AppLnk::execute(const QStringList& args) const
683{ 683{
684#ifdef Q_WS_QWS 684#ifdef Q_WS_QWS
685 if ( !mRotation.isEmpty() ) { 685 if ( !mRotation.isEmpty() ) {
686 // ######## this will only work in the server 686 // ######## this will only work in the server
687 int rot = QPEApplication::defaultRotation(); 687 int rot = QPEApplication::defaultRotation();
688 int j = 0;
688 rot = (rot+mRotation.toInt())%360; 689 rot = (rot+mRotation.toInt())%360;
689 QCString old = getenv("QWS_DISPLAY"); 690 QCString old = getenv( "QWS_DISPLAY" ) ? getenv( "QWS_DISPLAY" ) : "Transformed";
690 setenv("QWS_DISPLAY", QString("Transformed:Rot%1:0").arg(rot), 1); 691 QString driver( old.left( ( ( j = old.find( ':' ) ) >= 0 ) ? j : old.size() ).data() );
692 setenv( "QWS_DISPLAY", QString( "%1:Rot%2:0" ).arg( driver ).arg( rot ), 1 );
691 invoke(args); 693 invoke(args);
692 setenv("QWS_DISPLAY", old.data(), 1); 694 setenv("QWS_DISPLAY", old.data(), 1);
693 } else 695 } else
694#endif 696#endif
695 invoke(args); 697 invoke(args);
696} 698}
697 699
698/*! 700/*!
699 Invokes the application associated with this AppLnk, with 701 Invokes the application associated with this AppLnk, with
700 \a args as arguments. Rotation is not taken into account by 702 \a args as arguments. Rotation is not taken into account by
701 this function, so you should not call it directly. 703 this function, so you should not call it directly.
702 704
703 \sa execute() 705 \sa execute()
704*/ 706*/
705void AppLnk::invoke(const QStringList& args) const 707void AppLnk::invoke(const QStringList& args) const
706{ 708{
707 if ( property( "Arguments" ).isEmpty() ) 709 if ( property( "Arguments" ).isEmpty() )
708 Global::execute( exec(), args[0] ); 710 Global::execute( exec(), args[0] );
709 else 711 else
710 Global::execute( exec(), args.join( " " ) ); 712 Global::execute( exec(), args.join( " " ) );
711} 713}
712 714
713/*! 715/*!
714 Sets the Exec property to \a exec. 716 Sets the Exec property to \a exec.