From 7e8008cdd707d4ea3504df4ad02a4589c7b16510 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 18 Jun 2009 08:27:37 +0200 Subject: Fix nasty qt3-qt4 porting trap: for a QStringList, lst.remove(lst.at(idx)) used to only remove one item in Qt3, while it removes all occurrences of the item in Qt4 (remove==removeAll). To catch it I commented out remove(T) in my qlist.h, which caught this. Reviewed-by: Friedemann Kleint --- tools/qtconfig/mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index eabaec6..a59f790 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -829,7 +829,7 @@ void MainWindow::removeSubstitute() int item = sublistbox->currentItem(); QStringList subs = QFont::substitutes(familysubcombo->currentText()); - subs.remove(subs.at(sublistbox->currentItem())); + subs.removeAt(sublistbox->currentItem()); sublistbox->clear(); sublistbox->insertStringList(subs); if (uint(item) > sublistbox->count()) @@ -909,7 +909,7 @@ void MainWindow::removeFontpath() return; int item = fontpathlistbox->currentItem(); - fontpaths.remove(fontpaths.at(fontpathlistbox->currentItem())); + fontpaths.removeAt(fontpathlistbox->currentItem()); fontpathlistbox->clear(); fontpathlistbox->insertStringList(fontpaths); if (uint(item) > fontpathlistbox->count()) -- cgit v0.12