]> granicus.if.org Git - nethack/commitdiff
Qt: update a couple of source comments
authorPatR <rankin@nethack.org>
Sat, 7 Nov 2020 00:48:35 +0000 (16:48 -0800)
committerPatR <rankin@nethack.org>
Sat, 7 Nov 2020 00:48:35 +0000 (16:48 -0800)
win/Qt/qt_menu.cpp
win/Qt/qt_yndlg.cpp

index 4a59f43562c782aafc4702965efee37f70e18d8d..731333d99c62b1259e08ca60d973246c7a41b81a 100644 (file)
@@ -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;
index 4c59c073f93f3ce9a983f7f3635d481d329f438c..836e130426349db46fe12afcc1d146bcce0aa23c 100644 (file)
@@ -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