summaryrefslogtreecommitdiff
path: root/noncore/todayplugins/fortune/fortunepluginwidget.cpp
Unidiff
Diffstat (limited to 'noncore/todayplugins/fortune/fortunepluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
index 3aa978c..c3ee546 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
@@ -23,12 +23,14 @@
23#include <qtl.h> 23#include <qtl.h>
24#include <qstring.h> 24#include <qstring.h>
25#include <qscrollview.h> 25#include <qscrollview.h>
26#include <qobject.h> 26#include <qobject.h>
27#include <qlayout.h> 27#include <qlayout.h>
28 28
29using namespace Opie::Core;
30using namespace Opie::Ui;
29FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) 31FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name )
30 : QWidget( parent, name ) 32 : QWidget( parent, name )
31{ 33{
32 34
33 fortune = NULL; 35 fortune = NULL;
34 getFortune(); 36 getFortune();
@@ -58,14 +60,14 @@ void FortunePluginWidget::getFortune() {
58 fortune->setText( QString("Obtaining fortune...") ); 60 fortune->setText( QString("Obtaining fortune...") );
59 layoutFortune->addWidget( fortune ); 61 layoutFortune->addWidget( fortune );
60 62
61 fortuneProcess = new OProcess(); 63 fortuneProcess = new OProcess();
62 *fortuneProcess << "fortune"; 64 *fortuneProcess << "fortune";
63 65
64 connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), 66 connect(fortuneProcess, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ),
65 this, SLOT(slotStdOut(OProcess*,char*,int) ) ); 67 this, SLOT(slotStdOut(Opie::Core::OProcess*,char*,int) ) );
66 68
67 if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { 69 if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
68 qWarning("could not start :("); 70 qWarning("could not start :(");
69 fortune->setText( QString("Failed to obtain fortune.") ); 71 fortune->setText( QString("Failed to obtain fortune.") );
70 delete fortuneProcess; 72 delete fortuneProcess;
71 fortuneProcess = 0; 73 fortuneProcess = 0;