author | schurig <schurig> | 2004-09-10 06:10:18 (UTC) |
---|---|---|
committer | schurig <schurig> | 2004-09-10 06:10:18 (UTC) |
commit | 931d699302619ac6472aca4b893d8a8bd188f040 (patch) (side-by-side diff) | |
tree | 01c9d454e79d88124714f1ec1ce07b9f08117d0a | |
parent | 317734f41201bf25fa3a1b38c2867bb9557053b9 (diff) | |
download | opie-931d699302619ac6472aca4b893d8a8bd188f040.zip opie-931d699302619ac6472aca4b893d8a8bd188f040.tar.gz opie-931d699302619ac6472aca4b893d8a8bd188f040.tar.bz2 |
disable SD and CF speed test on MNCI
change millibit to MegaByte (mb -> MB)
change kilobit to Kilobyte (kb -> kB)
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.cpp | 20 | ||||
-rw-r--r-- | noncore/settings/sysinfo/benchmarkinfo.h | 4 |
2 files changed, 18 insertions, 6 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp index 8497c8b..47be13c 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.cpp +++ b/noncore/settings/sysinfo/benchmarkinfo.cpp @@ -115,7 +115,8 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox ); test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox ); +#ifndef QT_QWS_RAMSES test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); - +#endif test_alu->setText( 1, "n/a" ); test_fpu->setText( 1, "n/a" ); @@ -123,7 +124,8 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) test_gfx->setText( 1, "n/a" ); test_ram->setText( 1, "n/a" ); +#ifndef QT_QWS_RAMSES test_sd->setText( 1, "n/a" ); test_cf->setText( 1, "n/a" ); - +#endif test_alu->setText( 2, "n/a" ); test_fpu->setText( 2, "n/a" ); @@ -131,6 +133,8 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) test_gfx->setText( 2, "n/a" ); test_ram->setText( 2, "n/a" ); +#ifndef QT_QWS_RAMSES test_sd->setText( 2, "n/a" ); test_cf->setText( 2, "n/a" ); +#endif startButton = new QPushButton( tr( "&Start Tests!" ), this ); @@ -183,6 +187,8 @@ void BenchmarkInfo::machineActivated( int index ) test_gfx->setText( 2, *(it++) ); test_ram->setText( 2, *(it++) ); +#ifndef QT_QWS_RAMSES test_sd->setText( 2, *(it++) ); test_cf->setText( 2, *(it++) ); +#endif } @@ -219,5 +225,5 @@ void BenchmarkInfo::run() { int value = gfxRendering( TEST_DURATION ); - test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4 / TEST_DURATION ) ); // 4 tests + test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4.0 / TEST_DURATION ) ); // 4 tests test_gfx->setOn( false ); } @@ -228,4 +234,5 @@ void BenchmarkInfo::run() } +#ifndef QT_QWS_RAMSES if ( test_cf->isOn() ) { @@ -239,4 +246,5 @@ void BenchmarkInfo::run() performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd ); } +#endif startButton->setText( tr( "&Start Tests!" ) ); @@ -386,9 +394,9 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item QFile::remove( filename ); double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 ); - QString readUnit = "kb/s"; + QString readUnit = "kB/s"; if ( readSpeed > 1024 ) { readSpeed = readSpeed / 1024.0; - readUnit = "mb/s"; + readUnit = "MB/s"; } double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 ); @@ -397,5 +405,5 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item { writeSpeed = writeSpeed / 1024.0; - writeUnit = "mb/s"; + writeUnit = "MBb/s"; } item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) ); diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h index 3b0a33c..4d61717 100644 --- a/noncore/settings/sysinfo/benchmarkinfo.h +++ b/noncore/settings/sysinfo/benchmarkinfo.h @@ -41,13 +41,17 @@ public: Opie::Ui::OCheckListItem* test_gfx; Opie::Ui::OCheckListItem* test_ram; +#ifndef QT_QWS_RAMSES Opie::Ui::OCheckListItem* test_sd; Opie::Ui::OCheckListItem* test_cf; +#endif bool main_rd; bool main_wt; +#ifndef QT_QWS_RAMSES bool sd_rd; bool sd_wt; bool cf_rd; bool cf_wt; +#endif QClipboard* clb; |