From kde-commits Mon Apr 14 14:17:48 2008 From: Hamish Rodda Date: Mon, 14 Apr 2008 14:17:48 +0000 To: kde-commits Subject: KDE/kdevplatform/shell Message-Id: <1208182668.094851.10602.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120818267907605 SVN commit 796902 by rodda: Remove deprecated code (replaced by save / load area code) M +0 -32 documentcontroller.cpp M +0 -7 documentcontroller.h --- trunk/KDE/kdevplatform/shell/documentcontroller.cpp #796901:796902 @@ -465,38 +465,6 @@ d->factories[mimetype] = factory; } -void DocumentController::saveDocumentList() -{ - if (!d || d->cleaningUp) - return; - - KConfigGroup cg = KGlobal::config()->group("Documents"); - QList urls; - QHash< KUrl, IDocument* >::iterator i, e; - for (i = d->documents.begin(), e = d->documents.end(); i != e; ++i) - /* prettyUrl strips passwords from URL, which is probably - good idea, assuming we don't want passwords to be - stored in plain text in random config files. */ - urls.push_back(i.key().prettyUrl()); - cg.writeEntry("urls", urls); - cg.sync(); -} - -void DocumentController::restoreDocumentList() -{ - KConfigGroup cg = KGlobal::config()->group("Documents"); - QList urls = cg.readEntry("urls", QList()); - /* Presently, if an URL was shown in several Sublime::Area - instances, we won't properly restore that. The - openDocument and Area should coordinate such details - in future -- this function only cares about having - the right list of URLs opened, not where they are shown. */ - foreach (const QString& s, urls) - { - openDocument(KUrl(s)); - } -} - void DocumentController::cleanup() { /* From now on, we don't save document list, so that --- trunk/KDE/kdevplatform/shell/documentcontroller.h #796901:796902 @@ -86,10 +86,6 @@ void deinitialize(); - /** Read the list of previously opened documents from KGlobal::config() - and open them. */ - void restoreDocumentList(); - void cleanup(); virtual QStringList documentTypes() const; @@ -127,9 +123,6 @@ private: void setupActions(); - /**Save the list of currently opened document URLs into - KGlobal::config(). */ - void saveDocumentList(); Q_PRIVATE_SLOT(d, void removeDocument(Sublime::Document*)) Q_PRIVATE_SLOT(d, void chooseDocument())