author | llornkcor <llornkcor> | 2002-11-20 16:53:04 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-20 16:53:04 (UTC) |
commit | 95f1c2be3c6de39935f0b0b8ac19046c5ef29fb5 (patch) (side-by-side diff) | |
tree | 4cc9020584b4c377f7bdf6210f40b6a18c451628 | |
parent | f028217d1bae612e6e88b34f640e4fe4dd020a5a (diff) | |
download | opie-95f1c2be3c6de39935f0b0b8ac19046c5ef29fb5.zip opie-95f1c2be3c6de39935f0b0b8ac19046c5ef29fb5.tar.gz opie-95f1c2be3c6de39935f0b0b8ac19046c5ef29fb5.tar.bz2 |
simpler char * to thread
-rw-r--r-- | noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp index 0d90d0f..5ddf03c 100644 --- a/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp +++ b/noncore/todayplugins/stockticker/stocktickerlib/stocktickerpluginwidget.cpp @@ -41,18 +41,20 @@ extern "C" { #include "stocktickerpluginwidget.h" QString output; OTicker *stocktickerTicker; -void getStocks( const QString *blah) { +void getStocks( const char *blah) { // stocktickerTicker->setText( "Downloading stock data."); stock *stocks_quotes=NULL; stock *stocks_tmp; - qDebug("%s", blah->latin1()); + char *stock_liste = blah; + // char *stock_liste = (char *)blah->latin1(); + qDebug("%s", stock_liste ); QString tempString; output = ""; libstocks_return_code error; Config cfg( "stockticker"); @@ -93,13 +95,12 @@ void getStocks( const QString *blah) { output = tempString; return; // exit(1); } } } - char *stock_liste = (char *)blah->latin1(); // char *stock_liste = (char *)blah; /* Get the stocks and process errors */ error = get_stocks( stock_liste, &stocks_quotes); if (error) { printf("Error in getting stocks (%d)\n", error); @@ -248,13 +249,14 @@ void StockTickerPluginWidget::doStocks() { cfg.setGroup("Timer"); stocktickerTicker->setUpdateTime( cfg.readNumEntry("ScrollSpeed",50)); stocktickerTicker->setScrollLength( cfg.readNumEntry("ScrollLength",10)); if (!symbollist.isEmpty()) { pthread_t thread1; - pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, &symbollist); + char *blah = symbollist.latin1(); + pthread_create(&thread1,NULL, (void * (*)(void *))getStocks, blah); } } void StockTickerPluginWidget::timerEvent( QTimerEvent *e ) { killTimer(e->timerId()); checkConnection(); |