Convert the HistorySizeDialog to .ui

This commit is contained in:
Kurt Hindenburg
2012-04-03 10:15:03 -04:00
parent 2efc697d80
commit d1ac153ba6
5 changed files with 84 additions and 67 deletions

View File

@@ -1038,7 +1038,7 @@ void SessionController::changeSearchMatch()
}
void SessionController::showHistoryOptions()
{
HistorySizeDialog* dialog = new HistorySizeDialog(QApplication::activeWindow());
QScopedPointer<HistorySizeDialog> dialog(new HistorySizeDialog(QApplication::activeWindow()));
const HistoryType& currentHistory = _session->historyType();
if (currentHistory.isEnabled()) {
@@ -1052,10 +1052,14 @@ void SessionController::showHistoryOptions()
dialog->setMode(Enum::NoHistory);
}
connect(dialog, SIGNAL(optionsChanged(int,int)),
this, SLOT(scrollBackOptionsChanged(int,int)));
QPointer<Session> guard(_session);
int result = dialog->exec();
if (!guard)
return;
dialog->show();
if (result) {
scrollBackOptionsChanged(dialog->mode(), dialog->lineCount());
}
}
void SessionController::sessionResizeRequest(const QSize& size)
{