void Console::displayToPrompt()
{
int stat = 0;
+ QString buf;
if (mainWin->m_commDebug) Pmsg0(000, "DisplaytoPrompt\n");
while (!m_at_prompt) {
if ((stat=read()) > 0) {
- display_text(msg());
+ buf += msg();
+ if (buf.size() >= 8196) {
+ display_text(buf);
+ buf.clear();
+ }
}
}
+ display_text(buf);
if (mainWin->m_commDebug) Pmsg1(000, "endDisplaytoPrompt=%d\n", stat);
}
{
int stat = 0;
if (mainWin->m_commDebug) Pmsg0(000, "discardToPrompt\n");
- while (!m_at_prompt) {
- if ((stat=read()) > 0) {
- if (mainWin->m_displayAll) display_text(msg());
+ if (mainWin->m_displayAll) {
+ displayToPrompt();
+ } else {
+ while (!m_at_prompt) {
+ stat=read();
}
}
- if (mainWin->m_commDebug) Pmsg1(000, "endDisplayToPrompt=%d\n", stat);
+ if (mainWin->m_commDebug) Pmsg1(000, "endDiscardToPrompt=%d\n", stat);
}
mp_tableWidget->setColumnCount(headerlist.size());
mp_tableWidget->setHorizontalHeaderLabels(headerlist);
mp_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
+ mp_tableWidget->setSortingEnabled(false); /* rows move on insert if sorting enabled */
if (mainWin->m_sqlDebug) {
Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
row++;
}
}
+ /* set default sorting */
+ mp_tableWidget->sortByColumn(m_jobIdIndex, Qt::DescendingOrder);
+ mp_tableWidget->setSortingEnabled(true);
+
/* Resize the columns */
mp_tableWidget->resizeColumnsToContents();
mp_tableWidget->resizeRowsToContents();
}
}
/* Descending */
- query += " ORDER BY Job.Starttime=0 DESC, Job.Starttime DESC, Job.JobId DESC";
+ query += " ORDER BY Job.JobId DESC";
/* If Limit check box for limit records returned is checked */
if (limitCheckBox->checkState() == Qt::Checked) {
QString limit;