#include "bat.h"
#include "restore.h"
+static const int dbglvl = 100;
+
restorePage::restorePage(int conn)
{
- Pmsg1(000, "Construcing restorePage Instance connection %i\n", conn);
+ Pmsg1(dbglvl, "Construcing restorePage Instance connection %i\n", conn);
m_conn = conn;
QStringList titles;
.arg(m_cwd)
.arg(newdir)
.arg(fullpath);
- Pmsg0(000, msg.toUtf8().data());
+ Pmsg0(dbglvl, msg.toUtf8().data());
}
if (isWin32Path(newdir)) {
/* this is a windows drive */
if (mainWin->m_miscDebug) {
- Pmsg0(000, "Found windows drive\n");
+ Pmsg0(dbglvl, "Found windows drive\n");
}
windrive = true;
}
item->setIcon(0,QIcon(QString::fromUtf8(":images/folder.png")));
item->setText(0, fullpath.toUtf8().data());
if (mainWin->m_miscDebug) {
- Pmsg1(000, "Pre Inserting %s\n",fullpath.toUtf8().data());
+ Pmsg1(dbglvl, "Pre Inserting %s\n",fullpath.toUtf8().data());
}
m_dirPaths.insert(fullpath, item);
m_dirTreeItems.insert(item, fullpath);
QString text("/");
item->setText(0, text.toUtf8().data());
if (mainWin->m_miscDebug) {
- Pmsg1(000, "Pre Inserting %s\n",text.toUtf8().data());
+ Pmsg1(dbglvl, "Pre Inserting %s\n",text.toUtf8().data());
}
m_dirPaths.insert(text, item);
m_dirTreeItems.insert(item, text);
QString msg = QString(tr("In else of if parent cwd \"%1\" newdir \"%2\"\n"))
.arg(m_cwd)
.arg(newdir);
- Pmsg0(000, msg.toUtf8().data());
+ Pmsg0(dbglvl, msg.toUtf8().data());
}
}
}
/* insert into both forward and reverse hash */
if (ok) {
if (mainWin->m_miscDebug) {
- Pmsg1(000, "Inserting %s\n",fullpath.toUtf8().data());
+ Pmsg1(dbglvl, "Inserting %s\n",fullpath.toUtf8().data());
}
m_dirPaths.insert(fullpath, item);
m_dirTreeItems.insert(item, fullpath);
QString msg = QString("DoubleClick else of item column %1 fullpath %2\n")
.arg(column,10)
.arg(fullpath);
- Pmsg0(000, msg.toUtf8().data());
+ Pmsg0(dbglvl, msg.toUtf8().data());
}
}
}
strip_trailing_junk(m_console->msg(m_conn));
statusLine->setText(m_console->msg(m_conn));
}
- Dmsg1(100, "cmd=%s\n", cmd);
+ Dmsg1(dbglvl, "cmd=%s\n", cmd);
m_console->discardToPrompt(m_conn);
}
if (count == 0) {
strip_trailing_junk(m_console->msg(m_conn));
statusLine->setText(m_console->msg(m_conn));
}
- Dmsg1(100, "cmd=%s\n", cmd);
+ Dmsg1(dbglvl, "cmd=%s\n", cmd);
m_console->discardToPrompt(m_conn);
}
if (count == 0) {
statusLine->setText("");
bsnprintf(cd_cmd, sizeof(cd_cmd), "cd \"%s\"", dir);
- Dmsg2(100, "dir=%s cmd=%s\n", dir, cd_cmd);
+ Dmsg2(dbglvl, "dir=%s cmd=%s\n", dir, cd_cmd);
m_console->write_dir(m_conn, cd_cmd);
lineEdit->clear();
if ((stat = m_console->read(m_conn)) > 0) {
m_cwd = m_console->msg(m_conn);
lineEdit->insert(m_cwd);
- Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg(m_conn));
+ Dmsg2(dbglvl, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg(m_conn));
} else {
- Dmsg1(000, "stat=%d\n", stat);
+ Dmsg1(dbglvl, "stat=%d\n", stat);
QMessageBox::critical(this, "Error", tr("cd command failed"), QMessageBox::Ok);
}
m_console->discardToPrompt(m_conn);
{
int stat;
m_console->write_dir(m_conn, ".pwd");
- Dmsg0(100, "send: .pwd\n");
+ Dmsg0(dbglvl, "send: .pwd\n");
if ((stat = m_console->read(m_conn)) > 0) {
m_cwd = m_console->msg(m_conn);
- Dmsg2(100, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg(m_conn));
+ Dmsg2(dbglvl, "cwd=%s msg=%s\n", m_cwd.toUtf8().data(), m_console->msg(m_conn));
} else {
- Dmsg1(000, "Something went wrong read stat=%d\n", stat);
+ Dmsg1(dbglvl, "Something went wrong read stat=%d\n", stat);
QMessageBox::critical(this, "Error", tr(".pwd command failed"), QMessageBox::Ok);
}
m_console->discardToPrompt(m_conn);