GUI: Make few strings const strings.

This commit is contained in:
Kimmo Varis 2011-08-22 22:37:38 +03:00
parent 981c28845f
commit b732fc0a3e
1 changed files with 6 additions and 6 deletions

View File

@ -212,7 +212,7 @@ void MainWindow::LoadSettings()
bool succeeded = mApplications->LoadSettings(); bool succeeded = mApplications->LoadSettings();
if (!succeeded) if (!succeeded)
{ {
QString msg = tr("There was a problem with loading the editor application settings.\n\n" const QString msg = tr("There was a problem with loading the editor application settings.\n\n"
"This is probably because the settings were changed between the Cppcheck versions. " "This is probably because the settings were changed between the Cppcheck versions. "
"Please check (and fix) the editor application settings, otherwise the editor " "Please check (and fix) the editor application settings, otherwise the editor "
"program might not start correctly."); "program might not start correctly.");
@ -565,7 +565,7 @@ void MainWindow::ClearResults()
void MainWindow::OpenXML() void MainWindow::OpenXML()
{ {
QString selectedFilter; QString selectedFilter;
QString filter(tr("XML files (*.xml)")); const QString filter(tr("XML files (*.xml)"));
QString selectedFile = QFileDialog::getOpenFileName(this, QString selectedFile = QFileDialog::getOpenFileName(this,
tr("Open the report file"), tr("Open the report file"),
QString(), QString(),
@ -639,7 +639,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
} }
else else
{ {
QString text(tr("Checking is running.\n\n" \ const QString text(tr("Checking is running.\n\n" \
"Do you want to stop the checking and exit Cppcheck?.")); "Do you want to stop the checking and exit Cppcheck?."));
QMessageBox msg(QMessageBox::Warning, QMessageBox msg(QMessageBox::Warning,
@ -701,7 +701,7 @@ void MainWindow::ShowAuthors()
void MainWindow::Save() void MainWindow::Save()
{ {
QString selectedFilter; QString selectedFilter;
QString filter(tr("XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv)")); const QString filter(tr("XML files version 2 (*.xml);;XML files version 1 (*.xml);;Text files (*.txt);;CSV files (*.csv)"));
QString selectedFile = QFileDialog::getSaveFileName(this, QString selectedFile = QFileDialog::getSaveFileName(this,
tr("Save the report file"), tr("Save the report file"),
QString(), QString(),
@ -857,7 +857,7 @@ void MainWindow::LoadProjectFile(const QString &filePath)
delete mProject; delete mProject;
mProject = new Project(filePath, this); mProject = new Project(filePath, this);
mProject->Open(); mProject->Open();
QString rootpath = mProject->GetProjectFile()->GetRootPath(); const QString rootpath = mProject->GetProjectFile()->GetRootPath();
// If the root path is not given or is not "current dir", use project // If the root path is not given or is not "current dir", use project
// file's location directory as root path // file's location directory as root path
@ -1010,7 +1010,7 @@ void MainWindow::OpenRecentProject()
} }
else else
{ {
QString text(tr("The project file\n\n%1\n\n could not be found!\n\n" const QString text(tr("The project file\n\n%1\n\n could not be found!\n\n"
"Do you want to remove the file from the recently " "Do you want to remove the file from the recently "
"used projects -list?").arg(project)); "used projects -list?").arg(project));