SVN commit 803937 by harris: Conjunction tool improvements: Use QListWidget::clear() to clear the OutputView. Friendlier date/Time formatting CCMAIL: kstars-devel@kde.org M +8 -7 conjunctions.cpp --- trunk/KDE/kdeedu/kstars/kstars/tools/conjunctions.cpp #803936:803937 @@ -126,16 +126,17 @@ KStarsDateTime dt; QMap::Iterator it; - // TODO: Find a better way to clear the OutputView QListWidget - QList::Iterator qlit; - QList rowlist = OutputView -> findItems("", Qt::MatchContains); // Dirty way to get the whole list of items - for(qlit = rowlist.begin(); qlit != rowlist.end(); ++qlit) { - OutputView -> removeItemWidget(*qlit); - } + OutputView->clear(); +// // TODO: Find a better way to clear the OutputView QListWidget +// QList::Iterator qlit; +// QList rowlist = OutputView -> findItems("", Qt::MatchContains); // Dirty way to get the whole list of items +// for(qlit = rowlist.begin(); qlit != rowlist.end(); ++qlit) { +// OutputView -> removeItemWidget(*qlit); +// } for(it = conjunctionlist.begin(); it != conjunctionlist.end(); ++it) { dt.setDJD( it.key() ); - OutputView -> addItem(i18n("Conjunction on ") + dt.toString() + i18n(" : Separation is ") + it.data().toDMSString()); + OutputView -> addItem( i18n("Conjunction on %1 UT: Separation is %2", dt.toString("%a, %d %b %Y %H:%M"), it.data().toDMSString()) ); } }