summaryrefslogtreecommitdiff
path: root/noncore
Unidiff
Diffstat (limited to 'noncore') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp20
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.h4
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 )
115 test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox ); 115 test_gfx = new OCheckListItem( tests, tr( "4. Gfx Rendering " ), OCheckListItem::CheckBox );
116 test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox ); 116 test_ram = new OCheckListItem( tests, tr( "5. RAM Performance " ), OCheckListItem::CheckBox );
117#ifndef QT_QWS_RAMSES
117 test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox ); 118 test_sd = new OCheckListItem( tests, tr( "6. SD Card Performance " ), OCheckListItem::CheckBox );
118 test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox ); 119 test_cf = new OCheckListItem( tests, tr( "7. CF Card Performance " ), OCheckListItem::CheckBox );
119 120#endif
120 test_alu->setText( 1, "n/a" ); 121 test_alu->setText( 1, "n/a" );
121 test_fpu->setText( 1, "n/a" ); 122 test_fpu->setText( 1, "n/a" );
@@ -123,7 +124,8 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
123 test_gfx->setText( 1, "n/a" ); 124 test_gfx->setText( 1, "n/a" );
124 test_ram->setText( 1, "n/a" ); 125 test_ram->setText( 1, "n/a" );
126#ifndef QT_QWS_RAMSES
125 test_sd->setText( 1, "n/a" ); 127 test_sd->setText( 1, "n/a" );
126 test_cf->setText( 1, "n/a" ); 128 test_cf->setText( 1, "n/a" );
127 129#endif
128 test_alu->setText( 2, "n/a" ); 130 test_alu->setText( 2, "n/a" );
129 test_fpu->setText( 2, "n/a" ); 131 test_fpu->setText( 2, "n/a" );
@@ -131,6 +133,8 @@ BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
131 test_gfx->setText( 2, "n/a" ); 133 test_gfx->setText( 2, "n/a" );
132 test_ram->setText( 2, "n/a" ); 134 test_ram->setText( 2, "n/a" );
135#ifndef QT_QWS_RAMSES
133 test_sd->setText( 2, "n/a" ); 136 test_sd->setText( 2, "n/a" );
134 test_cf->setText( 2, "n/a" ); 137 test_cf->setText( 2, "n/a" );
138#endif
135 139
136 startButton = new QPushButton( tr( "&Start Tests!" ), this ); 140 startButton = new QPushButton( tr( "&Start Tests!" ), this );
@@ -183,6 +187,8 @@ void BenchmarkInfo::machineActivated( int index )
183 test_gfx->setText( 2, *(it++) ); 187 test_gfx->setText( 2, *(it++) );
184 test_ram->setText( 2, *(it++) ); 188 test_ram->setText( 2, *(it++) );
189#ifndef QT_QWS_RAMSES
185 test_sd->setText( 2, *(it++) ); 190 test_sd->setText( 2, *(it++) );
186 test_cf->setText( 2, *(it++) ); 191 test_cf->setText( 2, *(it++) );
192#endif
187} 193}
188 194
@@ -219,5 +225,5 @@ void BenchmarkInfo::run()
219 { 225 {
220 int value = gfxRendering( TEST_DURATION ); 226 int value = gfxRendering( TEST_DURATION );
221 test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4 / TEST_DURATION ) ); // 4 tests 227 test_gfx->setText( 1, QString().sprintf( "%.2f gops/sec", value / 4.0 / TEST_DURATION ) ); // 4 tests
222 test_gfx->setOn( false ); 228 test_gfx->setOn( false );
223 } 229 }
@@ -228,4 +234,5 @@ void BenchmarkInfo::run()
228 } 234 }
229 235
236#ifndef QT_QWS_RAMSES
230 if ( test_cf->isOn() ) 237 if ( test_cf->isOn() )
231 { 238 {
@@ -239,4 +246,5 @@ void BenchmarkInfo::run()
239 performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd ); 246 performFileTest( storage.sdPath() + "/benchmarkFile.dat", test_sd );
240 } 247 }
248#endif
241 249
242 startButton->setText( tr( "&Start Tests!" ) ); 250 startButton->setText( tr( "&Start Tests!" ) );
@@ -386,9 +394,9 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item
386 QFile::remove( filename ); 394 QFile::remove( filename );
387 double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 ); 395 double readSpeed = FILE_TEST_COUNT / ( read / 1000.0 );
388 QString readUnit = "kb/s"; 396 QString readUnit = "kB/s";
389 if ( readSpeed > 1024 ) 397 if ( readSpeed > 1024 )
390 { 398 {
391 readSpeed = readSpeed / 1024.0; 399 readSpeed = readSpeed / 1024.0;
392 readUnit = "mb/s"; 400 readUnit = "MB/s";
393 } 401 }
394 double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 ); 402 double writeSpeed = FILE_TEST_COUNT / ( write / 1000.0 );
@@ -397,5 +405,5 @@ void BenchmarkInfo::performFileTest( const QString& fname, OCheckListItem* item
397 { 405 {
398 writeSpeed = writeSpeed / 1024.0; 406 writeSpeed = writeSpeed / 1024.0;
399 writeUnit = "mb/s"; 407 writeUnit = "MBb/s";
400 } 408 }
401 item->setText( 1, QString().sprintf( "%.2f %s, %.2f %s", readSpeed, readUnit.latin1(), writeSpeed, writeUnit.latin1() ) ); 409 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:
41 Opie::Ui::OCheckListItem* test_gfx; 41 Opie::Ui::OCheckListItem* test_gfx;
42 Opie::Ui::OCheckListItem* test_ram; 42 Opie::Ui::OCheckListItem* test_ram;
43#ifndef QT_QWS_RAMSES
43 Opie::Ui::OCheckListItem* test_sd; 44 Opie::Ui::OCheckListItem* test_sd;
44 Opie::Ui::OCheckListItem* test_cf; 45 Opie::Ui::OCheckListItem* test_cf;
46#endif
45 47
46 bool main_rd; 48 bool main_rd;
47 bool main_wt; 49 bool main_wt;
50#ifndef QT_QWS_RAMSES
48 bool sd_rd; 51 bool sd_rd;
49 bool sd_wt; 52 bool sd_wt;
50 bool cf_rd; 53 bool cf_rd;
51 bool cf_wt; 54 bool cf_wt;
55#endif
52 56
53 QClipboard* clb; 57 QClipboard* clb;