@@ -74,9 +74,9 @@ void SpimView::file_LoadFile()
74
74
else
75
75
{
76
76
file = QFileDialog::getOpenFileName (this ,
77
- " Open Assembly Code" ,
77
+ tr ( " Open Assembly Code" ) ,
78
78
st_recentFiles[0 ],
79
- " Assembly (*.a *.s *.asm);;Text files (*.txt)" );
79
+ tr ( " Assembly (*.a *.s *.asm);;Text files (*.txt)" ) );
80
80
}
81
81
if (!file.isNull ())
82
82
{
@@ -125,9 +125,9 @@ void SpimView::file_SaveLogFile()
125
125
slf->setupUi (saveLogFileDialog);
126
126
127
127
QFileDialog* fb = new QFileDialog (0 ,
128
- " Save To Log File" ,
128
+ tr ( " Save To Log File" ) ,
129
129
" " ,
130
- " Text files (*.txt);; All (*)" );
130
+ tr ( " Text files (*.txt);; All (*)" ) );
131
131
QObject::connect (slf->saveFileToolButton , SIGNAL (clicked ()), fb, SLOT (exec ()));
132
132
QObject::connect (fb, SIGNAL (fileSelected (QString)), slf->SaveLineEdit , SLOT (setText (QString)));
133
133
}
@@ -182,7 +182,7 @@ void SpimView::file_Print()
182
182
{
183
183
QPrinter printer;
184
184
QPrintDialog printDialog (&printer, this );
185
- printDialog.setWindowTitle (" Print Windows" );
185
+ printDialog.setWindowTitle (tr ( " Print Windows" ) );
186
186
187
187
if (printDialog.exec () == QDialog::Accepted)
188
188
{
@@ -229,6 +229,7 @@ void SpimView::file_Exit()
229
229
void SpimView::sim_ClearRegisters ()
230
230
{
231
231
initialize_registers ();
232
+ PC = TEXT_BOT; // !
232
233
233
234
DisplayIntRegisters ();
234
235
DisplayFPRegisters ();
@@ -237,15 +238,15 @@ void SpimView::sim_ClearRegisters()
237
238
238
239
void SpimView::sim_ReinitializeSimulator ()
239
240
{
240
- write_output (message_out, " <hr>Memory and registers cleared\n\n " );
241
+ write_output (message_out, tr ( " <hr>Memory and registers cleared\n\n " ). toStdString (). c_str () );
241
242
InitializeWorld ();
242
243
SpimConsole->Clear ();
243
244
initStack ();
244
245
245
246
SetOutputColor (" green" );
246
247
write_startup_message ();
247
248
write_output (message_out,
248
- " QtSPIM is linked to the Qt library, which is distributed under the GNU Lesser General Public License version 3 and version 2.1.\n " );
249
+ tr ( " QtSPIM is linked to the Qt library, which is distributed under the GNU Lesser General Public License version 3 and version 2.1.\n " ). toStdString (). c_str () );
249
250
SetOutputColor (" black" );
250
251
251
252
CaptureIntRegisters ();
@@ -369,19 +370,19 @@ void SpimView::updateStatus(PROGSTATE status)
369
370
break ;
370
371
371
372
case STOPPED:
372
- Window->statusBar ()->showMessage (" Stopped" );
373
+ Window->statusBar ()->showMessage (tr ( " Stopped" ) );
373
374
break ;
374
375
375
376
case PAUSED:
376
- Window->statusBar ()->showMessage (" Paused" );
377
+ Window->statusBar ()->showMessage (tr ( " Paused" ) );
377
378
break ;
378
379
379
380
case RUNNING:
380
- Window->statusBar ()->showMessage (" Running" );
381
+ Window->statusBar ()->showMessage (tr ( " Running" ) );
381
382
break ;
382
383
383
384
case SINGLESTEP:
384
- Window->statusBar ()->showMessage (" Single Step" );
385
+ Window->statusBar ()->showMessage (tr ( " Single Step" ) );
385
386
break ;
386
387
387
388
default :
@@ -413,7 +414,7 @@ void SpimView::executeProgram(mem_addr pc, int steps, bool display, bool contBkp
413
414
connect (bpd->singleStepPushButton , SIGNAL (clicked ()), this , SLOT (singleStepBreakpoint ()));
414
415
connect (bpd->abortPushButton , SIGNAL (clicked ()), this , SLOT (abortBreakpoint ()));
415
416
}
416
- bpd->label ->setText (" Execution stopped at breakpoint at " + QString (" 0x" ) + formatAddress (PC));
417
+ bpd->label ->setText (tr ( " Execution stopped at breakpoint at " ) + QString (" 0x" ) + formatAddress (PC));
417
418
breakpointDialog->show ();
418
419
}
419
420
else if (!continuable)
@@ -480,9 +481,9 @@ void SpimView::sim_Settings()
480
481
sd.loadExceptionHandlerCheckBox ->setChecked (st_loadExceptionHandler);
481
482
sd.exceptionHandlerLineEdit ->setText (st_exceptionHandlerFileName);
482
483
QFileDialog exceptionFileDialog (0 ,
483
- " Open Exception File" ,
484
+ tr ( " Open Exception File" ) ,
484
485
st_exceptionHandlerFileName,
485
- " Assembly (*.a *.s *.asm);;Text files (*.txt)" );
486
+ tr ( " Assembly (*.a *.s *.asm);;Text files (*.txt)" ) );
486
487
QObject::connect (sd.exceptionHandlerToolButton , SIGNAL (clicked ()), &exceptionFileDialog, SLOT (exec ()));
487
488
QObject::connect (&exceptionFileDialog, SIGNAL (fileSelected (QString)),
488
489
sd.exceptionHandlerLineEdit , SLOT (setText (QString)));
@@ -851,20 +852,20 @@ void SpimView::help_AboutSPIM()
851
852
{
852
853
QMessageBox box (QMessageBox::NoIcon,
853
854
tr (" About QtSpim" ),
854
- QString (" <span style='font-size: 16pt;'>"
855
+ QString (tr ( " <span style='font-size: 16pt;'>"
855
856
" <center><strong>QtSpim</strong></center>"
856
857
" <center><img src=':/icons/qtspim.png'>"
857
- " <span style='font-size: 10pt;'>" )
858
+ " <span style='font-size: 10pt;'>" ))
858
859
+ QString (" <p>" ) + QString (SPIM_VERSION) + QString (" </p>" )
859
- + QString (" <p>SPIM is a simulator of the MIPS R3000 processor.</p>"
860
+ + QString (tr ( " <p>SPIM is a simulator of the MIPS R3000 processor.</p>"
860
861
" <p>Copyright (c) 1990-2015, James R. Larus ([email protected] ).</p>"
861
862
" <p>SPIM is distributed under a BSD license.</p>"
862
863
" <p>For more information, source code, and binaries:</p>"
863
864
" <p><a href='https://sourceforge.net/projects/spimsimulator/'>https://sourceforge.net/projects/spimsimulator/</a></p>"
864
865
" <p>QtSPIM is linked to the Qt library, which is distributed under the GNU Lesser General Public License version 3 and GNU Lesser General Public License version 2.1.</p>"
865
866
" <p><a href='http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html'>GNU Lesser General Public License, version 2.1</a></p>"
866
867
" <p><a href='http://www.gnu.org/licenses/lgpl-3.0.html'>GNU Lesser General Public License, version 3</a></p>"
867
- " </span>" ),
868
+ " </span>" )) ,
868
869
QMessageBox::Ok);
869
870
box.exec ();
870
871
}
0 commit comments