return false;
}
- if (mainWin->m_connDebug)
- Pmsg2(000, "sql_cmd conn %i %s\n", conn, query);
- if (donotify)
+ if (mainWin->m_connDebug) Pmsg2(000, "sql_cmd conn %i %s\n", conn, query);
+ if (donotify) {
dircomm->notify(false);
+ }
mainWin->waitEnter();
pm_strcpy(cmd, ".sql query=\"");
QString dum = dircomm->msg();
if ((dum.left(6) == "*None*")) doappend = false;
}
- if (doappend)
+ if (doappend) {
results << dircomm->msg();
+ }
first = false;
}
- if (donotify)
+ if (donotify) {
dircomm->notify(true);
+ }
discardToPrompt(conn);
mainWin->waitExit();
- return true; /* ***FIXME*** return any command error */
+ return !mainWin->isClosing(); /* return false if closing */
}
/*
new MediaList();
new MediaView();
new Storage();
- if (m_openBrowser)
+ if (m_openBrowser) {
new restoreTree();
- if (m_openDirStat)
+ }
+ if (m_openDirStat) {
new DirStat();
-
+ }
treeWidget->expandItem(topItem);
tabWidget->setCurrentWidget(m_currentConsole);
}
*/
void MainWin::waitExit()
{
+ if (!m_waitState || m_isClosing) {
+ return;
+ }
m_waitState = false;
if (mainWin->m_connDebug) Pmsg0(000, "Exiting Wait State\n");
- if (m_waitTreeItem != treeWidget->currentItem())
+ if (m_waitTreeItem && (m_waitTreeItem != treeWidget->currentItem())) {
treeWidget->setCurrentItem(m_waitTreeItem);
+ }
if (m_doConnect) {
connectSignals();
connectConsoleSignals();
void hashRemove(QTreeWidgetItem *, Pages *);
void setMessageIcon();
bool getWaitState() {return m_waitState; };
+ bool isClosing() {return m_isClosing; };
Console *currentConsole();
QTreeWidgetItem *currentTopItem();
Pages* getFromHash(QTreeWidgetItem *);
fieldcnt += 1;
}
}
+ } else {
+ return;
}
} else {
QMessageBox::warning(this, "Bat",