]> Git trees. - libqmvoc.git/commitdiff
less qt3_support
authorPino Toscano <pino@kde.org>
Wed, 26 Apr 2006 21:32:31 +0000 (21:32 +0000)
committerPino Toscano <pino@kde.org>
Wed, 26 Apr 2006 21:32:31 +0000 (21:32 +0000)
svn path=/trunk/KDE/kdeedu/libkdeedu/; revision=534332

extdate/extdatepicker.cpp
kdeeducore/keduvowqlreader.cpp
kdeeducore/keduvowqlwriter.cpp

index 0d437729b7f561db706ce82be3c1e2b557b1ca56..815036d897428c109a8eb1ceb6cecbfef8daddbe 100644 (file)
@@ -36,6 +36,7 @@
 #include <QComboBox>
 #include <kdialog.h>
 #include <klocale.h>
+#include <kicon.h>
 #include <kiconloader.h>
 #include <ktoolbar.h>
 #include <kdebug.h>
@@ -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() ) );
     }
index d5e5c969959a820f7a65a5480394575235ee9f96..51a0bf7b75840d7b498cb1bdcd0354da4b832fae 100644 (file)
@@ -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();
index 15854e4b6c1bac89ab2ccd627ef5da35f621a68d..842ae7707f9bdb1a9ee129ebfbfd1374d679ba3a 100644 (file)
@@ -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;