Commit 887931c8 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

Thread choice is now a SpinBox

parent 96743720
Loading
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -109,10 +109,17 @@
            </widget>
           </item>
           <item row="1" column="1">
            <widget class="QLineEdit" name="ThreadlineEdit"/>
            <widget class="QSpinBox" name="ThreadlineEdit">
             <property name="minimum">
              <number>1</number>
             </property>
             <property name="maximum">
              <number>64</number>
             </property>
            </widget>
           </item>
           <item row="1" column="0">
            <widget class="QCheckBox" name="threadsCheckBox">
            <widget class="QLabel" name="threadsCheckBox">
             <property name="text">
              <string>Number of threads</string>
             </property>
@@ -376,7 +383,7 @@
     <x>0</x>
     <y>0</y>
     <width>1350</width>
     <height>22</height>
     <height>25</height>
    </rect>
   </property>
  </widget>
+10 −14
Original line number Diff line number Diff line
@@ -56,8 +56,6 @@ void MainWindow::startGame() {
        stats->setWithcount(true);
    }

    if(ui->threadsCheckBox->isChecked())
    {
    try
    {
        stats->setNbThread(std::stoi(ui->ThreadlineEdit->text().toStdString()));
@@ -71,8 +69,6 @@ void MainWindow::startGame() {
        stats->setNbThread(1);
    }

    }

    if(ui->regexCheckBox->isChecked())
    {
        stats->setRegex(ui->RegexlineEdit->text().toStdString());