mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 00:28:08 -04:00
store hints from operations in report model
This commit is contained in:
parent
3a847732b4
commit
a64b741af2
@ -2301,8 +2301,8 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
|||||||
connect (&mSaving, SIGNAL (done (int, bool)), this, SLOT (operationDone (int, bool)));
|
connect (&mSaving, SIGNAL (done (int, bool)), this, SLOT (operationDone (int, bool)));
|
||||||
|
|
||||||
connect (
|
connect (
|
||||||
&mSaving, SIGNAL (reportMessage (const CSMWorld::UniversalId&, const std::string&, int)),
|
&mSaving, SIGNAL (reportMessage (const CSMWorld::UniversalId&, const std::string&, const std::string&, int)),
|
||||||
this, SLOT (reportMessage (const CSMWorld::UniversalId&, const std::string&, int)));
|
this, SLOT (reportMessage (const CSMWorld::UniversalId&, const std::string&, const std::string&, int)));
|
||||||
|
|
||||||
connect (&mRunner, SIGNAL (runStateChanged()), this, SLOT (runStateChanged()));
|
connect (&mRunner, SIGNAL (runStateChanged()), this, SLOT (runStateChanged()));
|
||||||
}
|
}
|
||||||
@ -2387,7 +2387,7 @@ void CSMDoc::Document::modificationStateChanged (bool clean)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CSMDoc::Document::reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
void CSMDoc::Document::reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
||||||
int type)
|
const std::string& hint, int type)
|
||||||
{
|
{
|
||||||
/// \todo find a better way to get these messages to the user.
|
/// \todo find a better way to get these messages to the user.
|
||||||
std::cout << message << std::endl;
|
std::cout << message << std::endl;
|
||||||
|
@ -149,7 +149,7 @@ namespace CSMDoc
|
|||||||
void modificationStateChanged (bool clean);
|
void modificationStateChanged (bool clean);
|
||||||
|
|
||||||
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
||||||
int type);
|
const std::string& hint, int type);
|
||||||
|
|
||||||
void operationDone (int type, bool failed);
|
void operationDone (int type, bool failed);
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ void CSMDoc::Operation::executeStage()
|
|||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
emit reportMessage (CSMWorld::UniversalId(), e.what(), mType);
|
emit reportMessage (CSMWorld::UniversalId(), e.what(), "", mType);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +113,7 @@ void CSMDoc::Operation::executeStage()
|
|||||||
emit progress (mCurrentStepTotal, mTotalSteps ? mTotalSteps : 1, mType);
|
emit progress (mCurrentStepTotal, mTotalSteps ? mTotalSteps : 1, mType);
|
||||||
|
|
||||||
for (Messages::Iterator iter (messages.begin()); iter!=messages.end(); ++iter)
|
for (Messages::Iterator iter (messages.begin()); iter!=messages.end(); ++iter)
|
||||||
emit reportMessage (iter->mId, iter->mMessage, mType);
|
emit reportMessage (iter->mId, iter->mMessage, iter->mHint, mType);
|
||||||
|
|
||||||
if (mCurrentStage==mStages.end())
|
if (mCurrentStage==mStages.end())
|
||||||
exit();
|
exit();
|
||||||
|
@ -52,7 +52,7 @@ namespace CSMDoc
|
|||||||
void progress (int current, int max, int type);
|
void progress (int current, int max, int type);
|
||||||
|
|
||||||
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
void reportMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
||||||
int type);
|
const std::string& hint, int type);
|
||||||
|
|
||||||
void done (int type, bool failed);
|
void done (int type, bool failed);
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ CSMDoc::Operation *CSMTools::Tools::getVerifier()
|
|||||||
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 (done (int, bool)), this, SIGNAL (done (int, bool)));
|
connect (mVerifier, SIGNAL (done (int, bool)), this, SIGNAL (done (int, bool)));
|
||||||
connect (mVerifier,
|
connect (mVerifier,
|
||||||
SIGNAL (reportMessage (const CSMWorld::UniversalId&, const std::string&, int)),
|
SIGNAL (reportMessage (const CSMWorld::UniversalId&, const std::string&, const std::string&, int)),
|
||||||
this, SLOT (verifierMessage (const CSMWorld::UniversalId&, const std::string&, int)));
|
this, SLOT (verifierMessage (const CSMWorld::UniversalId&, const std::string&, const std::string&, int)));
|
||||||
|
|
||||||
std::vector<std::string> mandatoryIds; // I want C++11, damn it!
|
std::vector<std::string> mandatoryIds; // I want C++11, damn it!
|
||||||
mandatoryIds.push_back ("Day");
|
mandatoryIds.push_back ("Day");
|
||||||
@ -155,11 +155,11 @@ CSMTools::ReportModel *CSMTools::Tools::getReport (const CSMWorld::UniversalId&
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CSMTools::Tools::verifierMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
void CSMTools::Tools::verifierMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
||||||
int type)
|
const std::string& hint, int type)
|
||||||
{
|
{
|
||||||
std::map<int, int>::iterator iter = mActiveReports.find (type);
|
std::map<int, int>::iterator iter = mActiveReports.find (type);
|
||||||
|
|
||||||
if (iter!=mActiveReports.end())
|
if (iter!=mActiveReports.end())
|
||||||
mReports[iter->second]->add (id, message);
|
mReports[iter->second]->add (id, message, hint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ namespace CSMTools
|
|||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
void verifierMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
void verifierMessage (const CSMWorld::UniversalId& id, const std::string& message,
|
||||||
int type);
|
const std::string& hint, int type);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user