summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index f0642c4..d552928 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -25,12 +25,13 @@
Boston, MA 02111-1307, USA.
*/
#include <unistd.h>
+#include <opie2/odebug.h>
#include <opie2/opimrecurrence.h>
#include <opie2/opimnotifymanager.h>
#include <opie2/otodoaccessvcal.h>
#include <opie2/oapplicationfactory.h>
#include <qpe/applnk.h>
@@ -292,13 +293,13 @@ QPopupMenu* MainWindow::contextMenu( int , bool recur ) {
; // FIXME
}
return menu;
}
QPopupMenu* MainWindow::options() {
- qWarning("Options");
+ Opie::Core::owarn << "Options" << oendl;
return m_options;
}
QPopupMenu* MainWindow::edit() {
return m_edit;
}
QToolBar* MainWindow::toolbar() {
@@ -311,13 +312,13 @@ OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) {
int cat = 0;
if ( m_curCat != QWidget::tr("All Categories") )
cat = currentCatId();
if ( m_curCat == QWidget::tr("Unfiled") )
cat = -1;
- qWarning(" Category %d %s", cat, m_curCat.latin1() );
+ Opie::Core::owarn << " Category " << cat << " " << m_curCat << oendl;
int filter = 1;
if (!m_completed )
filter |= 4;
if (m_overdue)
@@ -370,13 +371,13 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
if (m_syncing ) {
e->accept();
return;
}
bool quit = false;
if ( m_todoMgr.saveAll() ){
- qWarning("saved");
+ Opie::Core::owarn << "saved" << oendl;
quit = true;
}else {
if ( QMessageBox::critical( this, QWidget::tr("Out of space"),
QWidget::tr("Todo was unable\n"
"to save your changes.\n"
"Free up some space\n"
@@ -533,13 +534,13 @@ void MainWindow::slotEdit() {
* set the category
*/
void MainWindow::setCategory( int c) {
if ( c <= 0 ) return;
- qWarning("Iterating over cats %d", c );
+ Opie::Core::owarn << "Iterating over cats " << c << oendl;
for ( unsigned int i = 1; i < m_catMenu->count(); i++ )
m_catMenu->setItemChecked(i, c == (int)i );
if (c == 1 ) {
m_curCat = QString::null;
setCaption( QWidget::tr("Todo") + " - " + QWidget::tr("All Categories" ) );
@@ -677,13 +678,13 @@ void MainWindow::slotShowDue(bool ov) {
m_overdue = ov;
currentView()->showOverDue( ov );
raiseCurrentView();
}
void MainWindow::slotShow( int uid ) {
if ( uid == 0 ) return;
- qWarning("slotShow");
+ Opie::Core::owarn << "slotShow" << oendl;
currentShow()->slotShow( event( uid ) );
m_stack->raiseWidget( currentShow()->widget() );
}
void MainWindow::slotShowNext() {
int l = currentView()->next();
if (l!=0)
@@ -736,13 +737,13 @@ void MainWindow::updateList() {
}
void MainWindow::setReadAhead( uint count ) {
if (m_todoMgr.todoDB() )
m_todoMgr.todoDB()->setReadAhead( count );
}
void MainWindow::slotQuickEntered() {
- qWarning("entered");
+ Opie::Core::owarn << "entered" << oendl;
OPimTodo todo = quickEditor()->todo();
if (todo.isEmpty() )
return;
m_todoMgr.add( todo );
currentView()->addEvent( todo );
@@ -783,13 +784,13 @@ void MainWindow::slotComplete( const OPimTodo& todo ) {
* if there is a next occurence
* from the duedate of the last recurrance
*/
QDate date;
if ( to2.recurrence().nextOcurrence( to2.dueDate().addDays(1), date ) ) {
int dayDiff = to.dueDate().daysTo( date );
- qWarning("day diff is %d", dayDiff );
+ Opie::Core::owarn << "day diff is " << dayDiff << oendl;
QDate inval;
/* generate a new uid for the old record */
to.setUid( 1 );
/* add the old one cause it has a new UID here cause it was spin off */
m_todoMgr.add( to );
@@ -946,21 +947,21 @@ namespace {
}
return nonMatching;
}
void addAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
OPimNotifyManager::Alarms::ConstIterator it;
for ( it = als.begin(); it != als.end(); ++it ) {
- qWarning("Adding alarm for %s", (*it).dateTime().toString().latin1() );
+ Opie::Core::owarn << "Adding alarm for " << (*it).dateTime().toString() << oendl;
AlarmServer::addAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
}
}
void removeAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
OPimNotifyManager::Alarms::ConstIterator it;
for ( it = als.begin(); it != als.end(); ++it ) {
- qWarning("Removinf alarm for %s", (*it).dateTime().toString().latin1() );
+ Opie::Core::owarn << "Removinf alarm for " << (*it).dateTime().toString() << oendl;
AlarmServer::deleteAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
}
}
}
void MainWindow::handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo) {