From cee1d0f861b0e1f1aedcd83530e843b30b5b452b Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 3 Apr 2016 06:12:12 +0200 Subject: [PATCH] fixed "QMetaObject::connectSlotsByName: No matching signal for" warnings --- PictureDialog.cpp | 2 +- PictureDialog.h | 2 +- ProfileInterface.cpp | 40 ++++++++++++++++++++-------------------- ProfileInterface.h | 16 ++++++++-------- SavegameWidget.cpp | 4 ++-- SavegameWidget.h | 2 +- SnapmaticWidget.cpp | 6 +++--- SnapmaticWidget.h | 2 +- UserInterface.cpp | 4 ++-- UserInterface.h | 2 +- main.cpp | 2 +- 11 files changed, 41 insertions(+), 41 deletions(-) diff --git a/PictureDialog.cpp b/PictureDialog.cpp index 1163c0d..e02d44a 100755 --- a/PictureDialog.cpp +++ b/PictureDialog.cpp @@ -128,7 +128,7 @@ void PictureDialog::setSnapmaticPicture(SnapmaticPicture *picture, QString pictu this->setMaximumSize(960, frm_h); } -void PictureDialog::on_playerNameUpdated() +void PictureDialog::playerNameUpdated() { if (plyrsList.count() >= 1) { diff --git a/PictureDialog.h b/PictureDialog.h index b93bac3..7c56065 100755 --- a/PictureDialog.h +++ b/PictureDialog.h @@ -36,7 +36,7 @@ public: ~PictureDialog(); public slots: - void on_playerNameUpdated(); + void playerNameUpdated(); private slots: void on_cmdClose_clicked(); diff --git a/ProfileInterface.cpp b/ProfileInterface.cpp index 6659a32..c51142e 100755 --- a/ProfileInterface.cpp +++ b/ProfileInterface.cpp @@ -91,14 +91,14 @@ void ProfileInterface::setupProfileInterface() { ui->labProfileLoading->setText(tr("Loading...")); profileLoader = new ProfileLoader(profileFolder, crewDB); - QObject::connect(profileLoader, SIGNAL(savegameLoaded(SavegameData*, QString)), this, SLOT(on_savegameLoaded(SavegameData*, QString))); - QObject::connect(profileLoader, SIGNAL(pictureLoaded(SnapmaticPicture*, QString)), this, SLOT(on_pictureLoaded(SnapmaticPicture*, QString))); - QObject::connect(profileLoader, SIGNAL(loadingProgress(int,int)), this, SLOT(on_loadingProgress(int,int))); - QObject::connect(profileLoader, SIGNAL(finished()), this, SLOT(on_profileLoaded())); + QObject::connect(profileLoader, SIGNAL(savegameLoaded(SavegameData*, QString)), this, SLOT(savegameLoaded(SavegameData*, QString))); + QObject::connect(profileLoader, SIGNAL(pictureLoaded(SnapmaticPicture*, QString)), this, SLOT(pictureLoaded(SnapmaticPicture*, QString))); + QObject::connect(profileLoader, SIGNAL(loadingProgress(int,int)), this, SLOT(loadingProgress(int,int))); + QObject::connect(profileLoader, SIGNAL(finished()), this, SLOT(profileLoaded())); profileLoader->start(); } -void ProfileInterface::on_savegameLoaded(SavegameData *savegame, QString savegamePath) +void ProfileInterface::savegameLoaded(SavegameData *savegame, QString savegamePath) { SavegameWidget *sgdWidget = new SavegameWidget(); sgdWidget->setSavegameData(savegame, savegamePath); @@ -106,12 +106,12 @@ void ProfileInterface::on_savegameLoaded(SavegameData *savegame, QString savegam widgets[sgdWidget] = "SavegameWidget"; savegames.append(savegame); if (selectedWidgts != 0) { sgdWidget->setSelectionMode(true); } - QObject::connect(sgdWidget, SIGNAL(savegameDeleted()), this, SLOT(on_savegameDeleted())); - QObject::connect(sgdWidget, SIGNAL(widgetSelected()), this, SLOT(on_profileWidgetSelected())); - QObject::connect(sgdWidget, SIGNAL(widgetDeselected()), this, SLOT(on_profileWidgetDeselected())); + QObject::connect(sgdWidget, SIGNAL(savegameDeleted()), this, SLOT(savegameDeleted())); + QObject::connect(sgdWidget, SIGNAL(widgetSelected()), this, SLOT(profileWidgetSelected())); + QObject::connect(sgdWidget, SIGNAL(widgetDeselected()), this, SLOT(profileWidgetDeselected())); } -void ProfileInterface::on_pictureLoaded(SnapmaticPicture *picture, QString picturePath) +void ProfileInterface::pictureLoaded(SnapmaticPicture *picture, QString picturePath) { SnapmaticWidget *picWidget = new SnapmaticWidget(profileDB, threadDB); picWidget->setSnapmaticPicture(picture, picturePath); @@ -119,19 +119,19 @@ void ProfileInterface::on_pictureLoaded(SnapmaticPicture *picture, QString pictu widgets[picWidget] = "SnapmaticWidget"; pictures.append(picture); if (selectedWidgts != 0) { picWidget->setSelectionMode(true); } - QObject::connect(picWidget, SIGNAL(pictureDeleted()), this, SLOT(on_pictureDeleted())); - QObject::connect(picWidget, SIGNAL(widgetSelected()), this, SLOT(on_profileWidgetSelected())); - QObject::connect(picWidget, SIGNAL(widgetDeselected()), this, SLOT(on_profileWidgetDeselected())); + QObject::connect(picWidget, SIGNAL(pictureDeleted()), this, SLOT(pictureDeleted())); + QObject::connect(picWidget, SIGNAL(widgetSelected()), this, SLOT(profileWidgetSelected())); + QObject::connect(picWidget, SIGNAL(widgetDeselected()), this, SLOT(profileWidgetDeselected())); } -void ProfileInterface::on_loadingProgress(int value, int maximum) +void ProfileInterface::loadingProgress(int value, int maximum) { ui->pbPictureLoading->setMaximum(maximum); ui->pbPictureLoading->setValue(value); ui->labProfileLoading->setText(loadingStr.arg(QString::number(value), QString::number(maximum))); } -void ProfileInterface::on_profileLoaded() +void ProfileInterface::profileLoaded() { saSpacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->saProfileContent->layout()->addItem(saSpacerItem); @@ -140,7 +140,7 @@ void ProfileInterface::on_profileLoaded() ui->cmdImport->setEnabled(true); } -void ProfileInterface::on_savegameDeleted() +void ProfileInterface::savegameDeleted() { SavegameWidget *sgdWidget = (SavegameWidget*)sender(); SavegameData *savegame = sgdWidget->getSavegame(); @@ -150,7 +150,7 @@ void ProfileInterface::on_savegameDeleted() delete savegame; } -void ProfileInterface::on_pictureDeleted() +void ProfileInterface::pictureDeleted() { SnapmaticWidget *picWidget = (SnapmaticWidget*)sender(); SnapmaticPicture *picture = picWidget->getPicture(); @@ -286,7 +286,7 @@ bool ProfileInterface::importSnapmaticPicture(SnapmaticPicture *picture, QString } else if (QFile::copy(picPath, profileFolder + "/" + picFileName)) { - on_pictureLoaded(picture, profileFolder + "/" + picFileName); + pictureLoaded(picture, profileFolder + "/" + picFileName); return true; } else @@ -322,7 +322,7 @@ bool ProfileInterface::importSavegameData(SavegameData *savegame, QString sgdPat { if (QFile::copy(sgdPath, profileFolder + "/" + sgdFileName)) { - on_savegameLoaded(savegame, profileFolder + "/" + sgdFileName); + savegameLoaded(savegame, profileFolder + "/" + sgdFileName); return true; } else @@ -338,7 +338,7 @@ bool ProfileInterface::importSavegameData(SavegameData *savegame, QString sgdPat } } -void ProfileInterface::on_profileWidgetSelected() +void ProfileInterface::profileWidgetSelected() { if (selectedWidgts == 0) { @@ -350,7 +350,7 @@ void ProfileInterface::on_profileWidgetSelected() selectedWidgts++; } -void ProfileInterface::on_profileWidgetDeselected() +void ProfileInterface::profileWidgetDeselected() { if (selectedWidgts == 1) { diff --git a/ProfileInterface.h b/ProfileInterface.h index 675d547..df17935 100755 --- a/ProfileInterface.h +++ b/ProfileInterface.h @@ -47,15 +47,15 @@ public: private slots: void on_cmdCloseProfile_clicked(); - void on_pictureLoaded(SnapmaticPicture *picture, QString picturePath); - void on_savegameLoaded(SavegameData *savegame, QString savegamePath); - void on_loadingProgress(int value, int maximum); - void on_savegameDeleted(); - void on_pictureDeleted(); - void on_profileLoaded(); void on_cmdImport_clicked(); - void on_profileWidgetSelected(); - void on_profileWidgetDeselected(); + void pictureLoaded(SnapmaticPicture *picture, QString picturePath); + void savegameLoaded(SavegameData *savegame, QString savegamePath); + void loadingProgress(int value, int maximum); + void savegameDeleted(); + void pictureDeleted(); + void profileLoaded(); + void profileWidgetSelected(); + void profileWidgetDeselected(); private: ProfileDatabase *profileDB; diff --git a/SavegameWidget.cpp b/SavegameWidget.cpp index 3a24d3c..6a65258 100755 --- a/SavegameWidget.cpp +++ b/SavegameWidget.cpp @@ -112,7 +112,7 @@ void SavegameWidget::setChecked(bool isChecked) ui->cbSelected->setChecked(isChecked); } -void SavegameWidget::on_savegameSelected() +void SavegameWidget::savegameSelected() { setChecked(true); } @@ -167,7 +167,7 @@ void SavegameWidget::contextMenuEvent(QContextMenuEvent *ev) QMenu contextMenu(this); if (!ui->cbSelected->isChecked()) { - contextMenu.addAction(tr("Select"), this, SLOT(on_savegameSelected())); + contextMenu.addAction(tr("Select"), this, SLOT(savegameSelected())); contextMenu.addSeparator(); } contextMenu.addAction(tr("View savegame"), this, SLOT(on_cmdView_clicked())); diff --git a/SavegameWidget.h b/SavegameWidget.h index 553bceb..c2a88d2 100755 --- a/SavegameWidget.h +++ b/SavegameWidget.h @@ -46,9 +46,9 @@ private slots: void on_cmdView_clicked(); void on_cmdCopy_clicked(); void on_cmdDelete_clicked(); - void on_savegameSelected(); void on_cbSelected_stateChanged(int arg1); void changeCheckedState(); + void savegameSelected(); protected: void mouseDoubleClickEvent(QMouseEvent *ev); diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp index 9ef52d4..c9922d5 100755 --- a/SnapmaticWidget.cpp +++ b/SnapmaticWidget.cpp @@ -77,7 +77,7 @@ void SnapmaticWidget::on_cmdView_clicked() picDialog->setModal(true); // be ready for playerName updated - QObject::connect(threadDB, SIGNAL(playerNameUpdated()), picDialog, SLOT(on_playerNameUpdated())); + QObject::connect(threadDB, SIGNAL(playerNameUpdated()), picDialog, SLOT(playerNameUpdated())); // show picture dialog picDialog->show(); @@ -165,7 +165,7 @@ void SnapmaticWidget::setChecked(bool isChecked) ui->cbSelected->setChecked(isChecked); } -void SnapmaticWidget::on_pictureSelected() +void SnapmaticWidget::pictureSelected() { setChecked(true); } @@ -175,7 +175,7 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev) QMenu contextMenu(this); if (!ui->cbSelected->isChecked()) { - contextMenu.addAction(tr("Select"), this, SLOT(on_pictureSelected())); + contextMenu.addAction(tr("Select"), this, SLOT(pictureSelected())); contextMenu.addSeparator(); } contextMenu.addAction(tr("View picture"), this, SLOT(on_cmdView_clicked())); diff --git a/SnapmaticWidget.h b/SnapmaticWidget.h index 6bfa7d4..e007fc5 100755 --- a/SnapmaticWidget.h +++ b/SnapmaticWidget.h @@ -49,9 +49,9 @@ private slots: void on_cmdCopy_clicked(); void on_cmdExport_clicked(); void on_cmdDelete_clicked(); - void on_pictureSelected(); void on_cbSelected_stateChanged(int arg1); void changeCheckedState(); + void pictureSelected(); protected: void mouseDoubleClickEvent(QMouseEvent *ev); diff --git a/UserInterface.cpp b/UserInterface.cpp index c649470..aea07e1 100755 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -102,7 +102,7 @@ void UserInterface::setupProfileUi(QStringList GTAV_Profiles) profileBtn->setAutoDefault(true); ui->swSelection->layout()->addWidget(profileBtn); - QObject::connect(profileBtn, SIGNAL(clicked(bool)), this, SLOT(on_profileButton_clicked())); + QObject::connect(profileBtn, SIGNAL(clicked(bool)), this, SLOT(profileButton_clicked())); } QSpacerItem *buttomSpacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); ui->swSelection->layout()->addItem(buttomSpacerItem); @@ -122,7 +122,7 @@ void UserInterface::setupProfileUi(QStringList GTAV_Profiles) QObject::connect(cmdClose, SIGNAL(clicked(bool)), this, SLOT(close())); } -void UserInterface::on_profileButton_clicked() +void UserInterface::profileButton_clicked() { QPushButton *profileBtn = (QPushButton*)sender(); openProfile(profileBtn->objectName()); diff --git a/UserInterface.h b/UserInterface.h index 1fec791..913c901 100755 --- a/UserInterface.h +++ b/UserInterface.h @@ -40,9 +40,9 @@ public: private slots: void closeProfile(); + void profileButton_clicked(); void on_actionExit_triggered(); void on_actionSelect_profile_triggered(); - void on_profileButton_clicked(); void on_actionAbout_gta5sync_triggered(); private: diff --git a/main.cpp b/main.cpp index 71583eb..616c8c1 100755 --- a/main.cpp +++ b/main.cpp @@ -396,7 +396,7 @@ int main(int argc, char *argv[]) if (!readOk) { return 1; } QObject::connect(threadDB, SIGNAL(playerNameFound(int, QString)), profileDB, SLOT(setPlayerName(int, QString))); - QObject::connect(threadDB, SIGNAL(playerNameUpdated()), picDialog, SLOT(on_playerNameUpdated())); + QObject::connect(threadDB, SIGNAL(playerNameUpdated()), picDialog, SLOT(playerNameUpdated())); threadDB->start(); picDialog->show();