author | drw <drw> | 2004-04-02 21:00:39 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-02 21:00:39 (UTC) |
commit | 8b67cce78d89fdbb5c2a70f257aaef0e8162d767 (patch) (side-by-side diff) | |
tree | 1a897ca501a0ebadcec94af493ff11cb071a2b0a | |
parent | b4d07df7854800fd3613034f54488c6fa27d94ee (diff) | |
download | opie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.zip opie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.tar.gz opie-8b67cce78d89fdbb5c2a70f257aaef0e8162d767.tar.bz2 |
Use ODebug (another 43 down...)
-rw-r--r-- | core/pim/datebook/config.in | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebook.cpp | 10 | ||||
-rw-r--r-- | core/pim/datebook/datebook.pro | 2 | ||||
-rw-r--r-- | core/pim/datebook/datebookweekheaderimpl.cpp | 11 | ||||
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 7 | ||||
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 10 | ||||
-rw-r--r-- | core/pim/datebook/opie-datebook.control | 0 |
7 files changed, 25 insertions, 17 deletions
diff --git a/core/pim/datebook/config.in b/core/pim/datebook/config.in index d1dd44f..4658f3c 100644 --- a/core/pim/datebook/config.in +++ b/core/pim/datebook/config.in @@ -1,4 +1,4 @@ config DATEBOOK boolean "opie-datebook (a datebook/appointment manager)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && LIBOPIE2PIM diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 3934411..3d1bc0c 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -24,33 +24,35 @@ #include "datebook.h" #include "datebookday.h" #include "datebooksettings.h" #include "datebookweek.h" #include "datebookweeklst.h" #include "dateentryimpl.h" +#include <opie2/odebug.h> + #include <qpe/datebookmonth.h> #include <qpe/qpeapplication.h> #include <qpe/config.h> #include <qpe/finddialog.h> #include <qpe/ir.h> #include <qpe/qpemessagebox.h> #include <qpe/resource.h> #include <qpe/sound.h> -#include <qtoolbar.h> #include <qpe/tzselect.h> #include <qaction.h> #include <qcopchannel_qws.h> #include <qlayout.h> #include <qmessagebox.h> #include <qtimer.h> #include <qtl.h> +#include <qtoolbar.h> #include <qwidgetstack.h> #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <unistd.h> #include <stdlib.h> @@ -65,17 +67,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) syncing(FALSE), inSearch(FALSE), alarmCounter(0) { bool needEvilHack= false; // if we need an Evil Hack QTime t; t.start(); db = new DateBookDBHack; - qDebug("loading db t=%d", t.elapsed() ); + Opie::Core::odebug << "loading db t=" << t.elapsed() << oendl; loadSettings(); setCaption( tr("Calendar") ); setIcon( Resource::loadPixmap( "datebook_icon" ) ); setToolBarsMovable( FALSE ); views = new QWidgetStack( this ); setCentralWidget( views ); @@ -169,17 +171,17 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/System", this ); connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); channel = new QCopChannel( "QPE/Datebook", this ); connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); #endif #endif - qDebug("done t=%d", t.elapsed() ); + Opie::Core::odebug << "done t=" << t.elapsed() << oendl; connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); /* * Here is a problem description: * When Weekview is the default view * a DateBookWeekView get's created * redraw() get's called. So what? @@ -895,17 +897,17 @@ void DateBook::setDocument( const QString &filename ) db->addEvent( *it ); } } static const char * beamfile = "/tmp/obex/event.vcs"; void DateBook::beamEvent( const Event &e ) { - qDebug("trying to beamn"); + Opie::Core::odebug << "trying to beam" << oendl; unlink( beamfile ); // delete if exists mkdir("/tmp/obex/", 0755); Event::writeVCalendar( beamfile, e ); Ir *ir = new Ir( this ); connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); QString description = e.description(); ir->send( beamfile, description, "text/x-vCalendar" ); } diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro index bf9a2cc..a79c25c 100644 --- a/core/pim/datebook/datebook.pro +++ b/core/pim/datebook/datebook.pro @@ -30,12 +30,12 @@ INTERFACES = dateentry.ui \ datebookweekheader.ui \ datebookweeklstheader.ui \ datebookweeklstdayhdr.ui \ repeatentrybase.ui \ datebooksettingsbase.ui \ noteentry.ui INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include -LIBS += -lqpe -lopieui2 -lopiecore2 +LIBS += -lqpe -lopieui2 -lopiecore2 -lopiepim2 TARGET = datebook include ( $(OPIEDIR)/include.pro ) diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp index c237b2d..123a478 100644 --- a/core/pim/datebook/datebookweekheaderimpl.cpp +++ b/core/pim/datebook/datebookweekheaderimpl.cpp @@ -14,16 +14,19 @@ ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "datebookweekheaderimpl.h" #include "datebookweek.h" + +#include <opie2/odebug.h> + #include <qpe/resource.h> #include <qpe/datebookmonth.h> #include <qtoolbutton.h> /* * Constructs a DateBookWeekHeader which is a child of 'parent', with the * name 'name' and widget flags set to 'f' @@ -61,32 +64,32 @@ void DateBookWeekHeader::pickDate() } picker->setDate( date.year(), date.month(), date.day() ); m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); picker->setFocus(); } void DateBookWeekHeader::nextMonth() { - qWarning("nextMonth() " ); + Opie::Core::owarn << "nextMonth()" << oendl; setDate(date.addDays(28)); } void DateBookWeekHeader::prevMonth() { - qWarning("prevMonth() " ); + Opie::Core::owarn << "prevMonth()" << oendl; setDate(date.addDays(-28)); } void DateBookWeekHeader::nextWeek() { - qWarning("nextWeek() " ); + Opie::Core::owarn << "nextWeek()" << oendl; setDate(date.addDays(7)); } void DateBookWeekHeader::prevWeek() { - qWarning("prevWeek() "); + Opie::Core::owarn << "prevWeek()" << oendl; setDate(date.addDays(-7)); } void DateBookWeekHeader::setDate( int y, int m, int d ) { setDate(QDate(y,m,d)); } diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index abaf3ea..de74d46 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -1,14 +1,15 @@ #include "namespace_hack.h" #include "datebookweeklst.h" - #include "datebook.h" +#include <opie2/odebug.h> + #include <qpe/datebookmonth.h> #include <qpe/config.h> #include <qpe/resource.h> #include <qlayout.h> #include <qtoolbutton.h> #include <qtl.h> @@ -154,17 +155,17 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig, QWidget* parent, const char* name, WFlags fl ) : OClickableLabel(parent,name,fl), event(ev) { // old values... lastday = "__|__", middle=" |---", Firstday="00:00", QString s,start,middle,end,day; - qDebug("weeklistviewconfig=%d",weeklistviewconfig); + Opie::Core::odebug << "weeklistviewconfig=" << weeklistviewconfig << oendl; if(weeklistviewconfig==NONE) { // No times displayed. // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); // middle.sprintf("<--->"); // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); } else if(weeklistviewconfig==NORMAL) { // "Normal", only display start time. start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); middle.sprintf(" |---"); @@ -203,17 +204,17 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, QWidget* parent, const char* name, WFlags fl) : QWidget( parent, name, fl ) { Config config("DateBook"); config.setGroup("Main"); int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL); - qDebug("Read weeklistviewconfig: %d",weeklistviewconfig); + Opie::Core::odebug << "weeklistviewconfig: " << weeklistviewconfig << oendl; bStartOnMonday=onM; setPalette(white); setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); QVBoxLayout *layout = new QVBoxLayout( this ); qBubbleSort(ev); diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 7b4716f..42bdbe2 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -17,25 +17,27 @@ ** not clear to you. ** **********************************************************************/ #include "namespace_hack.h" #include "dateentryimpl.h" #include "repeatentry.h" +#include <opie2/odebug.h> +#include <opie2/otimepicker.h> + #include <qpe/qpeapplication.h> #include <qpe/categoryselect.h> #include <qpe/datebookmonth.h> #include <qpe/tzselect.h> #include <qlineedit.h> #include <qspinbox.h> -#include <opie2/otimepicker.h> #include "onoteedit.h" #include <stdlib.h> #include <stdio.h> /* * Constructs a DateEntry which is a child of 'parent', with the * name 'name' and widget flags set to 'f' @@ -424,35 +426,35 @@ Event DateEntry::event() endTime.setHMS( 23, 59, 59 ); } // adjust start and end times based on timezone QDateTime start( startDate, startTime ); QDateTime end( endDate, endTime ); time_t start_utc, end_utc; -// qDebug( "tz: %s", timezone->currentZone().latin1() ); +// Opie::Core::odebug << "tz: " << timezone->currentZone() << oendl; // get real timezone QString realTZ; realTZ = QString::fromLocal8Bit( getenv("TZ") ); // set timezone if ( setenv( "TZ", timezone->currentZone(), true ) != 0 ) - qWarning( "There was a problem setting the timezone." ); + Opie::Core::owarn << "There was a problem setting the timezone." << oendl; // convert to UTC based on selected TZ (calling tzset internally) start_utc = TimeConversion::toUTC( start ); end_utc = TimeConversion::toUTC( end ); // done playing around... put it all back unsetenv( "TZ" ); if ( !realTZ.isNull() ) if ( setenv( "TZ", realTZ, true ) != 0 ) - qWarning( "There was a problem setting the timezone." ); + Opie::Core::owarn << "There was a problem setting the timezone." << oendl; // convert UTC to local time (calling tzset internally) ev.setStart( TimeConversion::fromUTC( start_utc ) ); ev.setEnd( TimeConversion::fromUTC( end_utc ) ); // we only have one type of sound at the moment... LOUD!!! if ( comboSound->currentItem() != 0 ) st = Event::Loud; diff --git a/core/pim/datebook/opie-datebook.control b/core/pim/datebook/opie-datebook.control index 730b09d..acf28a7 100644 --- a/core/pim/datebook/opie-datebook.control +++ b/core/pim/datebook/opie-datebook.control |