From 08c114346fdbed60b2cd452d391dff243b98a984 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Wed, 26 Apr 2006 21:32:31 +0000 Subject: [PATCH] less qt3_support svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=534332 --- extdate/extdatepicker.cpp | 11 +++++++---- kdeeducore/keduvowqlreader.cpp | 3 ++- kdeeducore/keduvowqlwriter.cpp | 3 ++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/extdate/extdatepicker.cpp b/extdate/extdatepicker.cpp index 0d43772..815036d 100644 --- a/extdate/extdatepicker.cpp +++ b/extdate/extdatepicker.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -87,7 +88,7 @@ void ExtDatePicker::fillWeeksCombo(const ExtDate &date) int year = 0; QString week = i18n("Week %1", d->calendar->weekNumber(day, &year)); if ( year != date.year() ) week += "*"; // show that this is a week from a different year - d->selectWeek->insertItem(week); + d->selectWeek->addItem(week); } } @@ -111,7 +112,8 @@ void ExtDatePicker::init( const ExtDate &dt ) QBoxLayout * topLayout = new QVBoxLayout(this); - d->navigationLayout = new QHBoxLayout(topLayout); + d->navigationLayout = new QHBoxLayout(); + topLayout->addLayout(d->navigationLayout); d->navigationLayout->addStretch(); yearBackward = new QToolButton(this); yearBackward->setAutoRaise(true); @@ -195,7 +197,8 @@ void ExtDatePicker::init( const ExtDate &dt ) topLayout->addWidget(table); - QBoxLayout * bottomLayout = new QHBoxLayout(topLayout); + QBoxLayout * bottomLayout = new QHBoxLayout(); + topLayout->addLayout(bottomLayout); bottomLayout->addWidget(d->todayButton); bottomLayout->addWidget(line); bottomLayout->addWidget(d->selectWeek); @@ -515,7 +518,7 @@ ExtDatePicker::setCloseButton( bool enable ) d->navigationLayout->addSpacing(KDialog::spacingHint()); d->navigationLayout->addWidget(d->closeButton); d->closeButton->setToolTip(i18n("Close")); - d->closeButton->setPixmap( SmallIcon("remove") ); + d->closeButton->setIcon( SmallIconSet("remove") ); connect( d->closeButton, SIGNAL( clicked() ), topLevelWidget(), SLOT( close() ) ); } diff --git a/kdeeducore/keduvowqlreader.cpp b/kdeeducore/keduvowqlreader.cpp index d5e5c96..51a0bf7 100644 --- a/kdeeducore/keduvowqlreader.cpp +++ b/kdeeducore/keduvowqlreader.cpp @@ -41,7 +41,8 @@ bool KEduVocWqlReader::readDoc(KEduVocDocument *doc) m_doc = doc; QTextStream inputStream(m_inputFile); - inputStream.setEncoding(QTextStream::Latin1); + inputStream.setCodec("ISO-8851-1"); + inputStream.setAutoDetectUnicode(false); QString s = ""; s=inputStream.readLine(); diff --git a/kdeeducore/keduvowqlwriter.cpp b/kdeeducore/keduvowqlwriter.cpp index 15854e4..842ae77 100644 --- a/kdeeducore/keduvowqlwriter.cpp +++ b/kdeeducore/keduvowqlwriter.cpp @@ -41,7 +41,8 @@ bool KEduVocWqlWriter::writeDoc(KEduVocDocument *doc) m_doc = doc; m_outputStream.setDevice(m_outputFile); - m_outputStream.setEncoding(QTextStream::Latin1); + m_outputStream.setCodec("ISO-8851-1"); + m_outputStream.setAutoDetectUnicode(false); m_outputStream << "WordQuiz" << winendl; m_outputStream << "5.9.0" << winendl << winendl; -- 2.47.3