Skip to content

Commit c1eb71e

Browse files
committed
GUI: Rename methods
1 parent 97a8631 commit c1eb71e

20 files changed

+299
-301
lines changed

gui/applicationdialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ ApplicationDialog::ApplicationDialog(const QString &title,
3434
{
3535
mUI.setupUi(this);
3636

37-
connect(mUI.mButtonBrowse, SIGNAL(clicked()), this, SLOT(Browse()));
38-
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(Ok()));
37+
connect(mUI.mButtonBrowse, SIGNAL(clicked()), this, SLOT(browse()));
38+
connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(ok()));
3939
connect(mUI.mButtons, SIGNAL(rejected()), this, SLOT(reject()));
4040
mUI.mPath->setText(app.getPath());
4141
mUI.mName->setText(app.getName());
@@ -50,7 +50,7 @@ ApplicationDialog::~ApplicationDialog()
5050
//dtor
5151
}
5252

53-
void ApplicationDialog::Browse()
53+
void ApplicationDialog::browse()
5454
{
5555
QString filter;
5656
#ifdef Q_OS_WIN
@@ -70,7 +70,7 @@ void ApplicationDialog::Browse()
7070
}
7171
}
7272

73-
void ApplicationDialog::Ok()
73+
void ApplicationDialog::ok()
7474
{
7575
if (mUI.mName->text().isEmpty() || mUI.mPath->text().isEmpty()) {
7676
QMessageBox msg(QMessageBox::Warning,

gui/applicationdialog.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ class ApplicationDialog : public QDialog {
5151

5252
protected slots:
5353

54-
void Ok();
54+
void ok();
5555

5656
/**
5757
* @brief Slot to browse for an application
5858
*
5959
*/
60-
void Browse();
60+
void browse();
6161

6262
protected:
6363

gui/checkthread.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ void CheckThread::run()
6565
mCppcheck.analyseWholeProgram(buildDir, files2);
6666
}
6767
mFiles.clear();
68-
emit Done();
68+
emit done();
6969
return;
7070
}
7171

7272
QString file = mResult.getNextFile();
7373
while (!file.isEmpty() && mState == Running) {
7474
qDebug() << "Checking file" << file;
7575
mCppcheck.check(file.toStdString());
76-
emit FileChecked(file);
76+
emit fileChecked(file);
7777

7878
if (mState == Running)
7979
file = mResult.getNextFile();
@@ -84,7 +84,7 @@ void CheckThread::run()
8484
file = QString::fromStdString(fileSettings.filename);
8585
qDebug() << "Checking file" << file;
8686
mCppcheck.check(fileSettings);
87-
emit FileChecked(file);
87+
emit fileChecked(file);
8888

8989
if (mState == Running)
9090
fileSettings = mResult.getNextFileSettings();
@@ -95,7 +95,7 @@ void CheckThread::run()
9595
else
9696
mState = Stopped;
9797

98-
emit Done();
98+
emit done();
9999
}
100100

101101
void CheckThread::stop()

gui/checkthread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ class CheckThread : public QThread {
6767
* @brief cpp checking is done
6868
*
6969
*/
70-
void Done();
70+
void done();
7171

72-
void FileChecked(const QString &file);
72+
void fileChecked(const QString &file);
7373
protected:
7474

7575
/**

gui/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
6565
}
6666

6767
TranslationHandler* th = new TranslationHandler(&app);
68-
th->SetLanguage(settings->value(SETTINGS_LANGUAGE, th->SuggestLanguage()).toString());
68+
th->setLanguage(settings->value(SETTINGS_LANGUAGE, th->suggestLanguage()).toString());
6969

7070
if (!CheckArgs(app.arguments()))
7171
return 0;

gui/mainwindow.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ void MainWindow::saveSettings() const
351351

352352
mApplications->saveSettings();
353353

354-
mSettings->setValue(SETTINGS_LANGUAGE, mTranslation->GetCurrentLanguage());
354+
mSettings->setValue(SETTINGS_LANGUAGE, mTranslation->getCurrentLanguage());
355355
mUI.mResults->saveSettings(mSettings);
356356
}
357357

@@ -459,14 +459,14 @@ void MainWindow::checkCode(const QString& code, const QString& filename)
459459
// Initialize dummy ThreadResult as ErrorLogger
460460
ThreadResult result;
461461
result.setFiles(QStringList(filename));
462-
connect(&result, SIGNAL(Progress(int, const QString&)),
463-
mUI.mResults, SLOT(Progress(int, const QString&)));
464-
connect(&result, SIGNAL(Error(const ErrorItem &)),
465-
mUI.mResults, SLOT(Error(const ErrorItem &)));
466-
connect(&result, SIGNAL(Log(const QString &)),
467-
this, SLOT(Log(const QString &)));
468-
connect(&result, SIGNAL(DebugError(const ErrorItem &)),
469-
this, SLOT(DebugError(const ErrorItem &)));
462+
connect(&result, SIGNAL(progress(int, const QString&)),
463+
mUI.mResults, SLOT(progress(int, const QString&)));
464+
connect(&result, SIGNAL(error(const ErrorItem &)),
465+
mUI.mResults, SLOT(error(const ErrorItem &)));
466+
connect(&result, SIGNAL(log(const QString &)),
467+
this, SLOT(log(const QString &)));
468+
connect(&result, SIGNAL(debugError(const ErrorItem &)),
469+
this, SLOT(debugError(const ErrorItem &)));
470470

471471
// Create CppCheck instance
472472
CppCheck cppcheck(result, true);
@@ -895,13 +895,13 @@ void MainWindow::programSettings()
895895
{
896896
SettingsDialog dialog(mApplications, mTranslation, this);
897897
if (dialog.exec() == QDialog::Accepted) {
898-
dialog.SaveSettingValues();
899-
mUI.mResults->updateSettings(dialog.ShowFullPath(),
900-
dialog.SaveFullPath(),
901-
dialog.SaveAllErrors(),
902-
dialog.ShowNoErrorsMessage(),
903-
dialog.ShowErrorId(),
904-
dialog.ShowInconclusive());
898+
dialog.saveSettingValues();
899+
mUI.mResults->updateSettings(dialog.showFullPath(),
900+
dialog.saveFullPath(),
901+
dialog.saveAllErrors(),
902+
dialog.showNoErrorsMessage(),
903+
dialog.showErrorId(),
904+
dialog.showInconclusive());
905905
const QString newLang = mSettings->value(SETTINGS_LANGUAGE, "en").toString();
906906
setLanguage(newLang);
907907
}
@@ -1231,11 +1231,11 @@ void MainWindow::formatAndSetTitle(const QString &text)
12311231

12321232
void MainWindow::setLanguage(const QString &code)
12331233
{
1234-
const QString currentLang = mTranslation->GetCurrentLanguage();
1234+
const QString currentLang = mTranslation->getCurrentLanguage();
12351235
if (currentLang == code)
12361236
return;
12371237

1238-
if (mTranslation->SetLanguage(code)) {
1238+
if (mTranslation->setLanguage(code)) {
12391239
//Translate everything that is visible here
12401240
mUI.retranslateUi(this);
12411241
mUI.mResults->translate();

gui/project.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ bool Project::open()
8686
bool Project::edit()
8787
{
8888
ProjectFileDialog dlg(mFilename, mParentWidget);
89-
dlg.LoadFromProjectFile(mProjectFile);
89+
dlg.loadFromProjectFile(mProjectFile);
9090
if (dlg.exec() != QDialog::Accepted)
9191
return false;
9292

93-
dlg.SaveToProjectFile(mProjectFile);
93+
dlg.saveToProjectFile(mProjectFile);
9494

9595
if (!mProjectFile->write()) {
9696
QMessageBox msg(QMessageBox::Critical,

0 commit comments

Comments
 (0)