Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package kochmorse for openSUSE:Factory 
checked in at 2022-12-08 16:50:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kochmorse (Old)
 and      /work/SRC/openSUSE:Factory/.kochmorse.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kochmorse"

Thu Dec  8 16:50:44 2022 rev:4 rq:1041180 version:3.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/kochmorse/kochmorse.changes      2020-01-12 
23:25:59.782851904 +0100
+++ /work/SRC/openSUSE:Factory/.kochmorse.new.1835/kochmorse.changes    
2022-12-08 16:51:09.407474174 +0100
@@ -1,0 +2,10 @@
+Wed Dec  7 16:29:57 UTC 2022 - Dirk Müller <[email protected]>
+
+- update to v3.5.1:
+  * font-size settings
+  * wrong word-count in random tutor.
+  * fixed dependencies for DEB packages.
+  * fixed some typos.
+  * delayed detection of sound devices
+
+-------------------------------------------------------------------

Old:
----
  kochmorse-3.5.0.tar.gz

New:
----
  kochmorse-3.5.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kochmorse.spec ++++++
--- /var/tmp/diff_new_pack.9hLnV7/_old  2022-12-08 16:51:09.883476610 +0100
+++ /var/tmp/diff_new_pack.9hLnV7/_new  2022-12-08 16:51:09.891476651 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package kochmorse
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 # Copyright (c) 2019, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:           kochmorse
-Version:        3.5.0
+Version:        3.5.1
 Release:        0
 Summary:        A simple morse tutor using the Koch method
 License:        GPL-2.0-or-later

++++++ kochmorse-3.5.0.tar.gz -> kochmorse-3.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/CMakeLists.txt 
new/kochmorse-3.5.1/CMakeLists.txt
--- old/kochmorse-3.5.0/CMakeLists.txt  2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/CMakeLists.txt  2021-03-15 13:53:53.000000000 +0100
@@ -17,7 +17,7 @@
 
 set(VERSION_MAJOR 3)
 set(VERSION_MINOR 5)
-set(VERSION_PATCH 0)
+set(VERSION_PATCH 1)
 configure_file(${PROJECT_SOURCE_DIR}/src/config.h.in 
${PROJECT_BINARY_DIR}/src/config.h)
 
 set(CMAKE_CXX_STANDARD 11)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/README.md 
new/kochmorse-3.5.1/README.md
--- old/kochmorse-3.5.0/README.md       2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/README.md       2021-03-15 13:53:53.000000000 +0100
@@ -1,5 +1,4 @@
 # KochMorse -- A morse-code tutor
