• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

百人一首かるた 流しの練習用


Commit MetaInfo

修訂145828b4aff1f437b2aec320dbcae29a04ffb28b (tree)
時間2011-10-22 11:41:56
作者arakaki <alucky4416@user...>
Commiterarakaki

Log Message

BUG: Random Generation. v0.2

Change Summary

差異

--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -7,9 +7,6 @@
77
88 int RandomNumber(int min, int max)
99 {
10- QTime midnight(0,0,0);
11- qsrand(midnight.secsTo(QTime::currentTime()));
12-
1310 return min + (int)(qrand() * (max - min + 1.0) / (1.0 + RAND_MAX));
1411 }
1512
@@ -18,6 +15,9 @@ int GenerateRandomNumbers(int *data, int len)
1815 int i, j, rnd;
1916 int tmp;
2017
18+ QTime midnight(0,0,0);
19+ qsrand(midnight.secsTo(QTime::currentTime()));
20+
2121 j = len - 1;
2222 for (i = 0; i < (len - 1); i++, j--) {
2323 rnd = RandomNumber(0, j);
@@ -247,7 +247,7 @@ void MainWindow::on_actionExit_triggered()
247247
248248 void MainWindow::on_actionAbout_triggered()
249249 {
250- QMessageBox::about(this, "About", tr("流しの練習 v0.1"));
250+ QMessageBox::about(this, "About", tr("流しの練習 v0.2"));
251251 }
252252
253253 void MainWindow::on_actionAbout_Qt_triggered()