Commit 4b999a50 authored by David Faure's avatar David Faure

GUI: "undo closed tab" feature, available in Edit/Undo (Ctrl+Z), and in Go/Closed Tabs/...

Initial feature by Eduardo Robles Elvira, refactorings and unit tests by me.

svn path=/trunk/KDE/kdebase/apps/; revision=739791
parent fff17193
......@@ -26,6 +26,7 @@ qt4_add_dbus_interface(konquerorprivate_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../../l
qt4_add_dbus_adaptor(konquerorprivate_SRCS org.kde.Konqueror.HistoryManager.xml konqhistorymanager.h KonqHistoryManager konqhistorymanageradaptor KonqHistoryManagerAdaptor)
kde4_add_library(konquerorprivate SHARED ${konquerorprivate_SRCS})
target_link_libraries(konquerorprivate ${KDE4_KPARTS_LIBS})
set_target_properties(konquerorprivate PROPERTIES VERSION 1.0.0 SOVERSION 1 )
install(TARGETS konquerorprivate DESTINATION ${LIB_INSTALL_DIR})
########### konqueror ###############
......@@ -60,6 +61,7 @@ set(konqueror_KDEINIT_SRCS
KonqViewAdaptor.cpp
konqproxystyle.cpp
konqundomanager.cpp
konqclosedtabitem.cpp
)
kde4_add_kcfg_files(konqueror_KDEINIT_SRCS konqsettingsxt.kcfgc)
......
<?xml version="1.0"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="Konqueror" version="61">
<gui name="Konqueror" version="62">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="new_window"/>
......@@ -59,6 +59,7 @@
<Action name="go_most_often"/>
<Separator/>
<Action name="history"/>
<Action name="closedtabs"/>
</Menu>
<Action name="bookmarks"/>
<Menu name="tools"><text>&amp;Tools</text>
......
<?xml version="1.0"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="Konqueror" version="61">
<gui name="Konqueror" version="62">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="new_window"/>
......@@ -64,6 +64,7 @@
<Action name="go_most_often"/>
<Separator/>
<Action name="history"/>
<Action name="closedtabs"/>
</Menu>
<Action name="bookmarks"/>
<Menu name="tools"><text>&amp;Tools</text>
......
/* This file is part of the KDE project
Copyright 2007 David Faure <faure@kde.org>
Copyright 2007 Eduardo Robles Elvira <edulix@gmail.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "konqclosedtabitem.h"
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
K_GLOBAL_STATIC_WITH_ARGS(KConfig, s_config, ("konqueror_closedtabs", KConfig::NoGlobals) );
KonqClosedTabItem::KonqClosedTabItem(const QString& url, const QString& title, int pos, quint64 serialNumber)
: m_url(url), m_title(title), m_pos(pos),
m_configGroup(s_config, "Closed_Tab" + QString::number((qint64)this)),
m_serialNumber(serialNumber)
{
kDebug(1202) << m_configGroup.name();
}
KonqClosedTabItem::~KonqClosedTabItem()
{
m_configGroup.deleteGroup();
kDebug(1202) << "deleted group" << m_configGroup.name();
}
/* This file is part of the KDE project
Copyright 2007 David Faure <faure@kde.org>
Copyright 2007 Eduardo Robles Elvira <edulix@gmail.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KONQCLOSEDTABITEM_H
#define KONQCLOSEDTABITEM_H
#include "konqprivate_export.h"
#include <kconfiggroup.h>
#include <QString>
/**
* This class stores all the needed information about a closed tab
* in order to be able to reopen it if requested
*/
class KONQ_TESTS_EXPORT KonqClosedTabItem {
public:
KonqClosedTabItem(const QString& url, const QString& title, int index, quint64 serialNumber);
~KonqClosedTabItem();
const KConfigGroup& configGroup() const { return m_configGroup; }
KConfigGroup& configGroup() { return m_configGroup; }
quint64 serialNumber() const { return m_serialNumber; }
QString url() const { return m_url; }
QString title() const { return m_title; }
/// The position inside the tabbar that the tab had when it was closed
int pos() const { return m_pos; }
private:
QString m_url;
QString m_title;
int m_pos;
KConfigGroup m_configGroup;
quint64 m_serialNumber;
// Copying an item would delete the group in the config file (see destructor)!
Q_DISABLE_COPY(KonqClosedTabItem)
};
#endif /* KONQCLOSEDTABITEM_H */
......@@ -77,20 +77,14 @@ bool KonqFrame::isActivePart()
void KonqFrame::saveConfig( KConfigGroup& config, const QString &prefix, bool saveURLs, KonqFrameBase* docContainer, int /*id*/, int /*depth*/ )
{
if (saveURLs)
config.writePathEntry( QString::fromLatin1( "URL" ).prepend( prefix ),
childView()->url().url() );
config.writeEntry( QString::fromLatin1( "ServiceType" ).prepend( prefix ), childView()->serviceType() );
config.writeEntry( QString::fromLatin1( "ServiceName" ).prepend( prefix ), childView()->service()->desktopEntryName() );
config.writeEntry( QString::fromLatin1( "PassiveMode" ).prepend( prefix ), childView()->isPassiveMode() );
config.writeEntry( QString::fromLatin1( "LinkedView" ).prepend( prefix ), childView()->isLinkedView() );
config.writeEntry( QString::fromLatin1( "ToggleView" ).prepend( prefix ), childView()->isToggleView() );
config.writeEntry( QString::fromLatin1( "LockedLocation" ).prepend( prefix ), childView()->isLockedLocation() );
childView()->saveConfig(config, prefix, saveURLs);
//config.writeEntry( QString::fromLatin1( "ShowStatusBar" ).prepend( prefix ), statusbar()->isVisible() );
if (this == docContainer) config.writeEntry( QString::fromLatin1( "docContainer" ).prepend( prefix ), true );
#if 0 // currently unused
KonqConfigEvent ev( config.config(), prefix+'_', true/*save*/);
QApplication::sendEvent( childView()->part(), &ev );
#endif
}
void KonqFrame::copyHistory( KonqFrameBase *other )
......
......@@ -2,6 +2,8 @@
Copyright (C) 1998, 1999 Simon Hausmann <hausmann@kde.org>
Copyright (C) 2000 Carsten Pfeiffer <pfeiffer@kde.org>
Copyright (C) 2000-2005 David Faure <faure@kde.org>
Copyright (C) 2007 Eduardo Robles Elvira <edulix@gmail.com>
Copyright (C) 2007 Daniel García Moreno <danigm@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
......@@ -20,6 +22,7 @@
*/
#include "konqmainwindow.h"
#include "konqclosedtabitem.h"
#include "konqapplication.h"
#include "konqguiclients.h"
#include "KonqMainWindowAdaptor.h"
......@@ -41,6 +44,7 @@
#include "konqbookmarkbar.h"
#include "konqundomanager.h"
#include <config-konqueror.h>
#include <kstringhandler.h>
#include <konq_events.h>
#include <konqpixmapprovider.h>
......@@ -151,6 +155,7 @@ QFile * KonqMainWindow::s_crashlog_file = 0;
bool KonqMainWindow::s_preloaded = false;
KonqMainWindow* KonqMainWindow::s_preloadedWindow = 0;
int KonqMainWindow::s_initialMemoryUsage = -1;
static unsigned short int s_closedTabsListLength = 10;
time_t KonqMainWindow::s_startupTime;
int KonqMainWindow::s_preloadUsageCount;
......@@ -164,7 +169,8 @@ KonqExtendedBookmarkOwner::KonqExtendedBookmarkOwner(KonqMainWindow *w)
}
KonqMainWindow::KonqMainWindow( const KUrl &initialURL, const QString& xmluiFile)
: KParts::MainWindow()
: KParts::MainWindow(),
m_paClosedTabs(0)
{
setPreloadedFlag( false );
......@@ -232,6 +238,7 @@ KonqMainWindow::KonqMainWindow( const KUrl &initialURL, const QString& xmluiFile
KConfigGroup locationBarGroup( s_comboConfig, "Location Bar" );
prov->load( locationBarGroup, "ComboIconCache" );
}
connect( prov, SIGNAL( changed() ), SLOT( slotIconsChanged() ) );
m_undoManager = new KonqUndoManager(this);
......@@ -326,6 +333,7 @@ KonqMainWindow::~KonqMainWindow()
delete m_paBookmarkBar;
delete m_pBookmarksOwner;
delete m_pURLCompletion;
delete m_paClosedTabs;
if ( s_lstViews == 0 ) {
delete s_comboConfig;
......@@ -3121,9 +3129,40 @@ void KonqMainWindow::slotBackAboutToShow()
KonqBidiHistoryAction::fillHistoryPopup( m_currentView->history(), m_currentView->historyIndex(), m_paBack->menu(), true, false );
}
/**
* Fill the closed tabs action menu before it's shown
*/
void KonqMainWindow::slotClosedTabsListAboutToShow()
{
kDebug(1202);
QMenu* popup = m_paClosedTabs->menu();
// Clear the menu and fill it with a maximum of s_closedTabsListLength number of urls
popup->clear();
QAction* clearAction = popup->addAction( i18n("Empty closed tabs history") );
connect(clearAction, SIGNAL(triggered()), m_undoManager, SLOT(clearClosedTabsList()));
popup->insertSeparator();
QList<KonqClosedTabItem *>::ConstIterator it = m_undoManager->closedTabsList().begin();
const QList<KonqClosedTabItem *>::ConstIterator end = m_undoManager->closedTabsList().end();
for ( int i = 0; it != end && i < s_closedTabsListLength; ++it, ++i ) {
const QString text = QString::number(i) + ' ' + (*it)->title();
const QString url = (*it)->url();
QAction* action = popup->addAction( KonqPixmapProvider::self()->pixmapFor(url), text );
action->setData(i);
}
KAcceleratorManager::manage(popup);
kDebug(1202) << "done";
}
void KonqMainWindow::updateClosedTabsAction()
{
m_paClosedTabs->setEnabled(!m_undoManager->closedTabsList().isEmpty());
}
void KonqMainWindow::slotBack()
{
slotGoHistoryActivated(-1);
slotGoHistoryActivated(-1);
}
void KonqMainWindow::slotBack(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
......@@ -3735,6 +3774,18 @@ void KonqMainWindow::initActions()
QPair< KGuiItem, KGuiItem > backForward = KStandardGuiItem::backAndForward();
// Trash bin of closed tabs
m_paClosedTabs = new KToolBarPopupAction( KIcon("closedtabs"), i18n( "Closed Tabs" ), this );
actionCollection()->addAction( "closedtabs", m_paClosedTabs );
// set the maximum number of closed tabs list shown
connect( m_paClosedTabs, SIGNAL(triggered()), m_undoManager, SLOT(undoLastClosedTab()) );
connect( m_paClosedTabs->menu(), SIGNAL(aboutToShow()), this, SLOT(slotClosedTabsListAboutToShow()) );
connect( m_paClosedTabs->menu(), SIGNAL(triggered(QAction*)), m_undoManager, SLOT(slotClosedTabsActivated(QAction*)) );
connect( m_pViewManager, SIGNAL(aboutToRemoveTab(KonqFrameBase*)), this, SLOT(slotAddClosedUrl(KonqFrameBase*)) );
connect( m_undoManager, SIGNAL(openClosedTab(KonqClosedTabItem)), m_pViewManager, SLOT(openClosedTab(KonqClosedTabItem)) );
connect( m_undoManager, SIGNAL(closedTabsListChanged()), this, SLOT(updateClosedTabsAction()));
m_paBack = new KToolBarPopupAction( KIcon(backForward.first.iconName()), backForward.first.text(), this );
actionCollection()->addAction( "go_back", m_paBack );
m_paBack->setShortcuts( KStandardShortcut::shortcut(KStandardShortcut::Back) );
......@@ -4046,6 +4097,11 @@ void KonqMainWindow::initActions()
m_paForward->setWhatsThis( i18n( "Move forward one step in the browsing history" ) );
m_paForward->setToolTip( i18n( "Move forward one step in the browsing history" ) );
m_paClosedTabs->setWhatsThis( i18n( "Move backwards one step in the closed tabs history" ) );
m_paClosedTabs->setToolTip( i18n( "Move backwards one step in the closed tabs history" ) );
m_paHome->setWhatsThis( i18n( "<html>Navigate to your 'Home Location'<br /><br />"
"You can configure the location this button takes you to "
"under <b>Settings -> Configure Konqueror -> General</b>.</html>" ) );
......@@ -4145,6 +4201,15 @@ void KonqMainWindow::slotMoveTabRight()
m_pViewManager->moveTabForward();
}
void KonqMainWindow::updateHistoryActions()
{
if(m_currentView)
{
m_paBack->setEnabled( m_currentView->canGoBack() );
m_paForward->setEnabled( m_currentView->canGoForward() );
}
}
void KonqMainWindow::updateToolBarActions( bool pendingAction /*=false*/)
{
// Enables/disables actions that depend on the current view & url (mostly toolbar)
......@@ -4441,6 +4506,7 @@ void KonqMainWindow::enableAllActions( bool enable )
currentProfileChanged();
updateViewActions(); // undo, lock, link and other view-dependent actions
updateClosedTabsAction();
m_paStop->setEnabled( m_currentView && m_currentView->isLoading() );
......@@ -4681,6 +4747,7 @@ void KonqMainWindow::slotPopupMenu( const QPoint &global, const KFileItemList &i
popupMenuCollection.addAction( "go_forward", m_paForward );
popupMenuCollection.addAction( "go_up", m_paUp );
popupMenuCollection.addAction( "reload", m_paReload );
popupMenuCollection.addAction( "closedtabs", m_paClosedTabs );
#if 0
popupMenuCollection.addAction( "find", m_paFindFiles );
......@@ -5362,6 +5429,55 @@ void KonqMainWindow::goURL()
QApplication::sendEvent( lineEdit, &event );
}
/**
* Adds the URL of a KonqView to the closed tabs list.
* This slot gets called everytime a View is closed
*/
void KonqMainWindow::slotAddClosedUrl(KonqFrameBase *tab)
{
kDebug(1202);
KonqFrameBase* currentFrame = tab;
QString title( i18n("no name") ), url("about:blank");
// TODO simplify
KonqFrame* frame = dynamic_cast<KonqFrame *>(tab);
KonqFrameContainer* frame2 = dynamic_cast<KonqFrameContainer *>(tab);
if ( frame && frame->activeChildView() )
{
title = frame->title().trimmed();
if ( title.isEmpty() )
title = frame->activeChildView()->url().url();
title = KStringHandler::csqueeze( title, 50 );
url = frame->activeChildView()->url().url();
} else if ( frame2 && frame2->activeChildView() )
{
// TODO: in case we are a KonqFrameContainer.. how do we get the title of the selected view?
title = frame2->activeChildView()->url().url();
title = KStringHandler::csqueeze( title, 50 );
url = frame2->activeChildView()->url().url();
}
// Now we get the position of the tab
const int index = m_pViewManager->tabContainer()->childFrameList().indexOf(tab);
KonqClosedTabItem* closedTabItem = new KonqClosedTabItem(url, title, index, m_undoManager->newCommandSerialNumber());
QString prefix = QString::fromLatin1( currentFrame->frameType() ) + QString::number(0);
closedTabItem->configGroup().writeEntry( "RootItem", prefix );
prefix.append( QLatin1Char( '_' ) );
currentFrame->saveConfig( closedTabItem->configGroup(), prefix, true, 0L, 0, 1);
m_paClosedTabs->setEnabled(true);
m_undoManager->addClosedTabItem( closedTabItem );
kDebug(1202) << "done";
}
void KonqMainWindow::slotLocationLabelActivated()
{
focusLocationBar();
......
......@@ -2,6 +2,8 @@
This file is part of the KDE project
Copyright (C) 1998, 1999 Simon Hausmann <hausmann@kde.org>
Copyright (C) 2000-2004 David Faure <faure@kde.org>
Copyright (C) 2007 Eduardo Robles Elvira <edulix@gmail.com>
Copyright (C) 2007 Daniel García Moreno <danigm@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
......@@ -30,11 +32,11 @@
#include <QtCore/QList>
#include <QtCore/QEvent>
#include <QtGui/QLabel>
#include <QtCore/QHash>
#include <kfileitem.h>
#include "konqopenurlrequest.h"
#include <kparts/mainwindow.h>
#include <kcompletion.h>
#include <kurlcompletion.h>
......@@ -74,9 +76,11 @@ class ToggleViewGUIClient;
class KonqMainWindowIface;
class KonqDirPart;
class KonqRun;
class KConfigGroup;
class KUrlRequester;
class KBookmarkManager;
struct HistoryEntry;
class KonqClosedTabItem;
namespace KParts {
class BrowserExtension;
......@@ -88,6 +92,7 @@ namespace KParts {
class KonqExtendedBookmarkOwner;
class KONQ_TESTS_EXPORT KonqMainWindow : public KParts::MainWindow, public KonqFrameContainerBase
{
Q_OBJECT
......@@ -314,6 +319,7 @@ public:
void saveWindowSize() const;
void restoreWindowSize();
void updateHistoryActions();
Q_SIGNALS:
void viewAdded( KonqView *view );
......@@ -376,6 +382,8 @@ public Q_SLOTS:
void slotGoAutostart();
void slotGoHistory();
void slotAddClosedUrl(KonqFrameBase *tab);
void slotConfigure();
void slotConfigureToolbars();
void slotConfigureExtensions();
......@@ -403,7 +411,7 @@ public Q_SLOTS:
void slotSplitViewHorizontal();
void slotSplitViewVertical();
protected Q_SLOTS:
private Q_SLOTS:
void slotViewCompleted( KonqView * view );
void slotURLEntered( const QString &text, int );
......@@ -460,6 +468,9 @@ protected Q_SLOTS:
void slotBackAboutToShow();
void slotForwardAboutToShow();
void slotClosedTabsListAboutToShow();
void updateClosedTabsAction();
void slotUpActivated( int id );
void slotBackActivated( int id );
void slotForwardActivated( int id );
......@@ -604,6 +615,7 @@ private: // members
KToolBarPopupAction *m_paUp;
KToolBarPopupAction *m_paBack;
KToolBarPopupAction *m_paForward;
KToolBarPopupAction *m_paClosedTabs; /// Action for the trash that contains closed tabs
KAction *m_paHome;
KonqBidiHistoryAction *m_paHistory;
......
<?xml version="1.0"?>
<!DOCTYPE gui SYSTEM "kpartgui.dtd">
<gui name="Konqueror" version="61">
<gui name="Konqueror" version="62">
<MenuBar>
<Menu name="file" noMerge="1"><text>&amp;File</text>
<Action name="new_window"/>
......@@ -58,6 +58,7 @@
<Action name="go_most_often"/>
<Separator/>
<Action name="history"/>
<Action name="closedtabs"/>
</Menu>
<Action name="bookmarks"/>
<Menu name="tools"><text>&amp;Tools</text>
......
/* This file is part of the KDE project
Copyright 2007 David Faure <faure@kde.org>
Copyright 2007 Eduardo Robles Elvira <edulix@gmail.com>
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 2 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; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "konqundomanager.h"
#include <QAction>
#include "konqclosedtabitem.h"
#include <konq_fileundomanager.h>
#include <kconfig.h>
#include <kdebug.h>
#include <klocale.h>
KonqUndoManager::KonqUndoManager(QObject* parent)
: QObject(parent)
......@@ -13,6 +38,7 @@ KonqUndoManager::KonqUndoManager(QObject* parent)
KonqUndoManager::~KonqUndoManager()
{
clearClosedTabsList();
KonqFileUndoManager::decRef();
}
......@@ -23,14 +49,65 @@ void KonqUndoManager::slotFileUndoAvailable(bool)
bool KonqUndoManager::undoAvailable() const
{
// TODO "or tab closing"
return KonqFileUndoManager::self()->undoAvailable();
return KonqFileUndoManager::self()->undoAvailable() || !m_closedTabsList.isEmpty();
}
QString KonqUndoManager::undoText() const
{
if (!m_closedTabsList.isEmpty()) {
const KonqClosedTabItem* closedTabItem = m_closedTabsList.first();
if (closedTabItem->serialNumber() > KonqFileUndoManager::self()->currentCommandSerialNumber()) {
return i18n("Und&o: Closed Tab");
}
}
return KonqFileUndoManager::self()->undoText();
}
void KonqUndoManager::undo()
{
// TODO tab closing handling
KonqFileUndoManager::self()->undo();
if (!m_closedTabsList.isEmpty()) {
const KonqClosedTabItem* closedTabItem = m_closedTabsList.first();
// Check what to undo
kDebug() << "closedTabItem->serialNumber:" << closedTabItem->serialNumber()
<< ", KonqFileUndoManager currentCommandSerialNumber(): " << KonqFileUndoManager::self()->currentCommandSerialNumber();
if (closedTabItem->serialNumber() > KonqFileUndoManager::self()->currentCommandSerialNumber()) {
m_closedTabsList.removeFirst();
emit openClosedTab(*closedTabItem);
delete closedTabItem;
emit undoAvailable(this->undoAvailable());
emit closedTabsListChanged();
} else {
KonqFileUndoManager::self()->undo();
}
} else {
KonqFileUndoManager::self()->undo();
}
}
const QList<KonqClosedTabItem *>& KonqUndoManager::closedTabsList() const
{
return m_closedTabsList;
}
void KonqUndoManager::undoClosedTab(int index)
{
Q_ASSERT(!m_closedTabsList.isEmpty());
KonqClosedTabItem* closedTabItem = m_closedTabsList.at( index );
m_closedTabsList.removeAt(index);
emit openClosedTab(*closedTabItem);
delete closedTabItem;
emit undoAvailable(this->undoAvailable());
emit undoTextChanged(this->undoText());
emit closedTabsListChanged();
}
void KonqUndoManager::slotClosedTabsActivated(QAction* action)
{
// Open a closed tab
const int index = action->data().toInt();
undoClosedTab(index);
}
void KonqUndoManager::slotFileUndoTextChanged(const QString& text)
......@@ -38,3 +115,27 @@ void KonqUndoManager::slotFileUndoTextChanged(const QString& text)
// I guess we can always just forward that one?
emit undoTextChanged(text);
}
quint64 KonqUndoManager::newCommandSerialNumber()
{
return KonqFileUndoManager::self()->newCommandSerialNumber();
}
void KonqUndoManager::addClosedTabItem(KonqClosedTabItem* closedTabItem)
{
m_closedTabsList.prepend(closedTabItem);
emit undoTextChanged(i18n("Und&o: Closed Tab"));
emit undoAvailable(true);
}
void KonqUndoManager::clearClosedTabsList()
{
qDeleteAll(m_closedTabsList);
m_closedTabsList.clear();
emit closedTabsListChanged();
}
void KonqUndoManager::undoLastClosedTab()
{