1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-01 08:45:34 +00:00

more signal cleanup

This commit is contained in:
Marc Zinnschlag 2013-09-15 11:35:12 +02:00
parent a5aebfb760
commit 414e6abb95
4 changed files with 14 additions and 9 deletions

View file

@ -23,7 +23,10 @@ void CSMDoc::Operation::prepareStages()
} }
} }
CSMDoc::Operation::Operation (int type, bool ordered) : mType (type), mOrdered (ordered) {} CSMDoc::Operation::Operation (int type, bool ordered) : mType (type), mOrdered (ordered)
{
connect (this, SIGNAL (finished()), this, SLOT (operationDone()));
}
CSMDoc::Operation::~Operation() CSMDoc::Operation::~Operation()
{ {
@ -81,3 +84,8 @@ void CSMDoc::Operation::executeStage()
if (mCurrentStage==mStages.end()) if (mCurrentStage==mStages.end())
exit(); exit();
} }
void CSMDoc::Operation::operationDone()
{
emit done (mType);
}

View file

@ -43,6 +43,8 @@ namespace CSMDoc
void reportMessage (const QString& message, int type); void reportMessage (const QString& message, int type);
void done (int type);
public slots: public slots:
void abort(); void abort();
@ -50,6 +52,8 @@ namespace CSMDoc
private slots: private slots:
void executeStage(); void executeStage();
void operationDone();
}; };
} }

View file

@ -42,7 +42,7 @@ CSMDoc::Operation *CSMTools::Tools::getVerifier()
mVerifier = new CSMDoc::Operation (CSMDoc::State_Verifying, false); mVerifier = new CSMDoc::Operation (CSMDoc::State_Verifying, false);
connect (mVerifier, SIGNAL (progress (int, int, int)), this, SIGNAL (progress (int, int, int))); connect (mVerifier, SIGNAL (progress (int, int, int)), this, SIGNAL (progress (int, int, int)));
connect (mVerifier, SIGNAL (finished()), this, SLOT (verifierDone())); connect (mVerifier, SIGNAL (done (int)), this, SIGNAL (done (int)));
connect (mVerifier, SIGNAL (reportMessage (const QString&, int)), connect (mVerifier, SIGNAL (reportMessage (const QString&, int)),
this, SLOT (verifierMessage (const QString&, int))); this, SLOT (verifierMessage (const QString&, int)));
@ -132,11 +132,6 @@ CSMTools::ReportModel *CSMTools::Tools::getReport (const CSMWorld::UniversalId&
return mReports.at (id.getIndex()); return mReports.at (id.getIndex());
} }
void CSMTools::Tools::verifierDone()
{
emit done (CSMDoc::State_Verifying);
}
void CSMTools::Tools::verifierMessage (const QString& message, int type) void CSMTools::Tools::verifierMessage (const QString& message, int type)
{ {
std::map<int, int>::iterator iter = mActiveReports.find (type); std::map<int, int>::iterator iter = mActiveReports.find (type);

View file

@ -61,8 +61,6 @@ namespace CSMTools
private slots: private slots:
void verifierDone();
void verifierMessage (const QString& message, int type); void verifierMessage (const QString& message, int type);
signals: signals: