From 0233482f5f4baf7a0af45229b02c5deaab17a412 Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 02 Jul 2005 17:31:20 +0000 Subject: mv warnings removed --- (limited to 'korganizer/komonthview.cpp') diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4fc447e..2289977 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -202,7 +202,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) break; } if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); } else { setCurrentItem((currentItem()+1)%count()); @@ -243,7 +243,7 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) void KNoScrollListBox::oneDown() { if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); } else { resetOnFocusIn = false; @@ -1292,6 +1292,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) i18n("Journal"),this, SLOT(slotEditJournal()),false); + connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this, + SLOT( catChanged( Incidence * ) )); QString pathString = ""; @@ -1348,6 +1350,10 @@ KOMonthView::~KOMonthView() delete mContextMenu; } +void KOMonthView::catChanged( Incidence * ) +{ + updateView(); +} void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday ) { static Incidence * lastInc = 0; @@ -1360,7 +1366,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int //qDebug("KOMonthView::incidenceHighlighted %d %d %d", inc, mc, mday ); bool weekview = false; - int index = 0; + uint index = 0; for (uint i = 0; i < mCellsW.count(); ++i) { if ( mCellsW[i] == mc ) { weekview = true; @@ -1386,7 +1392,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int if ( ! inc ) return; - int count = (*cells).count(); + uint count = (*cells).count(); bool goLeft = (mday > 1 && index > 0); bool goRight = (mday < 3 && mday > 0 && index < count -1); for (uint iii = 1; iii < count; ++iii) { @@ -1399,7 +1405,7 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int goLeft = false; } if ( goRight ) { - int right = index + iii; + uint right = index + iii; if ( right < count ) { if ( (*cells)[right]->doHighLight(inc) ) goRight = false; @@ -1489,7 +1495,7 @@ DateList KOMonthView::selectedDates() return selected; } - +#if 0 void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td) { @@ -1497,7 +1503,7 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, calPrinter->preview(CalPrinter::Month, fd, td); #endif } - +#endif void KOMonthView::updateConfig() { @@ -1583,7 +1589,7 @@ void KOMonthView::showDates(const QDate &start, const QDate &) QPtrVector *cells; QPtrVector *dayLabels; QPtrVector *weekLabels; - int weekNum = 6; + uint weekNum = 6; mStartDate = start; if ( mShowWeekView ) { weekNum = 1; @@ -1609,7 +1615,6 @@ void KOMonthView::showDates(const QDate &start, const QDate &) while( KOGlobals::self()->calendarSystem()->dayOfWeek(mStartDate) != startWeekDay ) { mStartDate = mStartDate.addDays( -1 ); } - bool primary = false; uint i; for( i = 0; i < (*cells).size(); ++i ) { QDate date = mStartDate.addDays( i ); @@ -1679,7 +1684,6 @@ void KOMonthView::updateView() QPtrList events = calendar()->events(); Event *event; QDateTime dt; - bool ok; QDate endDate = mStartDate.addDays( timeSpan ); for( event = events.first(); event; event = events.next() ) { // for event if ( event->doesRecur() ) { @@ -1811,6 +1815,7 @@ void KOMonthView::resizeEvent(QResizeEvent * e) slotComputeLayout(); } else mComputeLayoutTimer->start( 100 ); + KOEventView::resizeEvent( e ); } void KOMonthView::slotComputeLayout() @@ -1861,7 +1866,6 @@ void KOMonthView::computeLayoutWeek() wid -= weeklabelwid; int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); int colModulo = wid % daysToShow; @@ -1905,7 +1909,8 @@ void KOMonthView::computeLayoutWeek() w = colWid; h = cellHei; int max = 0; - for ( i = 0; i < mCellsW.count(); ++i) { + int w_count = mCellsW.count(); + for ( i = 0; i < w_count; ++i) { if ( i > 6 ) { mCellsW[i]->hide(); continue; @@ -1997,7 +2002,6 @@ void KOMonthView::computeLayout() wid -= weeklabelwid; int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabels[0]->sizeHint().height(); int cellHei = (hei - dayLabelHei) /6; int colModulo = wid % daysToShow; @@ -2032,7 +2036,8 @@ void KOMonthView::computeLayout() w = colWid; h = cellHei ; int max = 0; - for ( i = 0; i < mCells.count(); ++i) { + int mc_count = mCells.count(); + for ( i = 0; i < mc_count; ++i) { //qDebug("iii %d ", i); w = colWid; if ( ((i) % 7) >= 7-colModulo ) { @@ -2210,7 +2215,7 @@ void KOMonthView::keyPressEvent ( QKeyEvent * e ) void KOMonthView::nextCell() { - bool res = focusNextPrevChild ( true ); + focusNextPrevChild ( true ); } void KOMonthView::prevCell() { -- cgit v0.9.0.2