astyle fix

This commit is contained in:
Reijo Tomperi 2009-07-04 15:54:28 +03:00
parent a7c1d99d01
commit 6e378615cf
2 changed files with 10 additions and 9 deletions

View File

@ -443,7 +443,8 @@ void MainWindow::UncheckAll()
void MainWindow::closeEvent(QCloseEvent *event) void MainWindow::closeEvent(QCloseEvent *event)
{ {
// Check that we aren't checking files // Check that we aren't checking files
if (!mThread->IsChecking()) { if (!mThread->IsChecking())
{
SaveSettings(); SaveSettings();
event->accept(); event->accept();
} }

View File

@ -28,11 +28,11 @@ TranslationHandler::TranslationHandler(QObject *parent) :
mTranslator(new QTranslator(this)) mTranslator(new QTranslator(this))
{ {
//Add our default languages //Add our default languages
mNames << QT_TRANSLATE_NOOP("MainWindow","English") mNames << QT_TRANSLATE_NOOP("MainWindow", "English")
<< QT_TRANSLATE_NOOP("MainWindow","Finnish") << QT_TRANSLATE_NOOP("MainWindow", "Finnish")
<< QT_TRANSLATE_NOOP("MainWindow","Swedish") << QT_TRANSLATE_NOOP("MainWindow", "Swedish")
<< QT_TRANSLATE_NOOP("MainWindow","German") << QT_TRANSLATE_NOOP("MainWindow", "German")
<< QT_TRANSLATE_NOOP("MainWindow","Russian"); << QT_TRANSLATE_NOOP("MainWindow", "Russian");
mFiles << "cppcheck_en" mFiles << "cppcheck_en"
<< "cppcheck_fi" << "cppcheck_fi"
@ -93,17 +93,17 @@ bool TranslationHandler::SetLanguage(const int index, QString &error)
if (!mTranslator->load(mFiles[index])) if (!mTranslator->load(mFiles[index]))
{ {
//If it failed, lets check if the default file exists //If it failed, lets check if the default file exists
if (!QFile::exists(mFiles[index]+".qm")) if (!QFile::exists(mFiles[index] + ".qm"))
{ {
error = QObject::tr("Language file %1 not found!"); error = QObject::tr("Language file %1 not found!");
error = error.arg(mFiles[index]+".qm"); error = error.arg(mFiles[index] + ".qm");
return false; return false;
} }
//If file exists, there's something wrong with it //If file exists, there's something wrong with it
error = QObject::tr("Failed to load translation for language %1 from file %2"); error = QObject::tr("Failed to load translation for language %1 from file %2");
error = error.arg(mNames[index]); error = error.arg(mNames[index]);
error = error.arg(mFiles[index]+".qm"); error = error.arg(mFiles[index] + ".qm");
return false; return false;
} }