summaryrefslogtreecommitdiffabout
path: root/microkde/kdatepickernew.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kdatepickernew.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdatepickernew.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/microkde/kdatepickernew.cpp b/microkde/kdatepickernew.cpp
index f60a422..8f8001e 100644
--- a/microkde/kdatepickernew.cpp
+++ b/microkde/kdatepickernew.cpp
@@ -292,49 +292,49 @@ KDatePicker::weekSelected(int week)
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
QDate date = table->getDate();
int year = calendar->year(date);
calendar->setYMD(date, year, 1, 1);
date = calendar->addDays(date, -7);
while (calendar->weekNumber(date) != 1)
date = calendar->addDays(date, 1);
// date is now first day in week 1 some day in week 1
date = calendar->addDays(date, (week - calendar->weekNumber(date)) * 7);
setDate(date);
}
void
KDatePicker::selectMonthClicked()
{
// every year can have different month names (in some calendar systems)
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
QDate date = table->getDate();
int i, month, months = calendar->monthsInYear(date);
- QPopupMenu popup(selectMonth);
+ Q3PopupMenu popup(selectMonth);
for (i = 1; i <= months; i++)
popup.insertItem(calendar->monthName(i, calendar->year(date)), i);
popup.setActiveItem(calendar->month(date) - 1);
if ( (month = popup.exec(selectMonth->mapToGlobal(QPoint(0, 0)), calendar->month(date) - 1)) == -1 ) return; // canceled
int day = calendar->day(date);
// ----- construct a valid date in this month:
//date.setYMD(date.year(), month, 1);
//date.setYMD(date.year(), month, QMIN(day, date.daysInMonth()));
calendar->setYMD(date, calendar->year(date), month,
QMIN(day, calendar->daysInMonth(date)));
// ----- set this month
setDate(date);
}
void
KDatePicker::selectYearClicked()
{
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
int year;