Skip to content

Commit

Permalink
revertquery improvemen
Browse files Browse the repository at this point in the history
  • Loading branch information
benapetr committed Jun 26, 2014
1 parent fca144c commit e3060e5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions huggle/revertquery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include <QMessageBox>
#include <QtXml>
#include "configuration.hpp"
#include "core.hpp"
#include "exception.hpp"
#include "querypool.hpp"
#include "history.hpp"
Expand Down Expand Up @@ -243,7 +242,7 @@ void RevertQuery::Preflight()
text = (_l("cr-message-not-same", this->edit->Page->PageName));
}
QMessageBox::StandardButton re;
re = QMessageBox::question(Core::HuggleCore->Main, _l("revert-preflightcheck"),
re = QMessageBox::question(MainWindow::HuggleMain, _l("revert-preflightcheck"),
text, QMessageBox::Yes|QMessageBox::No);
if (re == QMessageBox::No)
{
Expand Down Expand Up @@ -370,7 +369,7 @@ void RevertQuery::CheckPreflight()
}
}
QMessageBox::StandardButton re;
re = QMessageBox::question(Core::HuggleCore->Main, _l("revert-preflightcheck"), text, QMessageBox::Yes|QMessageBox::No);
re = QMessageBox::question(MainWindow::HuggleMain, _l("revert-preflightcheck"), text, QMessageBox::Yes|QMessageBox::No);
if (re == QMessageBox::No)
{
// abort
Expand Down Expand Up @@ -412,8 +411,8 @@ bool RevertQuery::CheckRevert()
item->Target = this->qRevert->Target;
item->Type = HistoryRollback;
item->Result = "Success";
if (Core::HuggleCore->Main != nullptr)
Core::HuggleCore->Main->_History->Prepend(item);
if (MainWindow::HuggleMain != nullptr)
MainWindow::HuggleMain->_History->Prepend(item);
}
this->qRevert->UnregisterConsumer(HUGGLECONSUMER_REVERTQUERY);
this->qRevert = nullptr;
Expand Down

0 comments on commit e3060e5

Please sign in to comment.