-rw-r--r-- | korganizer/komonthview.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4fc447e..2289977 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -204,3 +204,3 @@ void KNoScrollListBox::keyPressEvent(QKeyEvent *e) if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); @@ -245,3 +245,3 @@ void KNoScrollListBox::oneDown() if ( count () ) { - if ( currentItem()+1 == count () ) { + if ( ((uint)currentItem()+1) == count () ) { emit nextCell(); @@ -1294,2 +1294,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) + connect (mContextMenu ,SIGNAL(categoryChanged( Incidence * )),this, + SLOT( catChanged( Incidence * ) )); @@ -1350,2 +1352,6 @@ KOMonthView::~KOMonthView() +void KOMonthView::catChanged( Incidence * ) +{ + updateView(); +} void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int mday ) @@ -1362,3 +1368,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int bool weekview = false; - int index = 0; + uint index = 0; for (uint i = 0; i < mCellsW.count(); ++i) { @@ -1388,3 +1394,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int - int count = (*cells).count(); + uint count = (*cells).count(); bool goLeft = (mday > 1 && index > 0); @@ -1401,3 +1407,3 @@ void KOMonthView::incidenceHighlighted( Incidence * inc , MonthViewCell* mc, int if ( goRight ) { - int right = index + iii; + uint right = index + iii; if ( right < count ) { @@ -1491,3 +1497,3 @@ DateList KOMonthView::selectedDates() } - +#if 0 void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, @@ -1499,3 +1505,3 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd, } - +#endif void KOMonthView::updateConfig() @@ -1585,3 +1591,3 @@ void KOMonthView::showDates(const QDate &start, const QDate &) QPtrVector<KOWeekButton> *weekLabels; - int weekNum = 6; + uint weekNum = 6; mStartDate = start; @@ -1611,3 +1617,2 @@ void KOMonthView::showDates(const QDate &start, const QDate &) } - bool primary = false; uint i; @@ -1681,3 +1686,2 @@ void KOMonthView::updateView() QDateTime dt; - bool ok; QDate endDate = mStartDate.addDays( timeSpan ); @@ -1813,2 +1817,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e) mComputeLayoutTimer->start( 100 ); + KOEventView::resizeEvent( e ); } @@ -1863,3 +1868,2 @@ void KOMonthView::computeLayoutWeek() int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); @@ -1907,3 +1911,4 @@ void KOMonthView::computeLayoutWeek() 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 ) { @@ -1999,3 +2004,2 @@ void KOMonthView::computeLayout() int colWid = wid / daysToShow; - int lastCol = wid - ( colWid*6 ); int dayLabelHei = mDayLabels[0]->sizeHint().height(); @@ -2034,3 +2038,4 @@ void KOMonthView::computeLayout() 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); @@ -2212,3 +2217,3 @@ void KOMonthView::nextCell() { - bool res = focusNextPrevChild ( true ); + focusNextPrevChild ( true ); } |