-
 KochMorse is a simple morse-code tutor using the
 [Koch method](http://www.qsl.net/n1irz/finley.morse.html). It is written in 
C++ and uses
 [Qt5](https://qt-project.org) for the graphical user interface (GUI). [More 
...](https://github.com/hmatuschek/kochmorse/wiki#how-to-use-kochmorse)
@@ -16,7 +15,7 @@
  * A morse tutor using the [Koch 
method](https://github.com/hmatuschek/kochmorse/wiki/Tutors#koch-tutor).
  * A [random morse 
tutor](https://github.com/hmatuschek/kochmorse/wiki/Tutors#random-tutor) -- 
Allows to select a set of characters and prosigns for practicing.
  * A [QSO 
tutor](https://github.com/hmatuschek/kochmorse/wiki/Tutors#qso-tutor) -- 
Generates a random QSO text so you can practice reading typical QSOs.
- * A [customized text 
tutor](https://github.com/hmatuschek/kochmorse/wiki/Tutors#generated-text-tutor)
 -- This tutor allows you to listen to a plain-text file or to a text 
+ * A [customized text 
tutor](https://github.com/hmatuschek/kochmorse/wiki/Tutors#generated-text-tutor)
 -- This tutor allows you to listen to a plain-text file or to a text
    [generated](https://github.com/hmatuschek/kochmorse/wiki/TextGen) from 
user-defined rules.
  * A [transmit 
tutor](https://github.com/hmatuschek/kochmorse/wiki/Tutors#transmit-tutor) -- 
Connect your practice tone-generator to your microphone input and check your
    transmissions with KochMorse.
@@ -31,7 +30,15 @@
    the noise effect, it simulates the conditions on HF bands pretty well.
  * QRM effect -- Increases the difficulty to read the morse code by simulating 
parallel QSOs nearby.
 
-## Releases 
+## Releases
+ <a href="https://snapcraft.io/kochmorse";>
+  <img alt="kochmorse" src="https://snapcraft.io/kochmorse/badge.svg"/>
+ </a>
+ <a href="https://repology.org/project/kochmorse/versions";>
+  <img src="https://repology.org/badge/vertical-allrepos/kochmorse.svg"; 
alt="Packaging status" align="right">
+ </a>
+ 
+ * 2020-01-10 - [**Version 
3.5.0**](https://github.com/hmatuschek/kochmorse/releases/tag/v3.5.0)
  * 2018-09-25 - [**Version 
3.4.0**](https://github.com/hmatuschek/kochmorse/releases/tag/v3.4.0)
  * 2018-06-12 - [**Version 
3.3.0**](https://github.com/hmatuschek/kochmorse/releases/tag/v3.3.0)
  * 2015-06-30 - [**Version 
3.2.2**](https://github.com/hmatuschek/kochmorse/releases/tag/v3.2.2)
@@ -45,8 +52,6 @@
 
 This is a C++/Qt reimplementation of my "old" python morse-code tutor (also 
called "kochmorse",
 https://kochmorse.googlecode.com). As the "old" implementation relied on ALSA 
for sound output,
-it was restricted to Linux. This reimplementation now uses the Qt5 Multimedia 
module for the 
-sound output and the GUI is implemented using Qt5, it is therefore more 
platform independent 
+it was restricted to Linux. This reimplementation now uses the Qt5 Multimedia 
module for the
+sound output and the GUI is implemented using Qt5, it is therefore more 
platform independent
 and runs under Linux, MacOS X and Windows.
-
- 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/dist/windows/build.bat 
new/kochmorse-3.5.1/dist/windows/build.bat
--- old/kochmorse-3.5.0/dist/windows/build.bat  2020-01-10 14:51:07.000000000 
+0100
+++ new/kochmorse-3.5.1/dist/windows/build.bat  2021-03-15 13:53:53.000000000 
+0100
@@ -1,9 +1,9 @@
-SET QT_PATH=C:/Qt/Qt5.11.1
-SET QT_BIN_PATH=%QT_PATH%/5.11.1/mingw53_32/bin
-SET QT_INCLUDE_PATH=%QT_PATH%/5.11.1/mingw53_32/include
-SET MINGW_PATH=C:/Qt/Qt5.11.1/Tools/mingw530_32
+SET QT_PATH=C:/Qt/5.12.6
+SET QT_BIN_PATH=%QT_PATH%/mingw73_32/bin
+SET QT_INCLUDE_PATH=%QT_PATH%/mingw73_32/include
+SET MINGW_PATH=C:/Qt/Tools/mingw730_32/
 SET MINGW_BIN_PATH=%MINGW_PATH%/bin
-SET CMAKE_BIN_PATH=C:/cmake-3.11.4-win32-x86/bin
+SET CMAKE_BIN_PATH=C:/Program\ Files\ (x86)/CMake/bin/bin
 SET PATH=%MINGW_BIN_PATH%;%QT_BIN_PATH%;%CMAKE_BIN_PATH%;%PATH%
 
 cmake ../.. -G "MinGW Makefiles" -DCMAKE_CXX_FLAGS="-I%QT_INCLUDE_PATH%"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/dist/windows/kochmorse.nsi 
new/kochmorse-3.5.1/dist/windows/kochmorse.nsi
--- old/kochmorse-3.5.0/dist/windows/kochmorse.nsi      2020-01-10 
14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/dist/windows/kochmorse.nsi      2021-03-15 
13:53:53.000000000 +0100
@@ -3,7 +3,7 @@
 !define DESCRIPTION "A simple morse tutor using the Koch method."
 # These three must be integers
 !define VERSIONMAJOR 3
-!define VERSIONMINOR 4
+!define VERSIONMINOR 5
 !define VERSIONBUILD 0
 
 RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned 
on)
@@ -11,7 +11,7 @@
 InstallDir "$PROGRAMFILES\${APPNAME}"
 
 Name "${APPNAME}"
-outFile "kochmorse-3.4.0-setup.exe"
+outFile "kochmorse-3.5.0-setup.exe"
 
 !include LogicLib.nsh
  
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/dist/windows/pack.bat 
new/kochmorse-3.5.1/dist/windows/pack.bat
--- old/kochmorse-3.5.0/dist/windows/pack.bat   2020-01-10 14:51:07.000000000 
+0100
+++ new/kochmorse-3.5.1/dist/windows/pack.bat   2021-03-15 13:53:53.000000000 
+0100
@@ -1,5 +1,5 @@
-SET QT_LIB_PATH=C:/Qt/Qt5.11.1/5.11.1/mingw53_32/bin
-SET QT_PLUGIN_PATH=C:/Qt/Qt5.11.1/5.11.1/mingw53_32/plugins
+SET QT_LIB_PATH=C:/Qt/5.12.6/mingw73_32/bin
+SET QT_PLUGIN_PATH=C:/Qt/5.12.6/mingw73_32/plugins
 SET NSIS_PATH=C:/Program Files (x86)/NSIS
 SET PATH=%NSIS_PATH%;%PAHT%
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/snapcraft.yaml 
new/kochmorse-3.5.1/snapcraft.yaml
--- old/kochmorse-3.5.0/snapcraft.yaml  1970-01-01 01:00:00.000000000 +0100
+++ new/kochmorse-3.5.1/snapcraft.yaml  2021-03-15 13:53:53.000000000 +0100
@@ -0,0 +1,47 @@
+name: kochmorse
+version: git
+grade: devel
+#version: 3.5.0
+#grade: stable
+summary: A simple Morse tutor.
+description: |
+  Kochmorse is a simple to use morse-code tutor using the so called Koch 
mehtod. It can not only
+  be used to learn the more-code but also to practice it using a random QSO 
simulator.
+
+confinement: strict
+base: core18
+
+architectures:
+  - build-on: amd64
+
+apps:
+  kochmorse:
+    command: kochmorse
+    desktop: usr/share/applications/kochmorse.desktop
+    plugs:
+      - desktop
+      - network
+      - audio-playback
+      - home
+    extensions:
+      - kde-neon
+
+parts:
+  kochmorse:
+    plugin: cmake
+    build-packages:
+      - qtbase5-dev
+      - qtmultimedia5-dev
+      - qttools5-dev
+      - qttools5-dev-tools
+    stage-packages:
+      - libqt5svg5
+      - libqt5multimedia5
+      - libqt5multimedia5-plugins
+      - qt5dxcb-plugin
+    source: https://github.com/hmatuschek/kochmorse.git
+    source-type: git
+    #source-tag: "v$SNAPCRAFT_PROJECT_VERSION"
+    configflags:
+      - "-DCMAKE_INSTALL_PREFIX=/usr"
+      - "-DCMAKE_BUILD_TYPE=Release"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/src/effect.cc 
new/kochmorse-3.5.1/src/effect.cc
--- old/kochmorse-3.5.0/src/effect.cc   2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/src/effect.cc   2021-03-15 13:53:53.000000000 +0100
@@ -62,12 +62,12 @@
 
 void
 NoiseEffect::gaussRNG(float &a, float &b) {
-  float x = 2*float(rand())/RAND_MAX - 1;
-  float y = 2*float(rand())/RAND_MAX - 1;
+  float x = 2*float(rand())/float(RAND_MAX) - 1;
+  float y = 2*float(rand())/float(RAND_MAX) - 1;
   float s = x*x + y*y;
   while (s >= 1) {
-    x = 2*float(rand())/RAND_MAX - 1;
-    y = 2*float(rand())/RAND_MAX - 1;
+    x = 2*float(rand())/float(RAND_MAX) - 1;
+    y = 2*float(rand())/float(RAND_MAX) - 1;
     s = x*x + y*y;
   }
   a = x*std::sqrt(-2*std::log(s)/s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/src/settings.cc 
new/kochmorse-3.5.1/src/settings.cc
--- old/kochmorse-3.5.0/src/settings.cc 2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/src/settings.cc 2021-03-15 13:53:53.000000000 +0100
@@ -21,8 +21,8 @@
 /* 
*********************************************************************************************
 *
  * Settings object
  * 
*********************************************************************************************
 */
-Settings::Settings()
-  : QSettings("com.github.hmatuschek", "KochMorse")
+Settings::Settings(QObject *parent)
+  : QSettings("com.github.hmatuschek", "KochMorse", parent)
 {
   // pass...
 }
@@ -55,7 +55,14 @@
   setValue("lastCheckUpdates", QDateTime::currentDateTime());
 }
 
-
+int
+Settings::lastActiveTab() const {
+  return value("lastActiveTab", 0).toInt();
+}
+void
+Settings::setLastActiveTab(int index) {
+  setValue("lastActiveTab", index);
+}
 
 int
 Settings::speed() const {
@@ -597,7 +604,7 @@
 void
 Settings::setTextFont(const QFont &font) {
   setValue("textFontFamily", font.family());
-  setValue("testFontSize", font.pointSize());
+  setValue("textFontSize", font.pointSize());
 }
 
 QColor
@@ -662,6 +669,8 @@
 {
   this->setModal(true);
 
+  _settings = new Settings(this);
+
   _tutor = new TutorSettingsView();
   _code  = new CodeSettingsView();
   _effects = new EffectSettingsView();
@@ -676,6 +685,7 @@
   _tabs->addTab(_devices, tr("Devices"));
   _tabs->addTab(_appearance, tr("Appearance"));
   //_tabs->addTab(_highscore, tr("Highscore"));
+  _tabs->setCurrentIndex(_settings->lastActiveTab());
 
   QDialogButtonBox *bbox = new QDialogButtonBox();
   bbox->addButton(QDialogButtonBox::Ok);
@@ -690,6 +700,7 @@
   QObject::connect(bbox, SIGNAL(accepted()), this, SLOT(accept()));
   QObject::connect(bbox, SIGNAL(rejected()), this, SLOT(reject()));
   QObject::connect(bbox, SIGNAL(helpRequested()), this, SLOT(showHelp()));
+  QObject::connect(_tabs, SIGNAL(currentChanged(int)), this, 
SLOT(onTabSelected(int)));
 }
 
 void
@@ -708,6 +719,14 @@
   
QDesktopServices::openUrl(tr("https://github.com/hmatuschek/kochmorse/wiki/Settings";));
 }
 
+void
+SettingsDialog::onTabSelected(int index) {
+  if (3 == index) {
+    _devices->populateDevices();
+  }
+  _settings->setLastActiveTab(index);
+}
+
 
 /* 
*********************************************************************************************
 *
  * CodeSettings Widget
@@ -1631,32 +1650,18 @@
 DeviceSettingsView::DeviceSettingsView(QWidget *parent)
   : QWidget(parent)
 {
-  Settings settings;
+  _settings = new Settings(this);
 
   _outputDevices = new QComboBox();
   _outputDevices->setToolTip(tr("Select the audio output device."));
-  QAudioDeviceInfo currentDevice = settings.outputDevice();
-  QList<QAudioDeviceInfo> devices = 
QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
-  foreach (auto device, devices) {
-    _outputDevices->addItem(device.deviceName());
-    if (device == currentDevice)
-      _outputDevices->setCurrentIndex(_outputDevices->model()->rowCount()-1);
-  }
 
   _inputDevices = new QComboBox();
   _inputDevices->setToolTip(tr("Select the audio input device used for 
decoding CW send by you."));
-  currentDevice = settings.inputDevice();
-  devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
-  foreach (auto device, devices) {
-    _inputDevices->addItem(device.deviceName());
-    if (device == currentDevice)
-      _inputDevices->setCurrentIndex(_inputDevices->model()->rowCount()-1);
-  }
 
   _decoderLevel = new QSpinBox();
   _decoderLevel->setMinimum(-60);
   _decoderLevel->setMaximum(0);
-  _decoderLevel->setValue(int(settings.decoderLevel()));
+  _decoderLevel->setValue(int(_settings->decoderLevel()));
   _decoderLevel->setToolTip(tr("Specifies the detector threshold in dB for 
decoding CW."));
 
   QFormLayout *layout = new QFormLayout();
@@ -1668,11 +1673,28 @@
 
 void
 DeviceSettingsView::save() {
-  Settings settings;
+  _settings->setOutputDevice(_outputDevices->currentText());
+  _settings->setInputDevice(_inputDevices->currentText());
+  _settings->setDecoderLevel(_decoderLevel->value());
+}
 
-  settings.setOutputDevice(_outputDevices->currentText());
-  settings.setInputDevice(_inputDevices->currentText());
-  settings.setDecoderLevel(_decoderLevel->value());
+void
+DeviceSettingsView::populateDevices() {
+  QAudioDeviceInfo currentDevice = _settings->outputDevice();
+  QList<QAudioDeviceInfo> devices = 
QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
+  foreach (auto device, devices) {
+    _outputDevices->addItem(device.deviceName());
+    if (device == currentDevice)
+      _outputDevices->setCurrentIndex(_outputDevices->model()->rowCount()-1);
+  }
+
+  currentDevice = _settings->inputDevice();
+  devices = QAudioDeviceInfo::availableDevices(QAudio::AudioInput);
+  foreach (auto device, devices) {
+    _inputDevices->addItem(device.deviceName());
+    if (device == currentDevice)
+      _inputDevices->setCurrentIndex(_inputDevices->model()->rowCount()-1);
+  }
 }
 
 
@@ -1690,7 +1712,7 @@
 
   _size = new QSpinBox();
   _size->setRange(3, 120);
-  _size->setValue(_font->currentFont().pointSize());
+  _size->setValue(settings.textFont().pointSize());
 
   _rxColor = new ColorButton(settings.rxTextColor());
   _txColor = new ColorButton(settings.txTextColor());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/src/settings.hh 
new/kochmorse-3.5.1/src/settings.hh
--- old/kochmorse-3.5.0/src/settings.hh 2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/src/settings.hh 2021-03-15 13:53:53.000000000 +0100
@@ -35,7 +35,7 @@
 
 public:
   /** Constructor. */
-  explicit Settings();
+  explicit Settings(QObject *parent=nullptr);
 
   /** Retuns the current volume settings. */
   double volume() const;
@@ -47,6 +47,9 @@
   QDateTime lastCheckForUpdates() const;
   void checkedForUpdates();
 
+  int lastActiveTab() const;
+  void setLastActiveTab(int index);
+
   /** Retunrs the current character speed. */
   int speed() const;
   /** Sets the character speed. */
@@ -462,9 +465,13 @@
 public:
   explicit DeviceSettingsView(QWidget *parent=0);
 
+public slots:
   void save();
+  void populateDevices();
 
 protected:
+  Settings *_settings;
+  QLabel *_loadingNote;
   QComboBox *_inputDevices;
   QComboBox *_outputDevices;
   QSpinBox  *_decoderLevel;
@@ -514,8 +521,10 @@
 
 protected slots:
   void showHelp();
+  void onTabSelected(int index);
 
 protected:
+  Settings *_settings;
   QTabWidget *_tabs;
   TutorSettingsView *_tutor;
   CodeSettingsView *_code;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/src/tutor.cc 
new/kochmorse-3.5.1/src/tutor.cc
--- old/kochmorse-3.5.0/src/tutor.cc    2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/src/tutor.cc    2021-03-15 13:53:53.000000000 +0100
@@ -81,7 +81,7 @@
     _repeatLastChar(repeatLastChar), _minGroupSize(std::min(minGroupSize, 
maxGroupSize)),
     _maxGroupSize(std::max(minGroupSize, maxGroupSize)), _lines(lines), 
_linecount(0),
     _showSummary(showSummary), _verify(verify), _hideOutput(hideOutput),
-    _threshold(successThreshold), _text(), _chars_send(0), _words_send(0), 
_lines_send(0)
+    _threshold(successThreshold), _text(), _chars_sent(0), _words_sent(0), 
_lines_sent(0)
 {
   // Init random number generator
   srand(time(nullptr));
@@ -153,15 +153,15 @@
 KochTutor::summary() const {
   if (! _showSummary)
     return "";
-  int threshold = int(_chars_send*(100-_threshold))/100;
+  int threshold = int(_chars_sent*(100-_threshold))/100;
   if (_lesson < (_lessons.size()-1))
     return tr("\n\nSent %1 chars in %2 words and %3 lines. "
               "If you have less than %4 mistakes, you can proceed to lesson 
%5.")
-        
.arg(_chars_send).arg(_words_send).arg(_lines_send).arg(threshold).arg(_lesson+1);
+        
.arg(_chars_sent).arg(_words_sent).arg(_lines_sent).arg(threshold).arg(_lesson+1);
   else
     return tr("\n\nSent %1 chars in %2 words and %3 lines. "
               "If you have less than %4 mistakes, you completed the course!")
-        .arg(_chars_send).arg(_words_send).arg(_lines_send).arg(threshold);
+        .arg(_chars_sent).arg(_words_sent).arg(_lines_sent).arg(threshold);
 }
 
 void
@@ -199,10 +199,10 @@
     }
     _text.push_back('\n');
   }
-  _sendText.clear();
-  _chars_send = 0;
-  _words_send = 0;
-  _lines_send = 0;
+  _sentText.clear();
+  _chars_sent = 0;
+  _words_sent = 0;
+  _lines_sent = 0;
   // sample a line of text.
   _nextline();
 }
@@ -225,17 +225,17 @@
 int
 KochTutor::verify(const QString &text, QString &summary) {
   QVector<int> mistakes;
-  int err = textCompare(_sendText.toLower(), text.toLower(), mistakes);
+  int err = textCompare(_sentText.toLower(), text.toLower(), mistakes);
   // Format Send text
   QString tx, rx;
   QTextStream buffer(&tx);
-  for (int i=0; i<_sendText.size(); i++) {
-    if ('\n' == _sendText.at(i))
+  for (int i=0; i<_sentText.size(); i++) {
+    if ('\n' == _sentText.at(i))
       buffer << "<br>";
     else if (mistakes.contains(i))
-      buffer << "<span style=\"background-color:red;\">" << _sendText.at(i) << 
"</span>";
+      buffer << "<span style=\"background-color:red;\">" << _sentText.at(i) << 
"</span>";
     else
-      buffer << _sendText.at(i);
+      buffer << _sentText.at(i);
   }
   buffer.setString(&rx);
   for (int i=0; i<text.size(); i++) {
@@ -244,13 +244,13 @@
     else
       buffer << text.at(i);
   }
-  int correct = 100*double(_chars_send-err)/_chars_send;
-  summary = tr("<html><h3>Text send:</h3><p>%1</p>"
+  int correct = 100*double(_chars_sent-err)/_chars_sent;
+  summary = tr("<html><h3>Text sent:</h3><p>%1</p>"
                "<h3>Text entered:</h3><p>%2</p>"
-               "<h3>Summary:</h3><p>Characters/Words/Lines send: %3/%4/%5<br>"
+               "<h3>Summary:</h3><p>Characters/Words/Lines sent: %3/%4/%5<br>"
                "Mistakes: %6<br>"
-               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_send)
-      .arg(_words_send).arg(_lines_send).arg(err).arg(correct);
+               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_sent)
+      .arg(_words_sent).arg(_lines_sent).arg(err).arg(correct);
   if (correct >= _threshold) {
     summary.append(tr("<p><b>You achieved an accuracy of %1% &gt;= %2%. "
                       "You may advance to the next 
lesson!</b></p></html>").arg(correct).arg(_threshold));
@@ -294,21 +294,21 @@
         idx = _lesson*double(rand())/RAND_MAX;
       }
       _text.push_back(_lessons[idx]);
-      _sendText.push_back(_lessons[idx]);
-      _chars_send++;
+      _sentText.push_back(_lessons[idx]);
+      _chars_sent++;
     }
     i += n;
     _text.push_back(' ');
-    _sendText.push_back(' ');
-    _words_send++;
+    _sentText.push_back(' ');
+    _words_sent++;
   }
   _text.push_back('=');
   _text.push_back(' ');
   _text.push_back(' ');
   _text.push_back('\n');
-  _sendText.push_back('\n');
+  _sentText.push_back('\n');
   _linecount++;
-  _lines_send++;
+  _lines_sent++;
 }
 
 const QVector<QChar> &
@@ -323,7 +323,7 @@
 RandomTutor::RandomTutor(MorseEncoder *encoder, size_t minGroupSize, size_t 
maxGroupSize, int lines, bool showSummary, bool verify, bool hideOutput, 
QObject *parent)
   : Tutor(encoder, parent), _minGroupSize(minGroupSize), 
_maxGroupSize(maxGroupSize),
     _lines(lines), _linecount(0), _showSummary(showSummary), _verify(verify),
-    _hideOutput(hideOutput), _text(), _chars(), _chars_send(0), 
_words_send(0), _lines_send(0)
+    _hideOutput(hideOutput), _text(), _chars(), _chars_sent(0), 
_words_sent(0), _lines_sent(0)
 {
   // Init random number generator
   srand(time(nullptr));
@@ -349,7 +349,7 @@
                          bool hideOutput, QObject *parent)
   : Tutor(encoder, parent), _minGroupSize(minGroupSize), 
_maxGroupSize(maxGroupSize), _lines(lines),
     _showSummary(showSummary), _verify(verify), _hideOutput(hideOutput), 
_text(), _chars(),
-    _chars_send(0), _words_send(0), _lines_send(0)
+    _chars_sent(0), _words_sent(0), _lines_sent(0)
 {
   // Init random number generator
   srand(time(nullptr));
@@ -369,10 +369,9 @@
 RandomTutor::summary() const {
   if (! _showSummary)
     return "";
-  int chars_send = _chars_send; chars_send -= 3; // - "vvv\n"
-  int words_send = _words_send;
-  int lines_send = _lines_send; lines_send -= 1; // - "vvv\n"
-  chars_send -= lines_send; // - " =\n" at end of each line
+  int chars_send = _chars_sent;
+  int words_send = _words_sent;
+  int lines_send = _lines_sent;
   return tr("\n\nSent %1 chars in %2 words and %3 lines.")
       .arg(chars_send).arg(words_send).arg(lines_send);
 }
@@ -415,13 +414,13 @@
 {
   // Empty current session
   _text.clear();
-  _sendText.clear();
+  _sentText.clear();
   // If empty char set -> done.
   if (0 == _chars.size()) { return; }
   // Reset linecount
   _linecount = 0;
   // reset char, word & line count
-  _chars_send = _words_send = _lines_send = 0;
+  _chars_sent = _words_sent = _lines_sent = 0;
   // Insert "vvv\n"
   _text.push_back('v'); _text.push_back('v'); _text.push_back('v'); 
_text.push_back('\n');
   // sample a line
@@ -454,17 +453,17 @@
 int
 RandomTutor::verify(const QString &text, QString &summary) {
   QVector<int> mistakes;
-  int err = textCompare(_sendText.toLower(), text.toLower(), mistakes);
-  // Format Send text
+  int err = textCompare(_sentText.toLower(), text.toLower(), mistakes);
+  // Format Sent text
   QString tx, rx;
   QTextStream buffer(&tx);
-  for (int i=0; i<_sendText.size(); i++) {
-    if ('\n' == _sendText.at(i))
+  for (int i=0; i<_sentText.size(); i++) {
+    if ('\n' == _sentText.at(i))
       buffer << "<br>";
     else if (mistakes.contains(i))
-      buffer << "<span style=\"background-color:red;\">" << _sendText.at(i) << 
"</span>";
+      buffer << "<span style=\"background-color:red;\">" << _sentText.at(i) << 
"</span>";
     else
-      buffer << _sendText.at(i);
+      buffer << _sentText.at(i);
   }
   buffer.setString(&rx);
   for (int i=0; i<text.size(); i++) {
@@ -473,13 +472,13 @@
     else
       buffer << text.at(i);
   }
-  int correct = 100*double(_chars_send-err)/_chars_send;
-  summary = tr("<html><h3>Text send:</h3><p>%1</p>"
+  int correct = 100*double(_chars_sent-err)/_chars_sent;
+  summary = tr("<html><h3>Text sent:</h3><p>%1</p>"
                "<h3>Text entered:</h3><p>%2</p>"
-               "<h3>Summary:</h3><p>Characters/Words/Lines send: %3/%4/%5<br>"
+               "<h3>Summary:</h3><p>Characters/Words/Lines sent: %3/%4/%5<br>"
                "Mistakes: %6<br>"
-               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_send)
-      .arg(_words_send).arg(_lines_send).arg(err).arg(correct);
+               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_sent)
+      .arg(_words_sent).arg(_lines_sent).arg(err).arg(correct);
 
   emit sessionVerified("rand", _chars.size(), correct);
   return err;
@@ -494,20 +493,20 @@
       // Sample char from chars
       size_t idx = _chars.size()*double(rand())/RAND_MAX;
       _text.push_back(_chars[idx]);
-      _sendText.push_back(_chars[idx]);
-      _chars_send++;
+      _sentText.push_back(_chars[idx]);
+      _chars_sent++;
     }
     i += n;
     _text.push_back(' ');
-    _sendText.push_back(' ');
-    _words_send++;
+    _sentText.push_back(' ');
+    _words_sent++;
   }
   _text.push_back('=');
   _text.push_back(' ');
   _text.push_back('\n');
-  _sendText.push_back('\n');
+  _sentText.push_back('\n');
   _linecount++;
-  _lines_send++;
+  _lines_sent++;
 }
 
 QSet<QChar>
@@ -565,7 +564,7 @@
   : Tutor(encoder, parent), _lesson(lesson), _prefLastWords(prefLastWords),
     _repeatLastWord(repeatLastWord), _lines(lines), _linecount(0),
     _showSummary(showSummary), _verify(verify), _hideOutput(hideOutput),
-    _threshold(successThreshold), _text(), _chars_send(0), _words_send(0), 
_lines_send(0)
+    _threshold(successThreshold), _text(), _chars_sent(0), _words_sent(0), 
_lines_sent(0)
 {
   // Init random number generator
   srand(time(nullptr));
@@ -637,15 +636,15 @@
 WordsworthTutor::summary() const {
   if (! _showSummary)
     return "";
-  int threshold = int(_chars_send*(100-_threshold))/100;
+  int threshold = int(_chars_sent*(100-_threshold))/100;
   if (_lesson < (_lessons.size()-1))
     return tr("\n\nSent %1 chars in %2 words and %3 lines. "
               "If you have less than %4 mistakes, you can proceed to lesson 
%5.")
-        
.arg(_chars_send).arg(_words_send).arg(_lines_send).arg(threshold).arg(_lesson+1);
+        
.arg(_chars_sent).arg(_words_sent).arg(_lines_sent).arg(threshold).arg(_lesson+1);
   else
     return tr("\n\nSent %1 chars in %2 words and %3 lines. "
               "If you have less than %4 mistakes, you completed the course!")
-        .arg(_chars_send).arg(_words_send).arg(_lines_send).arg(threshold);
+        .arg(_chars_sent).arg(_words_sent).arg(_lines_sent).arg(threshold);
 }
 
 void
@@ -685,10 +684,10 @@
     }
     _text.push_back('\n');
   }
-  _sendText.clear();
-  _chars_send = 0;
-  _words_send = 0;
-  _lines_send = 0;
+  _sentText.clear();
+  _chars_sent = 0;
+  _words_sent = 0;
+  _lines_sent = 0;
   // sample a line of text.
   _nextline();
 }
@@ -711,17 +710,17 @@
 int
 WordsworthTutor::verify(const QString &text, QString &summary) {
   QVector<int> mistakes;
-  int err = textCompare(_sendText.toLower(), text.toLower(), mistakes);
-  // Format Send text
+  int err = textCompare(_sentText.toLower(), text.toLower(), mistakes);
+  // Format text
   QString tx, rx;
   QTextStream buffer(&tx);
-  for (int i=0; i<_sendText.size(); i++) {
-    if ('\n' == _sendText.at(i))
+  for (int i=0; i<_sentText.size(); i++) {
+    if ('\n' == _sentText.at(i))
       buffer << "<br>";
     else if (mistakes.contains(i))
-      buffer << "<span style=\"background-color:red;\">" << _sendText.at(i) << 
"</span>";
+      buffer << "<span style=\"background-color:red;\">" << _sentText.at(i) << 
"</span>";
     else
-      buffer << _sendText.at(i);
+      buffer << _sentText.at(i);
   }
   buffer.setString(&rx);
   for (int i=0; i<text.size(); i++) {
@@ -730,13 +729,13 @@
     else
       buffer << text.at(i);
   }
-  int correct = 100*double(_chars_send-err)/_chars_send;
-  summary = tr("<html><h3>Text send:</h3><p>%1</p>"
+  int correct = 100*double(_chars_sent-err)/_chars_sent;
+  summary = tr("<html><h3>Text sent:</h3><p>%1</p>"
                "<h3>Text entered:</h3><p>%2</p>"
-               "<h3>Summary:</h3><p>Characters/Words/Lines send: %3/%4/%5<br>"
+               "<h3>Summary:</h3><p>Characters/Words/Lines sent: %3/%4/%5<br>"
                "Mistakes: %6<br>"
-               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_send)
-      .arg(_words_send).arg(_lines_send).arg(err).arg(correct);
+               "Accuracy: <b>%7%</b></p>").arg(tx).arg(rx).arg(_chars_sent)
+      .arg(_words_sent).arg(_lines_sent).arg(err).arg(correct);
   if (correct >= _threshold) {
     summary.append(tr("<p><b>You achieved an accuracy of %1% &gt;= %2%. "
                       "You may advance to the next 
lesson!</b></p></html>").arg(correct).arg(_threshold));
@@ -777,19 +776,19 @@
     }
     for (int j=0; j<_lessons[idx].size(); j++)
       _text.push_back(_lessons[idx][j]);
-    _sendText.push_back(_lessons[idx]);
-    _chars_send += _lessons[idx].size();
+    _sentText.push_back(_lessons[idx]);
+    _chars_sent += _lessons[idx].size();
     _text.push_back(' ');
-    _sendText.push_back(' ');
-    _words_send++;
+    _sentText.push_back(' ');
+    _words_sent++;
   }
   _text.push_back('=');
   _text.push_back(' ');
   _text.push_back(' ');
   _text.push_back('\n');
-  _sendText.push_back('\n');
+  _sentText.push_back('\n');
   _linecount++;
-  _lines_send++;
+  _lines_sent++;
 }
 
 const QVector<QString> &
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/src/tutor.hh 
new/kochmorse-3.5.1/src/tutor.hh
--- old/kochmorse-3.5.0/src/tutor.hh    2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/src/tutor.hh    2021-03-15 13:53:53.000000000 +0100
@@ -148,10 +148,10 @@
   QList<QChar> _text;
   /** The vector of symbols for each lesson. */
   static QVector<QChar> _lessons;
-  size_t _chars_send;
-  size_t _words_send;
-  size_t _lines_send;
-  QString _sendText;
+  size_t _chars_sent;
+  size_t _words_sent;
+  size_t _lines_sent;
+  QString _sentText;
 };
 
 
@@ -225,10 +225,10 @@
   QList<QChar> _text;
   /** Vector of chars to choose from. */
   QVector<QChar> _chars;
-  QString _sendText;
-  size_t _chars_send;
-  size_t _words_send;
-  size_t _lines_send;
+  QString _sentText;
+  size_t _chars_sent;
+  size_t _words_sent;
+  size_t _lines_sent;
 };
 
 
@@ -308,9 +308,9 @@
   bool _prefLastWords;
   /** The "repeat last word" flag. */
   bool _repeatLastWord;
-  /** The number of lines to send, if negative send an infinite number of 
lines. */
+  /** The number of lines to send. If negative, send an infinite number of 
lines. */
   int _lines;
-  /** The number of lines send. */
+  /** The number of lines sent. */
   int _linecount;
   bool _showSummary;
   bool _verify;
@@ -320,10 +320,10 @@
   QList<QChar> _text;
   /** The vector of words for each lesson. */
   static QVector<QString> _lessons;
-  size_t _chars_send;
-  size_t _words_send;
-  size_t _lines_send;
-  QString _sendText;
+  size_t _chars_sent;
+  size_t _words_sent;
+  size_t _lines_sent;
+  QString _sentText;
 };
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kochmorse-3.5.0/text/about.html 
new/kochmorse-3.5.1/text/about.html
--- old/kochmorse-3.5.0/text/about.html 2020-01-10 14:51:07.000000000 +0100
+++ new/kochmorse-3.5.1/text/about.html 2021-03-15 13:53:53.000000000 +0100
@@ -2,7 +2,7 @@
 <body>
  <center>
   <h1>Koch Morse</h1>
-  <h3>version 3.5.0</h3>
+  <h3>version 3.5.1</h3>
   <h4><h 
ref="http://github.com/hmatuschek/kochmorse";>http://github.com/hmatuschek/kochmorse</a></h4>
   <h5><i>Copyright (C) 2007-2018 Hannes Matuschek, DM3MAT, 
hmatuschek[at]gmail[dot]com</i></h5>
  </center>

Reply via email to