3535#include " ../src/cppcheckexecutor.h"
3636
3737MainWindow::MainWindow () :
38- mSettings(tr( " Cppcheck" ), tr( " Cppcheck-GUI" ) ),
38+ mSettings(" Cppcheck" , " Cppcheck-GUI" ),
3939 mActionExit(tr(" E&xit" ), this),
4040 mActionCheckFiles(tr(" &Check files(s)" ), this),
4141 mActionClearResults(tr(" Clear &results" ), this),
@@ -184,20 +184,20 @@ void MainWindow::CreateToolbar()
184184
185185void MainWindow::LoadSettings ()
186186{
187- if (mSettings .value (tr ( " Window maximized" ) , false ).toBool ())
187+ if (mSettings .value (" Window maximized" , false ).toBool ())
188188 {
189189 showMaximized ();
190190 }
191191 else
192192 {
193- resize (mSettings .value (tr ( " Window width" ) , 800 ).toInt (),
194- mSettings .value (tr ( " Window height" ) , 600 ).toInt ());
193+ resize (mSettings .value (" Window width" , 800 ).toInt (),
194+ mSettings .value (" Window height" , 600 ).toInt ());
195195 }
196196
197- mActionShowAll .setChecked (mSettings .value (tr ( " Show all" ) , true ).toBool ());
198- mActionShowSecurity .setChecked (mSettings .value (tr ( " Show security" ) , true ).toBool ());
199- mActionShowStyle .setChecked (mSettings .value (tr ( " Show style" ) , true ).toBool ());
200- mActionShowErrors .setChecked (mSettings .value (tr ( " Show errors" ) , true ).toBool ());
197+ mActionShowAll .setChecked (mSettings .value (" Show all" , true ).toBool ());
198+ mActionShowSecurity .setChecked (mSettings .value (" Show security" , true ).toBool ());
199+ mActionShowStyle .setChecked (mSettings .value (" Show style" , true ).toBool ());
200+ mActionShowErrors .setChecked (mSettings .value (" Show errors" , true ).toBool ());
201201
202202 mResults .ShowResults (SHOW_ALL , mActionShowAll .isChecked ());
203203 mResults .ShowResults (SHOW_ERRORS , mActionShowErrors .isChecked ());
@@ -211,14 +211,14 @@ void MainWindow::LoadSettings()
211211
212212void MainWindow::SaveSettings ()
213213{
214- mSettings .setValue (tr ( " Window width" ) , size ().width ());
215- mSettings .setValue (tr ( " Window height" ) , size ().height ());
216- mSettings .setValue (tr ( " Window maximized" ) , isMaximized ());
214+ mSettings .setValue (" Window width" , size ().width ());
215+ mSettings .setValue (" Window height" , size ().height ());
216+ mSettings .setValue (" Window maximized" , isMaximized ());
217217
218- mSettings .setValue (tr ( " Show all" ) , mActionShowAll .isChecked ());
219- mSettings .setValue (tr ( " Show security" ) , mActionShowSecurity .isChecked ());
220- mSettings .setValue (tr ( " Show style" ) , mActionShowStyle .isChecked ());
221- mSettings .setValue (tr ( " Show errors" ) , mActionShowErrors .isChecked ());
218+ mSettings .setValue (" Show all" , mActionShowAll .isChecked ());
219+ mSettings .setValue (" Show security" , mActionShowSecurity .isChecked ());
220+ mSettings .setValue (" Show style" , mActionShowStyle .isChecked ());
221+ mSettings .setValue (" Show errors" , mActionShowErrors .isChecked ());
222222
223223 mSettings .setValue (" Toolbars/ShowStandard" , mActionViewStandardToolbar .isChecked ());
224224
@@ -236,7 +236,7 @@ void MainWindow::DoCheckFiles(QFileDialog::FileMode mode)
236236 {
237237 selected = QFileDialog::getOpenFileNames (this ,
238238 tr (" Select files to check" ),
239- mSettings .value (tr ( " Check path" ) , " " ).toString ());
239+ mSettings .value (" Check path" , " " ).toString ());
240240 if (selected.isEmpty ())
241241 mCurrentDirectory .clear ();
242242 FormatAndSetTitle ();
@@ -245,7 +245,7 @@ void MainWindow::DoCheckFiles(QFileDialog::FileMode mode)
245245 {
246246 QString dir = QFileDialog::getExistingDirectory (this ,
247247 tr (" Select directory to check" ),
248- mSettings .value (tr ( " Check path" ) , " " ).toString ());
248+ mSettings .value (" Check path" , " " ).toString ());
249249 if (!dir.isEmpty ())
250250 {
251251 mCurrentDirectory = dir;
@@ -285,7 +285,7 @@ void MainWindow::DoCheckFiles(QFileDialog::FileMode mode)
285285 mThread ->SetFiles (RemoveUnacceptedFiles (fileNames));
286286 QFileInfo inf (fileNames[0 ]);
287287 QString absDirectory = inf.absoluteDir ().path ();
288- mSettings .setValue (tr ( " Check path" ) , absDirectory);
288+ mSettings .setValue (" Check path" , absDirectory);
289289 EnableCheckButtons (false );
290290 mActionSettings .setEnabled (false );
291291 mResults .SetCheckDirectory (absDirectory);
@@ -336,11 +336,11 @@ Settings MainWindow::GetCppcheckSettings()
336336 result._checkCodingStyle = true ;
337337 result._errorsOnly = false ;
338338 result._verbose = true ;
339- result._force = mSettings .value (tr ( " Check force" ) , 1 ).toBool ();
339+ result._force = mSettings .value (" Check force" , 1 ).toBool ();
340340 result._xml = false ;
341341 result._unusedFunctions = false ;
342342 result._security = true ;
343- result._jobs = mSettings .value (tr ( " Check threads" ) , 1 ).toInt ();
343+ result._jobs = mSettings .value (" Check threads" , 1 ).toInt ();
344344
345345 if (result._jobs <= 0 )
346346 {
0 commit comments