From 42008f6bc88cde6d0ed49187e4c2df14f178d1c0 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 02 Mar 2004 16:46:08 +0000 Subject: Today fortune plugin: libopie -> libopie2 --- (limited to 'noncore/todayplugins/fortune/fortunepluginwidget.cpp') diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp index e6a0d09..3aa978c 100644 --- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp +++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp @@ -16,6 +16,9 @@ #include "fortunepluginwidget.h" +#include +#include + #include #include #include @@ -23,12 +26,6 @@ #include #include -#include -#include - -#include -#include - FortunePluginWidget::FortunePluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { @@ -63,20 +60,20 @@ void FortunePluginWidget::getFortune() { fortuneProcess = new OProcess(); *fortuneProcess << "fortune"; - + connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ), this, SLOT(slotStdOut(OProcess*,char*,int) ) ); - + if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start :("); fortune->setText( QString("Failed to obtain fortune.") ); delete fortuneProcess; fortuneProcess = 0; } - + } -void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len ) +void FortunePluginWidget::slotStdOut( OProcess* /*proc*/, char* buf, int len ) { QCString s( buf, len ); s.replace( QRegExp("\n"), "" ); -- cgit v0.9.0.2