From: PatR Date: Sat, 7 Nov 2020 00:48:35 +0000 (-0800) Subject: Qt: update a couple of source comments X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca5cc4bb4bd26cdf4209cb54085f58797825a90a;p=nethack Qt: update a couple of source comments --- diff --git a/win/Qt/qt_menu.cpp b/win/Qt/qt_menu.cpp index 4a59f4356..731333d99 100644 --- a/win/Qt/qt_menu.cpp +++ b/win/Qt/qt_menu.cpp @@ -1195,7 +1195,7 @@ void NetHackQtTextWindow::Search() // when no row is highlighted (selected), start the search // on the current row, otherwise start on the row after it // [normally means that the very first row is a candidate - // for containgin the target during the very first search] + // for containing the target during the very first search] int startln = lines->selectedItems().count(); for (int i = startln; i < linecount; ++i) { int lnum = (i + current) % linecount; diff --git a/win/Qt/qt_yndlg.cpp b/win/Qt/qt_yndlg.cpp index 4c59c073f..836e13042 100644 --- a/win/Qt/qt_yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -154,6 +154,8 @@ char NetHackQtYnDialog::Exec() QButtonGroup *bgroup = new QButtonGroup(group); int nchoices=ch.length(); + // note: is_ynaq covers nyaq too because the choices string is + // "ynaq" for both; only the default differs; likewise for nyNaq bool is_ynaq = (ch == QString("ynaq") // [Yes ][ No ][All ][Stop] || ch == QString("yn#aq") || ch == altchoices), // alternate "yn#aq" @@ -289,11 +291,11 @@ char NetHackQtYnDialog::Exec() QLabel *lb = 0; if (allow_count) { - // put the Count widget in between [y] and [n][a][q] + // insert Count widget in front of [n], between [y] and [n][a][q] lb = new QLabel("Count:"); - groupbox->insertWidget(1, lb); // [n] button is item #1 + groupbox->insertWidget(1, lb); // [y] button is item #0, [n] is #1 le = new QLineEdit(); - groupbox->insertWidget(2, le); // [n] became #2, Count label #1 + groupbox->insertWidget(2, le); // [n] became #2, Count label is #1 le->setPlaceholderText(QString("#")); // grayed out } // add an invisible right-most field to left justify the buttons