fixed "QMetaObject::connectSlotsByName: No matching signal for" warnings

This commit is contained in:
Rafael 2016-04-03 06:12:12 +02:00
parent 9c4adc8779
commit cee1d0f861
11 changed files with 41 additions and 41 deletions

View file

@ -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)
{

View file

@ -36,7 +36,7 @@ public:
~PictureDialog();
public slots:
void on_playerNameUpdated();
void playerNameUpdated();
private slots:
void on_cmdClose_clicked();

View file

@ -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)
{

View file

@ -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;

View file

@ -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()));

View file

@ -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);

View file

@ -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()));

View file

@ -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);

View file

@ -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());

View file

@ -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:

View file

@ -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();