svnno****@sourc*****
svnno****@sourc*****
2009年 7月 19日 (日) 07:26:22 JST
Revision: 2437 http://sourceforge.jp/projects/kita/svn/view?view=rev&revision=2437 Author: nogu Date: 2009-07-19 07:26:22 +0900 (Sun, 19 Jul 2009) Log Message: ----------- fix bugs in reading and writing to board_state.conf Modified Paths: -------------- kita/branches/KITA-KDE4/kita/src/bbsview.cpp Modified: kita/branches/KITA-KDE4/kita/src/bbsview.cpp =================================================================== --- kita/branches/KITA-KDE4/kita/src/bbsview.cpp 2009-07-18 22:16:30 UTC (rev 2436) +++ kita/branches/KITA-KDE4/kita/src/bbsview.cpp 2009-07-18 22:26:22 UTC (rev 2437) @@ -184,7 +184,7 @@ if ((!newBoards.isEmpty() && newBoards.count("\n") < maxNewBoard) || !oldBoards.isEmpty()) { - int ret = KMessageBox::warningYesNoCancel(this, + int ret = KMessageBox::warningYesNoCancel(this, i18n("Do you really want to update board list?"), "kita", KStandardGuiItem::yes(), KGuiItem(i18n("Copy")), KStandardGuiItem::cancel(), @@ -549,8 +549,8 @@ QStringList openedList = config.group("").readEntry("Opened", QStringList()); - for (int i = 0, j = m_boardList->topLevelItemCount(); i < j; i++) { - QTreeWidgetItem* item = m_boardList->topLevelItem(0); + for (int i = 0, j = m_boardList->topLevelItemCount(); i < j; i++) { + QTreeWidgetItem* item = m_boardList->topLevelItem(i); QString categoryName = item->text(0); if (openedList.indexOf(categoryName) != -1) { item->setExpanded(true); @@ -561,13 +561,13 @@ void BBSView::saveOpened() { QStringList openedList; - for (int i = 0, j = m_boardList->topLevelItemCount(); i < j; i++) { - QTreeWidgetItem* item = m_boardList->topLevelItem(0); + for (int i = 0, j = m_boardList->topLevelItemCount(); i < j; i++) { + QTreeWidgetItem* item = m_boardList->topLevelItem(i); QString categoryName = item->text(0); if (item->isExpanded()) { openedList << categoryName; } - } + } QString configPath = KStandardDirs::locateLocal("appdata", "board_state.conf"); KConfig config(configPath);