2011-03-03 18:29:20 +01:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based browser
|
2012-01-01 15:29:55 +01:00
|
|
|
* Copyright (C) 2010-2012 David Rosca <nowrep@gmail.com>
|
2011-03-03 18:29:20 +01:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
* ============================================================ */
|
2011-03-02 16:57:41 +01:00
|
|
|
#include "historymanager.h"
|
|
|
|
#include "ui_historymanager.h"
|
|
|
|
#include "qupzilla.h"
|
2012-01-21 23:19:38 +01:00
|
|
|
#include "mainapplication.h"
|
2011-04-25 20:56:45 +02:00
|
|
|
#include "historymodel.h"
|
|
|
|
#include "iconprovider.h"
|
2011-07-30 17:57:14 +02:00
|
|
|
#include "browsinglibrary.h"
|
2011-09-21 14:20:49 +02:00
|
|
|
#include "globalfunctions.h"
|
2012-01-21 23:19:38 +01:00
|
|
|
#include "tabwidget.h"
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
#include <QMenu>
|
|
|
|
#include <QMessageBox>
|
|
|
|
#include <QClipboard>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QSqlQuery>
|
|
|
|
|
2011-10-20 17:56:01 +02:00
|
|
|
HistoryManager::HistoryManager(QupZilla* mainClass, QWidget* parent)
|
|
|
|
: QWidget(parent)
|
|
|
|
, ui(new Ui::HistoryManager)
|
|
|
|
, p_QupZilla(mainClass)
|
|
|
|
, m_historyModel(mApp->history())
|
2011-03-02 16:57:41 +01:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2011-07-30 17:57:14 +02:00
|
|
|
ui->historyTree->setDefaultItemShowMode(TreeWidget::ItemsCollapsed);
|
|
|
|
ui->historyTree->setSelectionMode(QAbstractItemView::ExtendedSelection);
|
2011-11-06 12:05:16 +01:00
|
|
|
ui->deleteB->setShortcut(QKeySequence("Del"));
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
connect(ui->historyTree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*)));
|
|
|
|
connect(ui->historyTree, SIGNAL(itemMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(itemDoubleClicked(QTreeWidgetItem*)));
|
2011-10-18 21:07:58 +02:00
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
connect(ui->deleteB, SIGNAL(clicked()), this, SLOT(deleteItem()));
|
|
|
|
connect(ui->clearAll, SIGNAL(clicked()), this, SLOT(clearHistory()));
|
|
|
|
connect(ui->historyTree, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenuRequested(const QPoint &)));
|
|
|
|
|
2012-01-23 17:30:34 +01:00
|
|
|
connect(m_historyModel, SIGNAL(historyEntryAdded(HistoryEntry)), this, SLOT(historyEntryAdded(HistoryEntry)));
|
|
|
|
connect(m_historyModel, SIGNAL(historyEntryDeleted(HistoryEntry)), this, SLOT(historyEntryDeleted(HistoryEntry)));
|
|
|
|
connect(m_historyModel, SIGNAL(historyEntryEdited(HistoryEntry, HistoryEntry)), this, SLOT(historyEntryEdited(HistoryEntry, HistoryEntry)));
|
2011-04-25 20:56:45 +02:00
|
|
|
connect(m_historyModel, SIGNAL(historyClear()), ui->historyTree, SLOT(clear()));
|
|
|
|
|
2011-07-30 17:57:14 +02:00
|
|
|
connect(ui->optimizeDb, SIGNAL(clicked(QPoint)), this, SLOT(optimizeDb()));
|
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
//QTimer::singleShot(0, this, SLOT(refreshTable()));
|
|
|
|
|
2011-07-29 15:39:43 +02:00
|
|
|
ui->historyTree->setFocus();
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
QupZilla* HistoryManager::getQupZilla()
|
|
|
|
{
|
2012-01-18 18:36:10 +01:00
|
|
|
if (!p_QupZilla) {
|
2011-03-04 13:59:07 +01:00
|
|
|
p_QupZilla = mApp->getWindow();
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-12-09 21:56:01 +01:00
|
|
|
return p_QupZilla.data();
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2011-03-17 17:03:04 +01:00
|
|
|
void HistoryManager::setMainWindow(QupZilla* window)
|
2011-03-02 16:57:41 +01:00
|
|
|
{
|
2011-11-06 17:01:23 +01:00
|
|
|
if (window) {
|
2011-03-02 16:57:41 +01:00
|
|
|
p_QupZilla = window;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2011-03-17 17:03:04 +01:00
|
|
|
void HistoryManager::itemDoubleClicked(QTreeWidgetItem* item)
|
2011-03-02 16:57:41 +01:00
|
|
|
{
|
2011-11-06 17:01:23 +01:00
|
|
|
if (!item || item->text(1).isEmpty()) {
|
2011-03-02 16:57:41 +01:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-12-04 16:54:57 +01:00
|
|
|
|
|
|
|
QUrl url = QUrl::fromEncoded(item->text(1).toUtf8());
|
2011-12-20 18:58:42 +01:00
|
|
|
getQupZilla()->tabWidget()->addView(url, item->text(0));
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void HistoryManager::loadInNewTab()
|
|
|
|
{
|
2011-11-06 17:01:23 +01:00
|
|
|
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
2012-01-21 23:19:38 +01:00
|
|
|
getQupZilla()->tabWidget()->addView(action->data().toUrl(), Qz::NT_NotSelectedTab);
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void HistoryManager::contextMenuRequested(const QPoint &position)
|
|
|
|
{
|
2011-11-06 17:01:23 +01:00
|
|
|
if (!ui->historyTree->itemAt(position)) {
|
2011-03-02 16:57:41 +01:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-12-04 16:54:57 +01:00
|
|
|
QUrl link = QUrl::fromEncoded(ui->historyTree->itemAt(position)->text(1).toUtf8());
|
2011-11-06 17:01:23 +01:00
|
|
|
if (link.isEmpty()) {
|
2011-03-02 16:57:41 +01:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
|
|
|
|
QMenu menu;
|
2012-01-25 15:46:18 +01:00
|
|
|
menu.addAction(tr("Open link in current tab"), getQupZilla(), SLOT(loadActionUrl()))->setData(link);
|
2011-03-02 16:57:41 +01:00
|
|
|
menu.addAction(tr("Open link in new tab"), this, SLOT(loadInNewTab()))->setData(link);
|
|
|
|
menu.addSeparator();
|
2011-12-21 20:58:02 +01:00
|
|
|
menu.addAction(tr("Copy address"), this, SLOT(copyUrl()))->setData(link);
|
2011-03-02 16:57:41 +01:00
|
|
|
|
|
|
|
//Prevent choosing first option with double rightclick
|
|
|
|
QPoint pos = QCursor::pos();
|
2011-11-06 17:01:23 +01:00
|
|
|
QPoint p(pos.x(), pos.y() + 1);
|
2011-03-02 16:57:41 +01:00
|
|
|
menu.exec(p);
|
|
|
|
}
|
|
|
|
|
2011-12-21 20:58:02 +01:00
|
|
|
void HistoryManager::copyUrl()
|
|
|
|
{
|
|
|
|
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
|
|
|
QApplication::clipboard()->setText(action->data().toUrl().toEncoded());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
void HistoryManager::deleteItem()
|
|
|
|
{
|
2011-11-06 17:01:23 +01:00
|
|
|
foreach(QTreeWidgetItem * item, ui->historyTree->selectedItems()) {
|
|
|
|
if (!item) {
|
2011-07-30 17:57:14 +02:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-07-30 17:57:14 +02:00
|
|
|
|
|
|
|
if (!item->parent()) {
|
|
|
|
for (int i = 0; i < item->childCount(); i++) {
|
|
|
|
QTreeWidgetItem* children = item->child(i);
|
|
|
|
int id = children->whatsThis(1).toInt();
|
|
|
|
m_historyModel->deleteHistoryEntry(id);
|
2011-12-17 14:30:54 +01:00
|
|
|
|
|
|
|
ui->historyTree->deleteItem(children);
|
|
|
|
m_ignoredIds.append(id);
|
2011-07-30 17:57:14 +02:00
|
|
|
}
|
|
|
|
ui->historyTree->deleteItem(item);
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-07-30 17:57:14 +02:00
|
|
|
int id = item->whatsThis(1).toInt();
|
|
|
|
m_historyModel->deleteHistoryEntry(id);
|
2011-12-17 14:30:54 +01:00
|
|
|
|
|
|
|
ui->historyTree->deleteItem(item);
|
|
|
|
m_ignoredIds.append(id);
|
2011-07-30 17:57:14 +02:00
|
|
|
}
|
|
|
|
}
|
2011-04-25 20:56:45 +02:00
|
|
|
}
|
|
|
|
|
2012-01-23 17:30:34 +01:00
|
|
|
void HistoryManager::historyEntryAdded(const HistoryEntry &entry)
|
2011-04-25 20:56:45 +02:00
|
|
|
{
|
2011-07-30 17:57:14 +02:00
|
|
|
QDate todayDate = QDate::currentDate();
|
|
|
|
QDate startOfWeekDate = todayDate.addDays(1 - todayDate.dayOfWeek());
|
|
|
|
|
|
|
|
QDate date = entry.date.date();
|
|
|
|
QString localDate;
|
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
if (date == todayDate) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("Today");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else if (date >= startOfWeekDate) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("This Week");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else if (date.month() == todayDate.month()) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("This Month");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = QString("%1 %2").arg(HistoryModel::titleCaseLocalizedMonth(date.month()), QString::number(date.year()));
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-07-30 17:57:14 +02:00
|
|
|
|
|
|
|
QTreeWidgetItem* item = new QTreeWidgetItem();
|
|
|
|
QTreeWidgetItem* parentItem;
|
2011-04-25 20:56:45 +02:00
|
|
|
QList<QTreeWidgetItem*> findParent = ui->historyTree->findItems(localDate, 0);
|
|
|
|
if (findParent.count() == 1) {
|
2011-07-30 17:57:14 +02:00
|
|
|
parentItem = findParent.at(0);
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-07-30 17:57:14 +02:00
|
|
|
parentItem = new QTreeWidgetItem();
|
|
|
|
parentItem->setText(0, localDate);
|
|
|
|
parentItem->setIcon(0, QIcon(":/icons/menu/history_entry.png"));
|
2011-12-10 00:13:37 +01:00
|
|
|
ui->historyTree->insertTopLevelItem(0, parentItem);
|
2011-04-25 20:56:45 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
item->setText(0, entry.title);
|
|
|
|
item->setText(1, entry.url.toEncoded());
|
|
|
|
item->setToolTip(0, entry.title);
|
|
|
|
item->setToolTip(1, entry.url.toEncoded());
|
|
|
|
|
|
|
|
item->setWhatsThis(1, QString::number(entry.id));
|
|
|
|
item->setIcon(0, _iconForUrl(entry.url));
|
2011-07-30 17:57:14 +02:00
|
|
|
ui->historyTree->prependToParentItem(parentItem, item);
|
2011-04-25 20:56:45 +02:00
|
|
|
}
|
|
|
|
|
2012-01-23 17:30:34 +01:00
|
|
|
void HistoryManager::historyEntryDeleted(const HistoryEntry &entry)
|
2011-04-25 20:56:45 +02:00
|
|
|
{
|
2011-12-17 14:30:54 +01:00
|
|
|
if (m_ignoredIds.contains(entry.id)) {
|
|
|
|
m_ignoredIds.removeOne(entry.id);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-04-25 20:56:45 +02:00
|
|
|
QList<QTreeWidgetItem*> list = ui->historyTree->allItems();
|
2011-11-06 17:01:23 +01:00
|
|
|
foreach(QTreeWidgetItem * item, list) {
|
|
|
|
if (!item) {
|
2011-04-25 20:56:45 +02:00
|
|
|
continue;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
if (item->whatsThis(1).toInt() != entry.id) {
|
2011-04-25 20:56:45 +02:00
|
|
|
continue;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-07-30 17:57:14 +02:00
|
|
|
ui->historyTree->deleteItem(item);
|
2011-04-25 20:56:45 +02:00
|
|
|
return;
|
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-01-23 17:30:34 +01:00
|
|
|
void HistoryManager::historyEntryEdited(const HistoryEntry &before, const HistoryEntry &after)
|
2011-07-31 13:33:44 +02:00
|
|
|
{
|
|
|
|
historyEntryDeleted(before);
|
|
|
|
historyEntryAdded(after);
|
|
|
|
}
|
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
void HistoryManager::clearHistory()
|
|
|
|
{
|
|
|
|
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Confirmation"),
|
2011-11-06 17:01:23 +01:00
|
|
|
tr("Are you sure to delete all history?"), QMessageBox::Yes | QMessageBox::No);
|
|
|
|
if (button != QMessageBox::Yes) {
|
2011-03-02 16:57:41 +01:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2011-04-25 20:56:45 +02:00
|
|
|
m_historyModel->clearHistory();
|
|
|
|
m_historyModel->optimizeHistory();
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void HistoryManager::refreshTable()
|
|
|
|
{
|
2012-02-13 16:59:30 +01:00
|
|
|
QTimer::singleShot(0, this, SLOT(slotRefreshTable()));
|
|
|
|
}
|
|
|
|
|
|
|
|
void HistoryManager::slotRefreshTable()
|
|
|
|
{
|
|
|
|
QApplication::setOverrideCursor(Qt::WaitCursor);
|
2011-03-02 16:57:41 +01:00
|
|
|
ui->historyTree->clear();
|
|
|
|
|
2011-07-30 17:57:14 +02:00
|
|
|
QDate todayDate = QDate::currentDate();
|
|
|
|
QDate startOfWeekDate = todayDate.addDays(1 - todayDate.dayOfWeek());
|
2011-03-02 16:57:41 +01:00
|
|
|
QSqlQuery query;
|
|
|
|
query.exec("SELECT title, url, id, date FROM history ORDER BY date DESC");
|
|
|
|
|
2012-02-13 16:59:30 +01:00
|
|
|
int counter = 0;
|
2012-02-17 18:55:34 +01:00
|
|
|
QHash<QString, QTreeWidgetItem*> hash;
|
2011-11-06 17:01:23 +01:00
|
|
|
while (query.next()) {
|
2012-02-13 18:22:24 +01:00
|
|
|
const QString &title = query.value(0).toString();
|
|
|
|
const QUrl &url = query.value(1).toUrl();
|
2011-03-02 16:57:41 +01:00
|
|
|
int id = query.value(2).toInt();
|
2012-02-13 18:22:24 +01:00
|
|
|
const QDate &date = QDateTime::fromMSecsSinceEpoch(query.value(3).toLongLong()).date();
|
2011-07-30 17:57:14 +02:00
|
|
|
QString localDate;
|
|
|
|
|
2011-11-06 17:01:23 +01:00
|
|
|
if (date == todayDate) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("Today");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else if (date >= startOfWeekDate) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("This Week");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else if (date.month() == todayDate.month()) {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = tr("This Month");
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-07-30 17:57:14 +02:00
|
|
|
localDate = QString("%1 %2").arg(HistoryModel::titleCaseLocalizedMonth(date.month()), QString::number(date.year()));
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
|
2012-02-17 18:55:34 +01:00
|
|
|
QTreeWidgetItem* item;
|
|
|
|
QTreeWidgetItem* findParent = hash[localDate];
|
|
|
|
if (findParent) {
|
|
|
|
item = new QTreeWidgetItem(findParent);
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
|
|
|
else {
|
2011-03-02 16:57:41 +01:00
|
|
|
QTreeWidgetItem* newParent = new QTreeWidgetItem(ui->historyTree);
|
|
|
|
newParent->setText(0, localDate);
|
|
|
|
newParent->setIcon(0, QIcon(":/icons/menu/history_entry.png"));
|
|
|
|
ui->historyTree->addTopLevelItem(newParent);
|
2012-02-17 18:55:34 +01:00
|
|
|
hash[localDate] = newParent;
|
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
item = new QTreeWidgetItem(newParent);
|
|
|
|
}
|
|
|
|
|
|
|
|
item->setText(0, title);
|
|
|
|
item->setText(1, url.toEncoded());
|
|
|
|
item->setToolTip(0, title);
|
|
|
|
item->setToolTip(1, url.toEncoded());
|
|
|
|
|
|
|
|
item->setWhatsThis(1, QString::number(id));
|
2011-04-25 20:56:45 +02:00
|
|
|
item->setIcon(0, _iconForUrl(url));
|
2011-03-02 16:57:41 +01:00
|
|
|
ui->historyTree->addTopLevelItem(item);
|
2012-02-13 16:59:30 +01:00
|
|
|
|
|
|
|
++counter;
|
|
|
|
if (counter > 200) {
|
|
|
|
QApplication::processEvents();
|
|
|
|
counter = 0;
|
|
|
|
}
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2012-02-13 16:59:30 +01:00
|
|
|
QApplication::restoreOverrideCursor();
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2011-07-29 15:39:43 +02:00
|
|
|
void HistoryManager::search(const QString &searchText)
|
2011-03-02 16:57:41 +01:00
|
|
|
{
|
2011-07-30 17:57:14 +02:00
|
|
|
ui->historyTree->filterString(searchText);
|
2012-01-02 17:23:31 +01:00
|
|
|
// if (searchText.isEmpty()) {
|
|
|
|
// refreshTable();
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
|
|
|
|
// refreshTable();
|
|
|
|
// ui->historyTree->setUpdatesEnabled(false);
|
|
|
|
|
|
|
|
// QList<QTreeWidgetItem*> items = ui->historyTree->findItems("*" + searchText + "*", Qt::MatchRecursive | Qt::MatchWildcard);
|
|
|
|
|
|
|
|
// QList<QTreeWidgetItem*> foundItems;
|
|
|
|
// foreach(QTreeWidgetItem * fitem, items) {
|
|
|
|
// if (fitem->text(1).isEmpty()) {
|
|
|
|
// continue;
|
|
|
|
// }
|
|
|
|
// QTreeWidgetItem* item = new QTreeWidgetItem();
|
|
|
|
// item->setText(0, fitem->text(0));
|
|
|
|
// item->setText(1, fitem->text(1));
|
|
|
|
// item->setWhatsThis(1, fitem->whatsThis(1));
|
|
|
|
// item->setIcon(0, _iconForUrl(fitem->text(1)));
|
|
|
|
// foundItems.append(item);
|
|
|
|
// }
|
|
|
|
// ui->historyTree->clear();
|
|
|
|
// ui->historyTree->addTopLevelItems(foundItems);
|
|
|
|
// ui->historyTree->setUpdatesEnabled(true);
|
2011-03-02 16:57:41 +01:00
|
|
|
}
|
|
|
|
|
2011-07-30 17:57:14 +02:00
|
|
|
void HistoryManager::optimizeDb()
|
|
|
|
{
|
2011-10-20 17:56:01 +02:00
|
|
|
BrowsingLibrary* b = qobject_cast<BrowsingLibrary*>(parentWidget()->parentWidget());
|
2011-11-06 17:01:23 +01:00
|
|
|
if (!b) {
|
2011-07-30 17:57:14 +02:00
|
|
|
return;
|
2011-11-06 17:01:23 +01:00
|
|
|
}
|
2011-07-30 17:57:14 +02:00
|
|
|
b->optimizeDatabase();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-03-02 16:57:41 +01:00
|
|
|
HistoryManager::~HistoryManager()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|