remove dead code

This commit is contained in:
mappu 2017-05-21 13:49:36 +12:00
parent 546681a0ef
commit 6ac8c3e67b

View File

@ -31,16 +31,6 @@ static const int BdbPointerRole = Qt::UserRole + 1;
#define SET_BDB(top, bdb) top->setData(0, BdbPointerRole, QVariant::fromValue<void*>(static_cast<void*>(bdb))) #define SET_BDB(top, bdb) top->setData(0, BdbPointerRole, QVariant::fromValue<void*>(static_cast<void*>(bdb)))
#define GET_BDB(top) static_cast<BoltDB*>( top->data(0, BdbPointerRole).value<void*>() ) #define GET_BDB(top) static_cast<BoltDB*>( top->data(0, BdbPointerRole).value<void*>() )
/*
static BoltDB* GET_BDB(QTreeWidgetItem *top) {
while(top->parent() != nullptr) {
top = top->parent();
}
return static_cast<BoltDB*>( top->data(0, BdbPointerRole).value<void*>() );
}
*/
void MainWindow::on_actionOpen_database_triggered() void MainWindow::on_actionOpen_database_triggered()
{ {
QString file = QFileDialog::getOpenFileName(this, tr("Select bolt database...")); QString file = QFileDialog::getOpenFileName(this, tr("Select bolt database..."));
@ -70,7 +60,6 @@ void MainWindow::on_actionOpen_database_triggered()
void MainWindow::refreshBucketTree(QTreeWidgetItem* itm) void MainWindow::refreshBucketTree(QTreeWidgetItem* itm)
{ {
// ui->bucketTree->clearSelection();
QTreeWidgetItem *top = itm; QTreeWidgetItem *top = itm;
QStringList browsePath; QStringList browsePath;
while(top->parent() != nullptr) { while(top->parent() != nullptr) {
@ -82,11 +71,7 @@ void MainWindow::refreshBucketTree(QTreeWidgetItem* itm)
for (int i = itm->childCount(); i --> 0;) { for (int i = itm->childCount(); i --> 0;) {
delete itm->takeChild(i); delete itm->takeChild(i);
} }
/*
if (browsePath.size() > 1) {
return; // only go one level deep
}
*/
auto *bdb = GET_BDB(top); auto *bdb = GET_BDB(top);
QString error; QString error;